Restricting Users to Send mails to Certain Domains on Zimbra 8.5
1. Open file /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf and add this line at the top
check_sender_access lmdb:/opt/zimbra/postfix/conf/restricted_senders
2. Open file /opt/zimbra/conf/zmconfigd.cf and add those lines before RESTART mta. This is example on my system
POSTCONF smtpd_restriction_classes local_only
POSTCONF local_only FILE postfix_check_recipient_access.cf
RESTART mta
3. Create a file /opt/zimbra/conf/postfix_check_recipient_access.cf and add the following line
check_recipient_access lmdb:/opt/zimbra/postfix/conf/local_domains, reject
4. Create a file “/opt/zimbra/postfix/conf/restricted_senders” and list all the users, whom you want to restrict. Follow this syntax:
user@yourdomain.com local_only
5. Create a file “/opt/zimbra/postfix/conf/local_domains” and list all the domains where “restricted users” allowed to sent mails. Please follow this syntax:
yourdomain.com OK
otheralloweddomain.com OK
6. Run following commands
postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains
zmmtactl stop
zmmtactl start
Please try to sending email to allowed domain and not allowed domain. If you insert new user on number 4 or new domain on number 5, don’t forget to running again number 6.
Comments
Post a Comment