1

I've got a server with exim4 and a smarthost in front of it, the use of the smarthost is mandatory, the university closed down port 25. However, on IPv6 this port is open. So when the receiving server has an IPv6 address I could send it directly.

So my question is, how can I let exim make a routing decision based on the IP-address, or try IPv6 first and if that doesn't work use the smarthost.

BastianW
  • 2,848
  • 4
  • 19
  • 34
blauwblaatje
  • 953
  • 1
  • 6
  • 19
  • 1
    Don't bother, just use the smarthost. Sooner or later they'll notice that they accidentally left IPv6 open, and close it off, and you'll have to do it anyway. – Michael Hampton Jun 26 '13 at 03:41

1 Answers1

0

The easiest way to do this might be to put an ignore_target_hosts directive on the SMTP router, so that Exim passes over that router if it finds an IPv4 address in the MX record of the destination. Something like:

ignore_target_hosts = 0.0.0.0/0

Then you just need a fall-through router below pointing at the smarthost transport. This should mean that any destination with an IPv6 MX record should have direct delivery attempted, and any with an IPv4 'falls through' to the next router which will attempt a smarthost delivery.

growse
  • 7,830
  • 11
  • 72
  • 114