How to restrict users to send mail locally in zimbra

HOW TO RESTRICT MAIL USERS TO SEND MAIL LOCALLY IN ZIMBRA

How to restrict users to send mail locally in zimbra

This is document can fellow all version of ZCS8.X.X

1:Open smtpd_recipient_restrictions.cf file and add below line

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

2) Open zmconfigd.cf file and Search “SECTION mta” past just below

vim /opt/zimbra/conf/zmconfigd.cf
POSTCONF smtpd_restriction_classes local_only
POSTCONF local_only FILE postfix_check_recipient_access.cf

3) Create below file add below context,

vim /opt/zimbra/conf/postfix_check_recipient_access.cf
check_recipient_access lmdb:/opt/zimbra/postfix/conf/local_domains, reject

 

4) Create a file restricted_senders” and list all the users, whom you want to restrict.

vim /opt/zimbra/postfix/conf/restricted_senders
[email protected] local_only
[email protected] local_only

 

5) Create a file “local_domains” and list all the domains where “restricted users” allowed to sent mails

vim /opt/zimbra/postfix/conf/local_domains
mydomain.com OK

6) Run below commands to update and load new Postfix database,

postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains 
zmmtactl stop 
zmmtactl start
Important Note if you need to undo above configuration,incase of failure

Remove the two lines that were added to the /opt/zimbra/conf/zmconfigd.cf file. Make sure the Postfix setting smtpd_restriction_classes has nothing set.

postconf -e smtpd_restriction_classes=' '
zmmtactl reload

For more information: Use:https://wiki.zimbra.com/wiki/New_Features_ZCS_8.5#Domain_level_disclaimer_support

One comment

  • hello,

    In step 1 is it (vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf) or

    In forum they given sender restrictions.
    (vim /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf)

Leave a Reply

Your email address will not be published. Required fields are marked *