[Exim] Re-Routing mail to certain MX

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Karsten Behrens
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Re-Routing mail to certain MX
Dear all,

I'm running exim 4.22. Because of a problem with a certain protocol
(ECN) I cannot disable in my kernel, I cannot connect to a certain host
(let's call it [1.2.3.4]) which is MX for a lot of domains.

I would like to configure exim so that all mail going out to that host
is instead passed on to a different server (my.other.server). The
solution I found so far looks like this:

---------------------------------------------------------------------
Routers:

dnslookup_catch:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_catch
ignore_target_hosts = ! 1.2.3.4

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
---------------------------------------------------------------------
Transports:

remote_smtp:
driver = smtp

remote_smtp_catch:
driver = smtp
hosts = my.other.server
hosts_override = yes
---------------------------------------------------------------------

Problems occur when mail is going out to domains containing invalid MX
records. Let's say the dnslookup_catch router makes a successful lookup
for the primary MX (which is not 1.2.3.4) and runs into a timeout for a
secondary, invalid MX. The primary is discarded because of the
ignore_target_hosts statement, and the lookup for the secondary did not
complete, so the mail is queued but not passed on to the dnslookup
router as desired.

I hope you get my point ;-)

The question is: Is there an easier way to tell the smtp transport to
"replace" a certain IP address with a different one? Something like a
route_list entry in a manualroute router, but not domain-based, but
MX-based?

I'd be glad to provide more information if required.

Thanks in advance
Karsten