That works, although I would have liked it to be done within postfix.
Thanks for the suggestion!!!
Victor Duchovni <victor.ducho...@morganstanley.com> wrote:
On Thu, Apr 23, 2009 at 01:52:27PM -0400, Marc Jauvin wrote:
I'd like to know if there's a way to have different relayhost based on the
MX records of the recipient for outgoing mail.
No. MX lookups happen late in the process, when the message is in the
"hands" of the delivery agent. Postfix has an active queue, so message
transport/nexthop needs to be known in the queue manager.
I'd like to relay outgoing
emails to multiple different domains (all going through a common mail
exchange) to a particular relayhost.
If these all reach a common IP address via a variety of names:
Use "iptables" or similar, to destination NAT
192.0.2.1:25 to 192.0.2.2:25.
assuming 192.0.2.1 is the natural MX host, and 192.0.2.2 is the
one you want instead.
If these all use a common MX hostname, override the IP address of that
name in your local DNS resolver.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
--
Marc Jauvin
514-905-6500 ext. 403
http://register4less.com