Zimbra 8 restrict sending to external domains

vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders

NExt

vim /opt/zimbra/conf/zmconfigd.cf

Search for “SECTION mta” and append directly under

    POSTCONF    smtpd_restriction_classes      local_only
    POSTCONF    local_only      FILE  postfix_check_recipient_access.cf

so it should now look like:

SECTION mta DEPENDS amavis
    POSTCONF    smtpd_restriction_classes      local_only
    POSTCONF    local_only      FILE  postfix_check_recipient_access.cf

Next

vim /opt/zimbra/conf/postfix_check_recipient_access.cf
check_recipient_access hash:/opt/zimbra/postfix/conf/local_domains, reject
vim /opt/zimbra/postfix/conf/restricted_senders
user@mydomain.com            local_only
entiredomaintoblock.com      local_only

Create file for allowed domains

vim  /opt/zimbra/postfix/conf/local_domains
alloweddomain1.com      OK 
alloweddomain2.com      OK

Run the following commands to Restart Postfix mail system and stuff

postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains
zmmtactl stop 
zmmtactl start

You may also like...

Leave a Reply