I am running Exim 4.71. I want to:
- Route all email from A.com through mail.A.com
- Route all email from [B-E].com through mail.B.com
- Send all other email directly.
Here is the configuration I have that doesn't work like I hoped:
domainlist a_domains = a.com domainlist b_domains = b.com : c.com : d.com : e.com begin routers smart_route_a: driver = manualroute domains = +a_domains transport = remote_smtp route_list = +a_domains mail.a.com no_more smart_route_b: driver = manualroute domains = +b_domains transport = remote_smtp route_list = +b_domains mail.mollenhour.com no_more dnslookup: driver = dnslookup domains = ! +local_domains transport = remote_smtp ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 no_more
When I send an email e.g. with PHP's
Zend_Mail_Transport_Smtp setting both From: and Return-Path: as email@example.com, the
smart_route_a router is not used, the dnslookup is used instead. Disabling dnslookup results in no mail being sent.
From the logs it appears that email sent to firstname.lastname@example.org uses
smart_route_a, but the same email sent from email@example.com to firstname.lastname@example.org is sent using
How do I make email from email@example.com be relayed via mail.a.com?