Relay Tips Based on User/Domain Sender on Zimbra 8.5-8.6

On previous post, we can relay email based on user/domain receiver. But, on this guidance is reverse from previous post. ie the relay based on user/domain sender. Zimbra supported for multi domain. You can have many domain in one Zimbra server. I have condition where either domain cannot sending to some domains. For example, i have 2 domains in Zimbra server, domain1.com and domain2.com.
domain1.com can sending email to domain3.com but domain2.com cannot sending email to domain3.com. Whereas domain1.com and domain2.com are in one Zimbra server. it is rather strange indeed. For be able sending to domain3.com from domain2.com, i am decide to relay every sending email from domain2.com. For do that, i do the following guidance
# Add the following configuration in /opt/zimbra/postfix/conf/main.cf
 
sender_dependent_relayhost_maps = lmdb:/opt/zimbra/postfix/conf/bysender
# Create file above and adding users/domains would be relay

vi /opt/zimbra/postfix/conf/bysender
Fill as the following example
 
@domain2.com           [relay.example.com]
user1@domain1.com      [relay.example.com]
configuration above will do relay every sending email from @domain2.com and user1@domain1.com to relay server at relay.example.com
# Postmap file

postmap /opt/zimbra/postfix/conf/bysender
# Reload Postfix

postfix reload
Note : every add/delete users/domains in /opt/zimbra/postfix/conf/bysender, don’t forget to postmap and reload postfix
Good luck and hopefully useful

Nhận xét

Bài đăng phổ biến từ blog này

CLEANING UP THE ZABBIX DATABASE

Configuring DHCP Relay service on the FortiGate unit

WAN link load balancing