Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

Explore the world of seamless email management with Zimbra Mail on Linux! Our blog delves into a step-by-step guide on harnessing the potential of Linux commands, providing easy-to-follow how-tos, and unlocking the magic of Bash scripting. Simplify your email administration journey and enhance your skills with our insightful tips and tricks.

Zimbra 8.6 restrict to user sending mail to certain domain

Zimbra 8.6 restrict to user sending mail to certain domain


How to restrict to user sending mail to certain domain. To configure on zimbra mta.







Step 1: To add lines in file /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf as bellow:
#vi /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf
Adding lines the top as following:
check_sender_access lmdb:/opt/zimbra/postfix/conf/restricted_senders
Step 2: To add lines in file /opt/zimbra/conf/zmconfigd.cf
vim /opt/zimbra/conf/zmconfigd.cf
Adding the lines following before RESTART mta.
POSTCONF smtpd_restriction_classes local_only
    POSTCONF local_only FILE postfix_check_recipient_access.cf
    RESTART mta

Step 3: To create file "/opt/zimbra/conf/postfix_check_recipient_access.cf"
vi /opt/zimbra/conf/postfix_check_recipient_access.cf
Adding the lines following:
check_recipient_access lmdb:/opt/zimbra/postfix/conf/local_domains, reject
Step 4: To create file "/opt/zimbra/postfix/conf/restricted_senders" and list all user whom you restrict.
vi /opt/zimbra/postfix/conf/restricted_senders
Adding the lines following:
[email protected]            local_only
If you restricting all users in domain.
yourdomain.com            local_only
Step 5: To create file “/opt/zimbra/postfix/conf/local_domains” to list all domain where restrict to user sending mail.
vi /opt/zimbra/postfix/conf/local_domains
Adding the lines following:
yourdomain.com                     OK
otheralloweddomain.com      OK
Step 6: Run command the below to apply.
postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains
zmmtactl stop
zmmtactl start
*Note: I’m not survive when you upgrade system. Before upgrade you backup the configrue
If you undo this configure.
#postconf -e smtpd_restriction_classes=' '
#zmmtactl reload
Source: https://wiki.zimbra.com/wiki/Restrict_users_to_certain_domain 

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com

1 Comments :

is it possible to have multiple rules for the blokcing? example: 1st config has useer1 & user2 and can only send to gmail.com; 2nd config has user3 & useer4 and can only send to yahoo.com

Relay

This Blog is protected by DMCA.com