Re: [exim] Different smarthosts on different ports?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Steinar Bang
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Different smarthosts on different ports?
>>>>> "Peter Bowyer" <peter@???>:

> I wouldn't do this in the same router/transport pair.


> You'd need to specify 2 separate routers and 2 separate transports -
> the first router triggers on the 'work' domain, and calls the 'work'
> transport; the second triggers on (presumably) all other domains and
> calls your existing smarthost smtp transport.


This is what I did. Thanx!

I cloned the smarthost router, and the remote_smtp_smarthost transport,
and put the new smarthost router before the original in the config file
/etc/exim4/exim4.conf.template.

In the cloned router I changed the transport to the cloned
remote_smtp_smarthost and removed the original
route_list = * DCsmarthost byname
and instead put in a
route_data = ${lookup{${domain:$reply_address}}lsearch{/etc/exim4/domainsmarthosts}}

I ran into some problems with this not working. The reason was that I'd
put in spaces in the lookup expression. I needed some googling to
figure that bit out.

The domainsmarthosts file looks like this:
senderdomain1: smarthost1.dns.address
senderdomain2: smarthost2.dns.address

The cloned remote_smtp_smarthost transport is identical to the original
one, but without the
port = 2222
line.