Exim4 Smart Host Relay
Posted
by ColinM
on Server Fault
See other posts from Server Fault
or by ColinM
Published on 2010-06-16T03:30:29Z
Indexed on
2010/06/16
3:33 UTC
Read the original article
Hit count: 315
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 mail(
) or Zend_Mail_Transport_Smtp
setting both From: and Return-Path: as [email protected], 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 [email protected] uses smart_route_a
, but the same email sent from [email protected] to [email protected] is sent using dnslookup
.
How do I make email from [email protected] be relayed via mail.a.com?
© Server Fault or respective owner