How to blacklist or Whitelist IP address/Hostname in zimbra
Many clients use RBLs to block spammers from flooding their MTAs with spam. Unfortunately, perfectly valid sites occasionally end up on these lists. With ZCS 8.5 and later, it is possible to create an on-disk database map that allows the client to whitelist specific blacklisted IPs so that emails from those IPs still get delivered.
To whitelist Edit file /opt/zimbra/conf/postfix_rbl_override and below parameter
1.2.3.4 OK
Now run postmap to apply changes in postfix
$postmap /opt/zimbra/conf/postfix_rbl_override
For zimbra 8.5, 8.6
$zmprov mcf +zimbraMtaRestriction 'check_client_access lmdb:/opt/zimbra/conf/postfix_rbl_override'
To blacklist Edit file /opt/zimbra/conf/postfix_blacklist . Add IP address SPACE REJECT to the file
1.2.3.4 REJECT
Run postmap command
$ postmap /opt/zimbra/conf/postfix_blacklist
For zimbra 8.5, 8.6
$zmprov mcf +zimbraMtaRestriction 'check_client_access lmdb:/opt/zimbra/conf/postfix_blacklist'
Restart service
$ zmmtactl restart