Hi,
I'm trying to use header_checks in conjunction with a pcre map to
distribute certain mail traffic to certain outgoing transports. I've got a
setup like this:

--- main.cf snip ---
header_checks = pcre:/etc/postfix/header.pcre
--- snap ---

--- header.pcre snip ---
/^X-CUSTOMER-ID: ([0-9])/ FILTER smtpout$1:
--- snap ---

In the master.cf I have smtpout0-9 transports like this one:
--- master.cf snip ---
smtpout0  unix  -       -       -       -       -       smtp
        -o smtp_helo_name=server1.isp.net
        -o smtp_bind_address=11.22.33.44
--- master.cf snap ---

With this setup I try to distribute my mail traffic according to the rules
defined in header.pcre. Unfortunately it does not work. According to
http://www.postfix.org/postconf.5.html#default_transport and
http://www.postfix.org/transport.5.html Postfix should use the recipient
domain as the nexthop, but it doesn't.

My Question: How can I filter my outgoing mail based on a header field to
an smtp-transport?

Best Regards,
Dominik

Reply via email to