Jump to content

Category:Zimbra/Restricting users to send mails to certain domains

From TetraWiki
Revision as of 11:49, 3 January 2013 by Deepak (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Restricting users to send mails to certain domains

Headline text[edit]

1. Enter following in the file “/opt/zimbra/conf/postfix_recipient_restrictions.cf”. Make sure it is entered at the top of the file.

vi /opt/zimbra/conf/postfix_recipient_restrictions.cf
check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders 


2. Enter following in "/opt/zimbra/conf/zmmta.cf"

vi /opt/zimbra/conf/zmmta.cf
 ###Find the section labeled SECTION mta and enter the following two lines directly below####
POSTCONF    smtpd_restriction_classes      local_only
POSTCONF    local_only                                 FILE  postfix_check_recipient_access.cf


3. Create a file "/opt/zimbra/conf/postfix_check_recipient_access.cf"

vi /opt/zimbra/conf/postfix_check_recipient_access.cf

check_recipient_access hash:/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:

vi /opt/zimbra/postfix/conf/restricted_senders

(all users in tipl domain) 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:

vi /opt/zimbra/postfix/conf/local_domains

domain.com OK


6. Run following commands:

postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains 
zmmtactl stop 
zmmtactl start


After these settings, all the users listed in "/opt/zimbra/postfix/conf/restricted_senders" are restricted to send mails only to domain which are defined in "/opt/zimbra/postfix/conf/local_domains".

This category currently contains no pages or media.