Re: [exim] virtual domains and aliases

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Erik Myllymaki
Date:  
À: Peter Bowyer
CC: Exim-Users \(E-mail\)
Sujet: Re: [exim] virtual domains and aliases


Peter Bowyer wrote:

> Erik Myllymaki <erik.myllymaki@???> wrote:
>
>>to use separate aliases files for each domain that I accept mail for,
>>could it be as easy as using /etc/aliases.domain1,
>>/etc/aliases.domain2, etc. and then changing this part of exim.conf:
>>
>>system_aliases:
>> driver = redirect
>> allow_fail
>> allow_defer
>> data = ${lookup{$local_part}lsearch*{/etc/aliases}}
>> user = exim
>> file_transport = address_file
>> pipe_transport = address_pipe
>>
>>to this:
>>
>>system_aliases:
>> driver = redirect
>> allow_fail
>> allow_defer
>> data = ${lookup{$local_part}lsearch*{/etc/aliases.$domain}}
>> user = exim
>> file_transport = address_file
>> pipe_transport = address_pipe
>
>
> Looks fine to me - Exim's flexibility strikes again :-)
>
> A couple of observations:
>
> - All pipe and file deliveries will happen under the 'exim' user - you
> should be sure this is what you want
>
> - You might want to have a domains= option on that router to make sure it
> only fires on domains which you have an alias file for, otherwise strange
> errors will happen when it tries to handle a domain which doesn't have a
> file. You could automate this with a small change to your file layout and a
> dsearch lookup:
>
>  system_aliases:
>     driver = redirect
>     domains = dsearch;/etc/virtaliases
>     allow_fail
>     allow_defer
>     data = ${lookup{$local_part}lsearch*{/etc/virtaliases/$domain}}
>     user = exim
>     file_transport = address_file
>     pipe_transport = address_pipe

>
> or like this:
>
>  system_aliases:
>     driver = redirect
>     allow_fail
>     allow_defer
>     require_files = /etc/aliases.$domain
>     data = ${lookup{$local_part}lsearch*{/etc/aliases.$domain}}
>     user = exim
>     file_transport = address_file
>     pipe_transport = address_pipe

>
> Either one will cause the router to pass if the file doesn't exist.


Well,I tried your second suggested change to exim.conf. Then I copied
/etc/aliases to /etc/aliases.domain2. Then I made a new alias in
/etc/aliases.domain2 that doesn't exist in /etc/aliases, but I got a
failed delivery:

SMTP error from remote mailer after RCPT TO:<xxx@???>:
     host 127.0.0.1 [127.0.0.1]: 550-Mailbox unknown.  Either there is 
no mailbox associated with this
     550-name or you do not have authorization to see it.
     550 5.1.1 User unknown


any help appreciated.