Restict Outgoing Mails

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
pandiyanmaruthu
Posts: 19
Joined: Thu Sep 01, 2016 9:57 am

Restict Outgoing Mails

Post by pandiyanmaruthu »

Hello Team,

Is it possible to restrict sending mails to the gmail for all users zimbra. Except Gmail we need to send emails to other domains.
fbzimblet
Advanced member
Advanced member
Posts: 119
Joined: Sun Apr 17, 2016 4:15 pm

Re: Restict Outgoing Mails

Post by fbzimblet »

you can blacklist gmail domains
iomarmochtar
Posts: 41
Joined: Sat Sep 13, 2014 3:54 am
Location: Indonesia
Contact:

Re: Restict Outgoing Mails

Post by iomarmochtar »

These following steps is for blocking gmail.com as recipient.

(run as zimbra user)
- Edit recipient restriction file

Code: Select all

vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
- Add this line before permit_sasl_authenticated

Code: Select all

check_recipient_access lmdb:/opt/zimbra/conf/reject_list
note: you may change lmdb with hash if you are using old zimbra version

- Edit reject list file with domain/user that you want to block as recipient

Code: Select all

vim /opt/zimbra/conf/reject_list

Code: Select all

gmail.com REJECT
- create db file for reject list file

Code: Select all

postmap /opt/zimbra/conf/reject_list
- Reload zimbra mta service

Code: Select all

zmmtactl reload 
Post Reply