How to Restrict users sending to certain users/Domains Zimbra 8.6 on Ubuntu (Server) 14.04 LTS Step-by-Step
This document describes how to restrict a list of users for sending emails to limited domains. Other users can send mails anywhere. All steps I am doing here as Zimbra user. These steps are verified on ZCS 8.x or newer.
You have to be logged in as a root.
If you can open file you can set full permission with the following command as root
Step 1 – Set permission as rootroot@mail:/# chmod 777 /opt/nameoffile
Step 2 – You must work as zimbra user.root@mail:/# su – zimbra
Step 3 – Enter in file /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf this line check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senderszimbra@mail:~$ nano /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
Step 4 – Your file look like as this:zimbra@mail:~$ chmod 775 /opt/zimbra/conf/zmconfigd.cf
Step 6 – Then and add those lines before RESTART mta.POSTCONF smtpd_restriction_classes local_only POSTCONF local_only FILE postfix_check_recipient_access.cf
Step 7 – Your file look like as this:zimbra@mail:~$ nano /opt/zimbra/conf/postfix_check_recipient_access.cf
Step 9 – Execute the following nano /opt/zimbra/conf/postfix_check_recipient_access.cf command and add all the users, whom you want to restrict. Follow this syntax:test@yourdomain local_only
Step 10 – Execute the following nano /opt/zimbra/postfix/conf/local_domains command and add all the domains, whom you want to allow to sending mail. Follow this syntax:yourdomain OK
Step 11 – For the changes to take effect execute the following commands:zimbra@mail:~$ postmap /opt/zimbra/postfix/conf/restricted_senders zimbra@mail:~$ postmap /opt/zimbra/postfix/conf/local_domains
If you insert new user or new domain don’t forget to running again number 11.Step 12 – Restart service.
zimbra@mail:~$ zmmtactl stop zimbra@mail:~$ zmmtactl start
Step 13 – When you attempt to sending mail from not allowed user you will see this.
Comments
Post a Comment