Re: [exim] Condition for router

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Martin Klewitz [gamigo AG]
Fecha:  
A: exim-users
Asunto: Re: [exim] Condition for router
Hi,

>> I want some mails for a certain domain to be delivered locally and some
>> to be relayed over a second mailserver. To do this I added a new router
>> right before all other routers. It works fine if I try to relay all
>> mails for hole domains:
>>
>> additional_route:
>> driver = manualroute
>> domains = domain1.com
>> route_data = 1.2.3.4
>> transport = remote_smtp
>>
>> The problem is that not all mails at domain1.com should be relayed.
>> I tried a bit with lsearch and things like:
>>
>> local_parts = lsearch;/etc/exim/relay/$domain/local_parts
>>
>> But I did not find a working solution.
>
> That ought to work. What was the problem?


If I do not specify "domains = domain1.com" and
/etc/exim/relay/$domain/local_parts does not exist exim sends "421
Unexpected failure, please try later".
So "domains" has to be set in exim.conf.
But if a new email address with a different domain will be added I have to
edit exim.conf and restart/reload exim. I want the list of emails be created
automatically with a script without the need of restart/reload exim.

Is there a possibility to read the matching emails from a plain text file
where all the addresses that should be relayed are listed one per line?

Regards,
Martin