Okay, let's try this:

The goal is to send most emails to local, send most mydomain.com recipients to a relay nearby, and let foobardomain.com senders go out on the Internet freely.

In main.cf I have:

sender_dependent_default_transport_maps = regexp:/etc/postfix/sender_transport

In sender_transport I have:

/@foobarDomain\.com$/        foobar:

In master.cf I have:

foobar    unix    -       -       n       -       -       smtp
        -o transport_maps=hash:/etc/postfix/transport_foobar
        -o smtp_helo_name=foobardomain.com
        -o syslog_name=smtp-foobar

transport_foobar is empty (but I run postmap on it anyway), I just use it to override the regular transport file, which is:

*       local:
j...@mydomain.com       local:
j...@mydomain.com       local:
mydomain.com            :[relay.mydomain.local]

However, I can't seem to even reach the foobar transport I created in master.cf. I am watching syslog and, while seding from @foobardomain.com to a completely unrelated address out there, I don't see any mention of smtp-foobar in syslog.

Again, I am clearly doing something wrong, I know that, I just don't know what exactly. Please enlighten me.

Thank you.

--
Florin Andrei
http://florin.myip.org/

Reply via email to