Hello. I''ve recently upgraded my exim3 setup to exim4 and all is mainly working as it should. It picked up most settings from the old setup and I could immediately send mail through it. I also have a fetchmail setup collecting mail from two different POP boxes. The problem I am having is that although mail sent to my username or an aliase of my username gets to me, mail addressed to an invalid username doesn''t. Under exim3 I had a catch all director which in the event of all the other directors failing it sent the message to postmaster, which was as alias for me. I found a few net postings about doing this in exim4 and created a new router after all the others with the following:> catch_all: > driver = redirect > data = postmaster # this was a lookup in aliases but I removed it > no_verifyNow, when fetchmail downloads the mail all mail not to a named alias gets bounced because the username is unknown (SMTP error 500). I''ve asked on the exim4 mailing list but they directed me to here since the config system is so different. So, any help setting up a catch all mailbox, ideally using a lookup for *: in the aliases file, that works for any of the named local domains: dc_other_hostnames=''domain1.co.uk:domain2.net:domain.local'' I hope that is clear and that somebody can help. Cheers. Martin...
Hi, On Fri, Apr 08, 2005 at 03:56:38PM +0100, Martin D Fraser wrote:> So, any help setting up a catch all mailbox, ideally using a lookup for > *: in the aliases file,You need to use lookup* instead of lookup in the system_aliases router. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Thanks Marc. I had already found that by checking the docs on the exim site. Over the weekend I had a more indepth play about with my setup and fixed the problem myself, but it has raised a question. I put exim in debug mode and found that the lsearch* was working, for any of my three domains, all from the same aliases file, which is exactly what I wanted and exactly what I thought would happen by looking at the routers config. The problem was the fact that it was matching my random address to the catchall *: postmaster, then checking that and finding an alias for root, then checking that and finding a real user name, then checking that against the aliases file again and finding the postmaster catchall and realising it had been checked already, it failed. So, I dug further and found that the real_user router appears to match real user names prepended with the word real-, which obviously matches none of my user accounts. The router that actually finds user accounts, local_user, was almost the last router and as such the wildcard in the aliases files matched before I could check for real user names. Renaming the router to start with a smaller number than the aliases router meant that when an alias resolved to a real user name it was found by the local_user router and delivered successfully. The local_user router appears to my untrained eye to match any username that is not root, which is perfect. So, assuming my rambling above makes any sense, I have two questions. Firstly, what does the real_user router do. To me it makes no sense at all and I hope it is for a feature that I don''t use here at home as one of two email accounts. Secondly, what was the reason for putting the local_user router after the system_alises router. It seems to me that this may be a mistake since my problem must happen to anyone with a wildcard in the aliases file. I understand that I added the lsearch* to the router and therefore caused the loop myself, but why in the world would it be set to check the system_aliases before checking against the list of actual user accounts. I''m sure there is a reason but it is beyond me. Thanks for the help and I hope you can rid me of my ignorance and answer my questions. Martin... Marc Haber wrote:>Hi, > >On Fri, Apr 08, 2005 at 03:56:38PM +0100, Martin D Fraser wrote: > > >>So, any help setting up a catch all mailbox, ideally using a lookup for >>*: in the aliases file, >> >> > >You need to use lookup* instead of lookup in the system_aliases router. > >Greetings >Marc > > >
Hi Martin, can you please subscribe to the list with the address you are posting from, so that I do not have to manually approve your messages? The alioth moderation process is currently broken so that I do not get any reminders that there are mesages in the moderator queue. On Mon, Apr 11, 2005 at 09:06:54PM +0100, Martin Fraser wrote:> The problem was the fact that it was matching my random address to the > catchall *: postmaster, then checking that and finding an alias for > root, then checking that and finding a real user name, then checking > that against the aliases file again and finding the postmaster catchall > and realising it had been checked already, it failed.Can you document this in exim -bt output? I do not quite understand what you mean. There is a pitfall with catchall accounts: The catchall target will re-trigger the catchall. This can be remedied by aliasing the target to itself, like in: catchall_target: catchall_target *: catchall_target This will prevent the catchall to trigger again on the second round. btw, I consider having catchalls as a very bad idea in this time.> So, I dug further and found that the real_user router appears to match > real user names prepended with the word real-,Yes. This avoids forward and alias processing for real-user, which can be used to reach users who have broken their forwarding process by using an illegal .forward file. See th userforward router for examples. I have also put some documentation in the real_local router file.> which obviously matches > none of my user accounts. The router that actually finds user accounts, > local_user, was almost the last router and as such the wildcard in the > aliases files matched before I could check for real user names.This can be remedied by aliasing your catchall target to itself.> Firstly, what does the real_user router do.Explained above. Or should I elaborate more?> Secondly, what was the reason for putting the local_user router after > the system_alises router.To allow local user names to be overriden by aliasing. For example, I do not want my local daemon user to receive mail. So, I alias it to root in /etc/aliases, which prevents the local_user router from being accessed for the local user daemon at all.> It seems to me that this may be a mistakeNo, it''s a feature.> since my problem must happen to anyone with a wildcard in the aliases > file.Wildcards are a bad idea anyway.> I understand that I added the lsearch* to the router and therefore > caused the loop myself, but why in the world would it be set to check > the system_aliases before checking against the list of actual user accounts.That is a good idea. Or do you want to receive mail for "bin"? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
On Tue, Apr 12, 2005 at 08:32:50AM +0200, Marc Haber wrote:> Hi Martin, > > can you please subscribe to the list with the address you are posting >Sorry about that. I had changed some mail client settings for testing. This one should come from the right place.> > Can you document this in exim -bt output? I do not quite understand > what you mean. >The -bt output is very large, as I''m sure you know. It boils down the fact that I have there entries in my alises file: postmaster: root root: mdf *: postmaster An email sent to testaddress@mydomain caused it to say: Considering testaddress -> matched postmaster (the catchall) Considering postmaster -> matched root Considering root -> matched mdf (a real user name) Considering mdf -> matched postmaster Considering postmaster -> already matched, routing fails at this point> There is a pitfall with catchall accounts: The catchall target will > re-trigger the catchall. This can be remedied by aliasing the target > to itself, like in: > > catchall_target: catchall_target > *: catchall_target >So if I alias postmaster: postmaster and move the routers back to the correct order it will eventually match my real username, or should I add an alias for the real username i.e. mdf: mdf> This will prevent the catchall to trigger again on the second round. > > btw, I consider having catchalls as a very bad idea in this time. >I understand the problems and appreciate the concern, but I find it handy to subscribe to things using a throw away address. I could subscribe to this list with exim@mydomain and if I get spam on that address I know where they got my address.> > So, I dug further and found that the real_user router appears to match > > real user names prepended with the word real-, > > Yes. This avoids forward and alias processing for real-user, which can > be used to reach users who have broken their forwarding process by > using an illegal .forward file. See th userforward router for > examples. I have also put some documentation in the real_local router > file. >Ok. So by moving the local_user router as I have done, the .forward router will never process the file. I really have broken my setup and I''ll put it all back :) I thought the maintainer of an email package would know a lot more about this that I do. Thanks for the explaination.> Explained above. Or should I elaborate more? >That makes perfect sense now. If I had a problem sending to mdf because that user had broken the .forward file, I could send to real-mdf and skip all the clever processing. Is that right?> > Secondly, what was the reason for putting the local_user router after > > the system_alises router. > > To allow local user names to be overriden by aliasing. For example, I > do not want my local daemon user to receive mail. So, I alias it to > root in /etc/aliases, which prevents the local_user router from being > accessed for the local user daemon at all. >So, actual local users can have their mail sent to another local user simply by sticking an alias in the file. Of course. Silly me.> > It seems to me that this may be a mistake > > No, it''s a feature. >Yup. Good feature to, sorry I doubted you.> > since my problem must happen to anyone with a wildcard in the aliases > > file. > > Wildcards are a bad idea anyway. >Yup, they can be, but I find it handy to get mail for typos as well. If somebody mistyped my address I could bounce the mail, but if it was my mum for example, she would be confused by the bouce ;)> > I understand that I added the lsearch* to the router and therefore > > caused the loop myself, but why in the world would it be set to check > > the system_aliases before checking against the list of actual user accounts. > > That is a good idea. Or do you want to receive mail for "bin"? >Yup, perfect.> Greetings > Marc >Cheers Marc. A good reply as usual. That seems to have answered all my questions and will allow me to sort out my mail setup properly while still allowing my ill advised wildcard address. Cheers again and sorry about the post from the wrong address. Martin...
Hi, On Tue, Apr 12, 2005 at 10:11:26AM +0100, Martin D Fraser wrote:> On Tue, Apr 12, 2005 at 08:32:50AM +0200, Marc Haber wrote: > > Hi Martin, > > > > can you please subscribe to the list with the address you are posting > > > Sorry about that. I had changed some mail client settings for testing. > This one should come from the right place.Thanks.> > Can you document this in exim -bt output? I do not quite understand > > what you mean. > > > The -bt output is very large, as I''m sure you know. It boils down the > fact that I have there entries in my alises file: > > postmaster: root > root: mdf > *: postmasterI would alias mdf: mdf in that case.> So if I alias postmaster: postmaster and move the routers back to the > correct order it will eventually match my real username, or should I add > an alias for the real username i.e. mdf: mdfAdd an alias for mdf: mdf and moving the router back will most probably work.> > This will prevent the catchall to trigger again on the second round. > > > > btw, I consider having catchalls as a very bad idea in this time. > > > I understand the problems and appreciate the concern, but I find it > handy to subscribe to things using a throw away address. I could > subscribe to this list with exim@mydomain and if I get spam on that > address I know where they got my address.Try using +suffix notation. Works fine without aliases, and has the advantage of foiling spammers (most of them think that "+" is not a valid character in a local part and end up spamming non-existent addresses). otoh, most web designers think that "+" is not valid as well, so I frequently end up aliasing mh-broken-web-site@zugschlus.de to mh+broken-web-site@zugschlus.de> Thanks for the explaination.You''re welcome, and sorry for taking so long to notice your message in the moderation queue. There seems to be some breakage on alioth''s mailing list system.> > Explained above. Or should I elaborate more? > > > That makes perfect sense now. If I had a problem sending to mdf because > that user had broken the .forward file, I could send to real-mdf and > skip all the clever processing. Is that right?Right. Additionally, the userforward router sends error messages by itself when it notices a syntax error in the forward file and uses real-foo as target address for that error message.> > > Secondly, what was the reason for putting the local_user router after > > > the system_alises router. > > > > To allow local user names to be overriden by aliasing. For example, I > > do not want my local daemon user to receive mail. So, I alias it to > > root in /etc/aliases, which prevents the local_user router from being > > accessed for the local user daemon at all. > > > So, actual local users can have their mail sent to another local user > simply by sticking an alias in the file.Yes. That is part of the idea.> > > It seems to me that this may be a mistake > > > > No, it''s a feature. > > > Yup. Good feature to, sorry I doubted you.no problem. Glad you asked. It is always a good thing to learn about problems other people might have as it frequently points out things that one hasn''t thought of during software creation. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
On 2005-04-11 Martin Fraser <martin@burbank.co.uk> wrote: [...]> I put exim in debug mode and found that the lsearch* was working, for > any of my three domains, all from the same aliases file, which is > exactly what I wanted and exactly what I thought would happen by looking > at the routers config.> The problem was the fact that it was matching my random address to the > catchall *: postmaster[...]> The router that actually finds user accounts, > local_user, was almost the last router and as such the wildcard in the > aliases files matched before I could check for real user names. Renaming > the router to start with a smaller number than the aliases router meant > that when an alias resolved to a real user name it was found by the > local_user router and delivered successfully. The local_user router > appears to my untrained eye to match any username that is not root, > which is perfect.[...] It is not perfect, as you loose the possibily to redirect mail of _existing_ users via /etc/aliases. (e.g. I do not want news to be delivered to /var/mail/news but to the newsmaster). You should use a separate router for the catchall, ending up with this: 1. /etc/aliases 2. existing users [perhaps more routers] 3. catchall.> So, assuming my rambling above makes any sense, I have two questions.> Firstly, what does the real_user router do. To me it makes no sense at > all and I hope it is for a feature that I don''t use here at home as one > of two email accounts.real-user is a special shortcut to _force_ local delivery, e.g. even for a machine that sends everything to mailup you might want deliver mail-error messages to some _local_ user. [snip, second question answered above] hth, cu andreas -- "See, I told you they''d listen to Reason," [SPOILER] Svfurlr fnlf, fuhggvat qbja gur juveyvat tha. Neal Stephenson in "Snow Crash" http://downhill.aus.cc/