Re: [exim] Router/Transport Problem with multiple entries

Etusivu
Poista viesti
Vastaa
Lähettäjä: Colin
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Router/Transport Problem with multiple entries

On 23/10/2011 00:05, Dave Lugo wrote:
>
> On Sat, 22 Oct 2011, Colin wrote:
>>
>> Say I have the following in /etc/staticroutes
>>
>> domain1.com: 1.1.1.1
>> domain2.com: 2.2.2.2
>> domain3.com: 1.1.1.1
>>
>> Delivery to each domain individually is fine. A message addressed to
>> user@??? and user@??? is fine.
>>
>> A message which contains any user at domain1.com and domain3.com will
>> fail as both domains point to the same IP address. Can anyone see an
>> obvious reason why these would fail?
>>
>> Thanks.
>>
>> #Router
>>
>> static_route:
>> driver = manualroute
>> transport = remote_smtp_smart
>> route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
>>
>>
>
> all seems good so far...
>
>> #Transport
>>
>> remote_smtp_smart:
>> driver = smtp
>> port = 25
>> delay_after_cutoff = false
>> hosts = ${lookup{$domain}lsearch{/etc/staticroutes}}
>> hosts_override
>>
>
> Do you need hosts & hosts_override there? What happens if you
> remove them?
>
>

Thank you for the reply, the reason that is in there is because the spec
says this about the hosts line:

"This option is ignored when the address has been routed by a router
that supplies a host list (for example, /lookuphost/), unless
/hosts_override/ is set."

I read this to mean that the hosts line in the transport will be ignored
unless hosts_override is in there - am a I wrong?

Incidentally, I thought of a couple of queries with regards to improving
the "staticroutes" setup as follows:

1) If I was to put multiple entries for a domain in the staticroutes
file, will Exim try each of them in order until one succeeds?

2) The transport specifically uses port 25. I was wondering if this
could be a default setting but over-ridden if the staticroutes file
contained a line such as:

domain.com: 1.1.1.1:26

I've only had to use an alternate port once when someone's broadband was
down. They had a backup freephone dialup but port 25 was blocked on it.
I had to write an entirely separate staticroutes2 to use an alternate
port back then. It would be nice to have an easy option though!