Restrict account from sending emails to all domains: Difference between revisions

(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Restrict account from sending emails to all domains=
=Restrict account from sending emails to all domains=
{{KB|{{ZC}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}|}}
{{KB|{{ZC}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}|}}
 
{{WIP}}
==Problem==
==Problem==
<br />
<br />
Line 26: Line 26:
4)  
4)  
  postmap /opt/zimbra/postfix/conf/restrict_recipients  
  postmap /opt/zimbra/postfix/conf/restrict_recipients  
 
5) In the file /opt/zimbra/conf/zmconfigd.cf, find the "SECTION mta DEPENDS amavis", and enter the following before the "RESTART mta" line:
5) In the file /opt/zimbra/conf/zmconfigd.cf, find the "SECTION mta DEPENDS amavis", and enter the following before the "RESTART mta" line:


Line 34: Line 34:
  POSTCONF restrict_sender FILE postfix_restrict_sender.cf  
  POSTCONF restrict_sender FILE postfix_restrict_sender.cf  


echo "check_recipient_access lmdb:/opt/zimbra/conf/sender_recipients, reject" >> postfix_restrict_sender.cf
6) Enter the line below at the top of the /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf file.
 
  check_sender_access lmdb:/opt/zimbra/conf/restrict_senders
6) Enter the line below at the top of the smtpd_sender_restrictions.cf file.
vim /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf  
  check_sender_access lmdb:/opt/zimbra/conf/restrict_senders  


7)  
7)  
Line 44: Line 41:
Enter these two lines  
Enter these two lines  
  smtpd_restriction_classes = restrict_sender  
  smtpd_restriction_classes = restrict_sender  
  restrict_senderl = check_recipient_access lmdb:/opt/zimbra/conf/sender_recipients, reject  
  restrict_sender = check_recipient_access lmdb:/opt/zimbra/conf/sender_recipients, reject  


8)  
8)  
Line 51: Line 48:


9)  
9)  
  zmmtactl restart  
  zmmtactl restart
 


==Additional Information==
==Additional Information==

Revision as of 19:38, 27 December 2017

Restrict account from sending emails to all domains

   KB 22722        Last updated on 2017-12-27  




0.00
(0 votes)

Problem


How to restrict a single account from sending emails to all domains.

Resolution


Steps:

1) Specify the account for which the restriction is applied.

echo "test@example.com restrict_sender" > /opt/zimbra/postfix/conf/restict_senders 

Note: If you would like to restrict all users of a domain, enter the domainname instead of email ids. For example:

echo "yourdomain.com restrict_sender" > /opt/zimbra/postfix/conf/restict_senders  

2)

postmap /opt/zimbra/postfix/conf/restict_senders

3) Create a blank file in which no domain name is specified.

touch /opt/zimbra/postfix/conf/restrict_recipients 

4)

postmap /opt/zimbra/postfix/conf/restrict_recipients 

5) In the file /opt/zimbra/conf/zmconfigd.cf, find the "SECTION mta DEPENDS amavis", and enter the following before the "RESTART mta" line:

vi /opt/zimbra/conf/zmconfigd.cf

Enter the lines

POSTCONF smtpd_restriction_classes restrict_sender 
POSTCONF restrict_sender FILE postfix_restrict_sender.cf 

6) Enter the line below at the top of the /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf file.

check_sender_access lmdb:/opt/zimbra/conf/restrict_senders

7)

vim /opt/zimbra/postfix/conf/main.cf 

Enter these two lines

smtpd_restriction_classes = restrict_sender 
restrict_sender = check_recipient_access lmdb:/opt/zimbra/conf/sender_recipients, reject 

8)

cd /opt/zimbra/conf 
echo "check_recipient_access lmdb:/opt/zimbra/conf/sender_recipients, reject" >> postfix_restrict_sender.cf 

9)

zmmtactl restart

Additional Information


Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 06/07/2016
Article ID: https://wiki.zimbra.com/index.php?title=Restrict_account_from_sending_emails_to_all_domains Date Modified: 2017-12-27



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 COPY EDITOR Last edit by Heera Singh Koranga
Jump to: navigation, search