[Pkg-exim4-users] Catch all mailbox

Martin Fraser martin@burbank.co.uk
Mon, 11 Apr 2005 21:06:54 +0100


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
>
>  
>