Re: [Exim] exim and virtual domains

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Walt Reed
Date:  
À: Thomas Stein
CC: exim-users
Sujet: Re: [Exim] exim and virtual domains
On Wed, Jul 30, 2003 at 04:34:06PM +0200, Thomas Stein said:
> I have some problems setting up my mailserver with virtual domains. My
> configuration:
>
> local_domains: example.com : andthis.com
>
> Now i want email that goes to andthis.com is being delivered only if there is
> a alias like:
>
> virtual_domain:
> driver = redirect
> allow_fail
> allow_defer
> data = ${lookup{$local_part@$domain}lsearch{/etc/exim/virtual}}
>
> /etc/exim/virtual contains perhaps:
> thomas@???    thomas

>
> But if a local user exists lets say called "dummy" he gets mail when i send
> mail to dummy@???. Mail to dummy@??? should be delivered to
> the local user "dummy". Maybe someone can me point to the right direction.


You probably need a more complete section here.

This is what I use:
virtual_aliases:
driver = redirect
domains = virtual1.com : virtual2.com
allow_defer
allow_fail
data = ${lookup{$local_part}lsearch{/etc/aliases.$domain}}
file_transport = address_file
pipe_transport = address_pipe
retry_use_local_part
no_more

the "domains" line restricts this router to only the virtual domains.
"no_more" prevents any of the following routers (such as local delivery)
from running if the router declines (the lookup fails.)

Lets say my /etc/passwd has real users bob, jeff, and bill.
bob@??? will deliver to bob via the default "localuser"
router. Same with jeff@???.

If my aliases.virtual1.com file contains only:
bob: bob

then the lookup for jeff@??? will fail causing the router to
decline, and due to the "no_more" option, it will NOT get delivered to
the local user "jeff" as the localuser router will not run..

no_more is the key, as is restricting the router to the virtual domains.

Hope this helps.