how to restrict all users to local domain?

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
phphy
Posts: 2
Joined: Fri Sep 19, 2014 2:09 am

how to restrict all users to local domain?

Post by phphy »

The wiki article [View:http://wiki.zimbra.com/wiki/Restrict_us ... main:940:0] seems not work on Zimbra 8.5. how to solve this issue .


User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

how to restrict all users to local domain?

Post by jorgedlcruz »

Hi phphy,

We are trying right now and we will update the wiki soon!



Keep in touch



Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
phphy
Posts: 2
Joined: Fri Sep 19, 2014 2:09 am

how to restrict all users to local domain?

Post by phphy »

Thanks a lot.
User avatar
vavai
Advanced member
Advanced member
Posts: 174
Joined: Thu Nov 14, 2013 2:41 pm
Location: Indonesia
ZCS/ZD Version: 0
Contact:

how to restrict all users to local domain?

Post by vavai »

Hi Jorge,



Is there any update regarding this topic?



Vavai
imanudin11
Outstanding Member
Outstanding Member
Posts: 304
Joined: Sat Sep 13, 2014 2:23 am
ZCS/ZD Version: Release 8.8.15.GA.3829.UBUNTU16.64
Contact:

how to restrict all users to local domain?

Post by imanudin11 »

Hi phphy,
I have been testing on my environment and working great. This is how to apply it
Do the following command as user Zimbra
1. Open file /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf and add this line below reject_non_fqdn_recipient. This is example on my system
permit_sasl_authenticated
check_sender_access lmdb:/opt/zimbra/postfix/conf/restricted_senders
permit_mynetworks

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

Now, you can test to sending email to allow domain and not allow. If you add another user to /opt/zimbra/postfix/conf/restricted_senders, don't forget to running again point 6. I also has been test on my production system and works :D
**

Best Regards,
Ahmad Imanudin - Sharing is Beautiful !
Personal Blog [EN] :http://www.imanudin.net
drdre
Outstanding Member
Outstanding Member
Posts: 411
Joined: Fri Sep 12, 2014 10:43 pm

how to restrict all users to local domain?

Post by drdre »

is it possible to do the reverse as well ?? as in restrict certain users from receiving external emails ?
imanudin11
Outstanding Member
Outstanding Member
Posts: 304
Joined: Sat Sep 13, 2014 2:23 am
ZCS/ZD Version: Release 8.8.15.GA.3829.UBUNTU16.64
Contact:

how to restrict all users to local domain?

Post by imanudin11 »

Hi drdre,



I am have not testing about that. But, you can try using CBPolicyD at this guidance : http://imanudin.net/2014/09/29/how-to-r ... h-policyd/
**

Best Regards,
Ahmad Imanudin - Sharing is Beautiful !
Personal Blog [EN] :http://www.imanudin.net
Post Reply