OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Relaying mail based on sender address

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Mon Aug 11 2008 - 11:00:09 CDT


Wadeegh Hendricks wrote:
> Thanks,
>
> From what I can see is that you can relay on an individual address or
> domain name. My understanding is that the format for the file is as
> follows:
>
> sender_address relay_host
> ie testfoo.com <mailto:testfoo.com> example.foo.com
> <http://example.foo.com/>
>
> What happens if you just want the server to do an MX lookup and send to
> the primary MX for the particular destination domain? What is the
> format for that if it is possible?
>
> Thanks

[please don't top-post]

Yes, you can send to the MX of a specified domain.
http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
http://www.postfix.org/postconf.5.html#relayhost

so to send to the MX of example.com, the
sender_dependant_relayhost_maps entry would look like:
userexample.org example.com

To send to the A record of example.com (no MX lookup) enclose
the hostname in "[ ]" braces.
userexample.org [example.com]

--
Noel Jones