Sorry I guess I wasn't very clear. This is what i want to do:

I want to be able to route e-mail send to b...@somedomain.com to 1.1.1.1 however, I also want to be able to route e-mail send to m...@somedomain.com to 2.2.2.2. I do normally use transports but in this case, I need to be able to filter e-mail based on recipient to route to different servers. I thought using header_checks would be my best choice but i guess not. If i try to use tranports for this particular domain, it seems like the tranports directive in postfix takes precedence over the header_checks file. Hopefully this is more clear.

Thanks in advance



On 2/22/2013 2:01 PM, Noel Jones wrote:
On 2/22/2013 12:39 PM, Deeztek.com Support wrote:
I'm trying to accomplish the following:

I'm trying to filter e-mail based on the to: field using a regexp
header_checks file as follows:

/^To: some...@somedomain.com/ FILTER smtp:192.xxx.xxx.xxx

I thought with the above expression it would take the e-mail and
deliver to the 192.xxx.xxx.xxx address via port 25. Instead looking
at the logs, postfix does an MX record lookup for the domain and of
course it fails and comes back that no MX record exits (since it
doesn't exist). I could simply add an MX record but
Mail uses envelope recipient(s) to determine routing, never the To:
header.

In postfix, use transport_maps to define the envelope recipient
next-hop destination.
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html


the ultimate
result is for me to be able to route e-mail based on the to: field
to several different servers. Is this possible?
Please explain your use case in detail, or use transport_maps.



   -- Noel Jones


--

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to