<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Sender_recipient_restriction_in_zimbra</id>
	<title>Sender recipient restriction in zimbra - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Sender_recipient_restriction_in_zimbra"/>
	<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Sender_recipient_restriction_in_zimbra&amp;action=history"/>
	<updated>2026-07-25T11:43:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Sender_recipient_restriction_in_zimbra&amp;diff=1498&amp;oldid=prev</id>
		<title>Abhinav at 05:18, 19 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Sender_recipient_restriction_in_zimbra&amp;diff=1498&amp;oldid=prev"/>
		<updated>2013-11-19T05:18:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:18, 19 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l128&quot;&gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 128:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  postmap /opt/zimbra/postfix/conf/restricted_senders&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  postmap /opt/zimbra/postfix/conf/restricted_senders&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       postmap /opt/zimbra/postfix/conf/local_domains  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       postmap /opt/zimbra/postfix/conf/local_domains&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; vim  /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       zmmtactl stop&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       zmmtactl stop&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       zmmtactl start  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       zmmtactl start  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Abhinav</name></author>
	</entry>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Sender_recipient_restriction_in_zimbra&amp;diff=1497&amp;oldid=prev</id>
		<title>Abhinav: Created page with &quot;Category:Zimbra                                       Restrict Recipient In Zimbra     This will show how you can modify postfix to restrict who can send and receive to ce...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Sender_recipient_restriction_in_zimbra&amp;diff=1497&amp;oldid=prev"/>
		<updated>2013-11-19T05:11:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:Zimbra&quot; title=&quot;Category:Zimbra&quot;&gt;Category:Zimbra&lt;/a&gt;                                       Restrict Recipient In Zimbra     This will show how you can modify postfix to restrict who can send and receive to ce...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Zimbra]]&lt;br /&gt;
&lt;br /&gt;
                                     Restrict Recipient In Zimbra&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will show how you can modify postfix to restrict who can send and receive to certain addresses in your domain&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Create a &amp;#039;permitted senders&amp;#039; list (as user zimbra) - This is your list of domains and/or users who can email your protected email addresses: &lt;br /&gt;
&lt;br /&gt;
 vi /opt/zimbra/postfix/conf/permitted_senders&lt;br /&gt;
&lt;br /&gt;
 localhost               OK&lt;br /&gt;
 rockmanindustries.com            OK&lt;br /&gt;
 zimbramail.rockmanindustries.com     OK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Create a &amp;#039;protected recipients&amp;#039; list (as user zimbra) - This is your list of email addresses that may only receive email from &amp;#039;permitted senders&amp;#039; &lt;br /&gt;
 vi /opt/zimbra/postfix/conf/protected_recipients&lt;br /&gt;
 test-dist-list@rockmanindustries.com        permitted_senders_list&lt;br /&gt;
 protected-user@rockmanindustries.com         permitted_senders_list&lt;br /&gt;
&lt;br /&gt;
	Create a simple bash script to create postfix DB files (as user zimbra): &lt;br /&gt;
 vi /opt/zimbra/postfix/conf/update_protected_recipients&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo &amp;quot;rebuild permitted_senders...&amp;quot;&lt;br /&gt;
 postmap /opt/zimbra/postfix/conf/permitted_senders&lt;br /&gt;
 echo &amp;quot;rebuild protected_recipients...&amp;quot;&lt;br /&gt;
 postmap /opt/zimbra/postfix/conf/protected_recipients&lt;br /&gt;
&lt;br /&gt;
	Make new script executable, &lt;br /&gt;
 chmod 755 /opt/zimbra/postfix/conf/update_protected_recipients&lt;br /&gt;
&lt;br /&gt;
	then run it... &lt;br /&gt;
  /opt/zimbra/postfix/conf/update_protected_recipients&lt;br /&gt;
&lt;br /&gt;
	You should now see permitted_senders.db and protected_recipients.db in the directory &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
� Add necessary settings to /opt/zimbra/postfix/conf/main.cf &lt;br /&gt;
	vi /opt/zimbra/postfix/conf/main.cf&lt;br /&gt;
 [add these items to the file - note permitted_senders_list must match value in protected_recipients&lt;br /&gt;
 permitted_senders_list = check_sender_access hash:/opt/zimbra/postfix/conf/permitted_senders, reject&lt;br /&gt;
 smtpd_restriction_classes = permitted_senders_list&lt;br /&gt;
&lt;br /&gt;
 **Note this change to the main.cf won&amp;#039;t survive upgrades. Be sure to save a copy of your main.cf file**&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 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 &amp;quot;permit&amp;quot;, THE ORDER IN WHICH ITEMS APPEAR HERE IS IMPORTANT (if it appears after the &amp;quot;permit&amp;quot;, mail will always be accepted for the restricted recipient): &lt;br /&gt;
&lt;br /&gt;
 smtpd_recipient_restrictions = check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients, (rest of line here)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Now add your new restriction to the top of  smtpd_recipient_restrictions.cf&lt;br /&gt;
&lt;br /&gt;
 vi /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf &lt;br /&gt;
&lt;br /&gt;
 [paste this into the first line of the file, above any other settings] &lt;br /&gt;
&lt;br /&gt;
 check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients&lt;br /&gt;
&lt;br /&gt;
	Edit /opt/zimbra/conf/zmconfigd.cf and then remove the following line; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf&lt;br /&gt;
&lt;br /&gt;
 postfix reload&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Note: Test It on one user that only localdomain mails is deliver to user mailbox    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
� Restricting users to send mails to certain domains&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Vi /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf&lt;br /&gt;
&lt;br /&gt;
 check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	vi /opt/zimbra/conf/zmconfigd.cf &lt;br /&gt;
&lt;br /&gt;
 Find the section labeled SECTION mta and enter the following two lines directly below&lt;br /&gt;
 POSTCONF    smtpd_restriction_classes      local_only , permitted_sender_list&lt;br /&gt;
 POSTCONF    local_only                                 FILE  postfix_check_recipient_access.cf&lt;br /&gt;
&lt;br /&gt;
	Create a file &amp;quot;/opt/zimbra/conf/postfix_check_recipient_access.cf&amp;quot; &lt;br /&gt;
&lt;br /&gt;
	vi /opt/zimbra/conf/postfix_check_recipient_access.cf&lt;br /&gt;
&lt;br /&gt;
 check_recipient_access hash:/opt/zimbra/postfix/conf/local_domains, reject&lt;br /&gt;
&lt;br /&gt;
	Create a file &amp;quot;/opt/zimbra/postfix/conf/restricted_senders&amp;quot; and list all the users, whom you want to restrict. Follow this syntax: &lt;br /&gt;
&lt;br /&gt;
	vi /opt/zimbra/postfix/conf/restricted_senders&lt;br /&gt;
&lt;br /&gt;
      user@rockmanindustries.com            local_only&lt;br /&gt;
&lt;br /&gt;
	Create a file &amp;quot;/opt/zimbra/postfix/conf/local_domains&amp;quot; and list all the domains where &amp;quot;restricted users&amp;quot; allowed to sent mails. Please follow this syntax: &lt;br /&gt;
 vi /opt/zimbra/postfix/conf/local_domains&lt;br /&gt;
&lt;br /&gt;
      rockmanindustries.com                OK &lt;br /&gt;
      otheralloweddomain.com      OK&lt;br /&gt;
&lt;br /&gt;
	Run following commands: &lt;br /&gt;
 postmap /opt/zimbra/postfix/conf/restricted_senders&lt;br /&gt;
&lt;br /&gt;
      postmap /opt/zimbra/postfix/conf/local_domains &lt;br /&gt;
      zmmtactl stop&lt;br /&gt;
&lt;br /&gt;
      zmmtactl start &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
�&lt;/div&gt;</summary>
		<author><name>Abhinav</name></author>
	</entry>
</feed>