Re: [Exim] Exim v4 and wildcards in /etc/aliases

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Josh Siegel
Fecha:  
A: Matthew Byng-Maddick, Dan Egli
Cc: exim-users
Asunto: Re: [Exim] Exim v4 and wildcards in /etc/aliases
> >>Ok Question. I've been looking through the spec.txt file and can not
> >>find an answer to this (still looking).
> >>I have need to redirect ALL emails to a particular domain to one
> >>address. I added this to my /etc/aliases:
> >>*@infohighway.dyndns.org:        infohighway

> >>
> >>


Add the following BELOW your localuser: router...

system_aliases2:
driver = redirect
allow_fail
allow_defer
qualify_preserve_domain
data = ${lookup{@$domain}lsearch{/etc/aliases}}
user = mail
file_transport = address_file
pipe_transport = address_pipe

And then, don't put the * before the @ in the /etc/aliases file

Of course, to complete the configuration, you put:

system_aliases1:
driver = redirect
allow_fail
allow_defer
qualify_preserve_domain
data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}}
user = mail
file_transport = address_file
pipe_transport = address_pipe

directly above the system_aliases: router , and then modify system_aliases
to be:

system_aliases:
driver = redirect
allow_fail
allow_defer
qualify_preserve_domain
data = ${lookup{$local_part}lsearch{/etc/aliases}}
user = mail
file_transport = address_file
pipe_transport = address_pipe

This gives you the ability to have domain specific aliases, aliases across
all domains, and aliases for everything in a domain that is not matched by
one of the previous rules. Remember, order is VERY important...
system_aliases2 must be BELOW the localuser router so that it only kicks in
as a last resort

     --josh



     --josh