[Exim] Re: default delivery from aliases file

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Edmund GRIMLEY EVANS
Data:  
Para: exim-users
CC: Philip Hazel, Odhiambo Washington
Asunto: [Exim] Re: default delivery from aliases file
Edmund GRIMLEY EVANS <edmundo@???>:

> Various bits of on-line documentation led me to believe that I can put
> a line like "*: edmund" in /etc/aliases to get all otherwise
> undelivered mail sent to me, but it doesn't work, even when I added
> the '*' in exim.conf:
>
> system_aliases:
> driver = aliasfile
> file_transport = address_file
> pipe_transport = address_pipe
> file = /etc/aliases
> search_type = lsearch*


This wasn't working because /etc/aliases was being applied before
checking for a real local user name, so with the rules

*: edmund
edmund: ege

in /etc/aliases, and no mention of ege, a local part like foobar
causes a cycle: foobar -> edmund -> ege -> edmund -> ...

Now, exim seems to resolve a cycle by rewriting exactly once, which
fails in this case because "edmund" is a not a real local user.

It might be helpful if exim -bt -d10 could give some kind of warning
about there being a cycle. It took me a while to work out what was
going on here.

> What's the best way of achieving this?


It seems that using "*" in /etc/aliases is not the way to do it
because probably you want to check for local users before applying the
default rule. So probably I should use a separate director in
exim.conf added after all the other directors. What I have done is to
duplicate the director quoted above, but with the file name
/etc/aliases2, where that file has a single line "*: edmund". I think
it's working now.

Perhaps this solution, or a neater one, should be given in the FAQ, if
it's not already there.

Edmund