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

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

Comments

Popular posts from this blog

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Error "Unable to retrive Zimbra GPG key for package validation"