Quote:
|
How to use sender_dependent_relayhost_maps in master.cf - ReadList.com
|
this works with a little modification.
***Here is what I did*** Tested and it works on a per domain level.
[zimbra@mail conf]$ tail -20 main.cf
smtpd_tls_loglevel = 1
relayhost =
disable_dns_lookups = no
content_filter = smtp-amavis:[127.0.0.1]:10024
virtual_mailbox_maps = ldap:/opt/zimbra/conf/ldap-vmm.cf
version = 2.4.3.4z
mailq_path = /opt/zimbra/postfix-2.4.3.4z/sbin/mailq
header_checks = pcre:/opt/zimbra/conf/postfix_header_checks
smtpd_use_tls = yes
queue_directory = /opt/zimbra/postfix-2.4.3.4z/spool
newaliases_path = /opt/zimbra/postfix-2.4.3.4z/sbin/newaliases
smtpd_reject_unlisted_recipient = yes
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_tls_key_file = /opt/zimbra/conf/smtpd.key
command_directory = /opt/zimbra/postfix-2.4.3.4z/sbin
smtpd_sasl_auth_enable = yes
sender_dependent_relayhost_maps = hash:/opt/zimbra/postfix/conf/sender_relay
recipient_bcc_maps = pcre:/opt/zimbra/postfix/conf/recipient_bcc.pcre
sender_bcc_maps = pcre:/opt/zimbra/postfix/conf/sender_bcc.pcre
/opt/zimbra/postfix/conf/sender_relay:
@domain-a.com smtpdhost1
@domain-b.com smtpdhost2
***Make sure you hash the sender_relay after adding rules.
$postmap hash:/opt/zimbra/postfix/conf/sender_relay
[zimbra@mail conf]$ ls -ltr sender_rel*
-rw-r----- 1 zimbra zimbra 52 Oct 31 10:26 sender_relay
-rw-r----- 1 zimbra zimbra 12288 Oct 31 10:35 sender_relay.db
also see
How to use sender_dependent_relayhost_maps in master.cf - ReadList.com