Hi all,

I am having a very difficult time getting sender_dependent_default_transport_maps to actually work as described.

I have a simple postfix 2.9.3 server with 2 IP addresses. I want all mail sent from a sender address of *@example1 to go through 1.1.1.1, and all mail sent from a sender address of *@example2.com to go through 1.1.1.2.

My master.cf currently looks similar to the following:

1.1.1.1:smtp     inet    n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/server.key -o smtpd_tls_cert_file=/etc/postfix/server.crt -o myhostname=mail.domain1.com
1.1.1.1:submission inet n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/server.key -o smtpd_tls_cert_file=/etc/postfix/server.crt -o myhostname=mail.domain1.com
1.1.1.2:smtp     inet    n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/mail_domain2_com.key -o smtpd_tls_cert_file=/etc/postfix/mail_domain2_com.crt -o myhostname=mail.domain2.com
1.1.1.2:submission inet n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/mail_domain2_com.key -o smtpd_tls_cert_file=/etc/postfix/mail_domain2_com.crt -o myhostname=mail.domain2.com
127.0.0.1:smtp     inet    n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/server.key -o smtpd_tls_cert_file=/etc/postfix/server.crt
127.0.0.1:submission inet n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_key_file=/etc/postfix/server.key -o smtpd_tls_cert_file=/etc/postfix/server.crt



I tried the following setup in /etc/postfix/sender_dependent_default_transport_maps with no luck :

/@domain2\.com$/      1.1.1.2:smtp:

I have the following in /etc/postfix/main.cf:
sender_dependent_default_transport_maps = regexp:/etc/postfix/sender_dependent_default_transport_maps


It gives the following error:
dsn=4.3.0, status=deferred (mail transport unavailable)



What is the simplest way of doing this? I've tried both regexp and a standard hash format as described on various pages I have Googled with no luck.

Thanks in advance!

Reply via email to