Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Sender recipient restriction in zimbra
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Zimbra]] Restrict Recipient In Zimbra This will show how you can modify postfix to restrict who can send and receive to certain addresses in your domain Steps Create a 'permitted senders' list (as user zimbra) - This is your list of domains and/or users who can email your protected email addresses: vi /opt/zimbra/postfix/conf/permitted_senders localhost OK rockmanindustries.com OK zimbramail.rockmanindustries.com OK Create a 'protected recipients' list (as user zimbra) - This is your list of email addresses that may only receive email from 'permitted senders' vi /opt/zimbra/postfix/conf/protected_recipients test-dist-list@rockmanindustries.com permitted_senders_list protected-user@rockmanindustries.com permitted_senders_list Create a simple bash script to create postfix DB files (as user zimbra): vi /opt/zimbra/postfix/conf/update_protected_recipients #!/bin/bash echo "rebuild permitted_senders..." postmap /opt/zimbra/postfix/conf/permitted_senders echo "rebuild protected_recipients..." postmap /opt/zimbra/postfix/conf/protected_recipients Make new script executable, chmod 755 /opt/zimbra/postfix/conf/update_protected_recipients then run it... /opt/zimbra/postfix/conf/update_protected_recipients You should now see permitted_senders.db and protected_recipients.db in the directory � Add necessary settings to /opt/zimbra/postfix/conf/main.cf vi /opt/zimbra/postfix/conf/main.cf [add these items to the file - note permitted_senders_list must match value in protected_recipients permitted_senders_list = check_sender_access hash:/opt/zimbra/postfix/conf/permitted_senders, reject smtpd_restriction_classes = permitted_senders_list **Note this change to the main.cf won't survive upgrades. Be sure to save a copy of your main.cf file** While in /opt/zimbra/postfix/conf/main.cf: You must also add the following snippet to smtpd_recipient_restrictions (first is preferred, otherwise anywhere before the last "permit", THE ORDER IN WHICH ITEMS APPEAR HERE IS IMPORTANT (if it appears after the "permit", mail will always be accepted for the restricted recipient): smtpd_recipient_restrictions = check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients, (rest of line here) Now add your new restriction to the top of smtpd_recipient_restrictions.cf vi /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf [paste this into the first line of the file, above any other settings] check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients Edit /opt/zimbra/conf/zmconfigd.cf and then remove the following line; # POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf postfix reload Note: Test It on one user that only localdomain mails is deliver to user mailbox � Restricting users to send mails to certain domains Vi /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders vi /opt/zimbra/conf/zmconfigd.cf Find the section labeled SECTION mta and enter the following two lines directly below POSTCONF smtpd_restriction_classes local_only , permitted_sender_list POSTCONF local_only FILE postfix_check_recipient_access.cf 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 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 user@rockmanindustries.com local_only 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 rockmanindustries.com OK otheralloweddomain.com OK Run following commands: postmap /opt/zimbra/postfix/conf/restricted_senders postmap /opt/zimbra/postfix/conf/local_domains vim /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders zmmtactl stop zmmtactl start �
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)