<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://iredmail.org/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist - Revision history</title>
		<link>http://iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5</generator>
		<lastBuildDate>Fri, 24 May 2013 16:31:25 GMT</lastBuildDate>
		<item>
			<title>ZhangHuangbin at 03:33, 12 September 2011</title>
			<link>http://iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist&amp;diff=1833&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:33, 12 September 2011&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Solution =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Solution =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; 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 colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Note: You can easily manage per-user whitelist/blacklist with iRedAdmin-Pro admin panel. Screenshot: [http://screenshots.iredmail.googlecode.com/hg/iredadmin/user_profile_restrictions.png]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; 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='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is per-user black/whitelist, implemented in iRedAPD - a postfix policy server.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is per-user black/whitelist, implemented in iRedAPD - a postfix policy server.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;mailWhitelistRecipient: user@test.com&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;mailWhitelistRecipient: user@test.com&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;You can easily manage per-user whitelist/blacklist with iRedAdmin-Pro admin panel. Screenshot:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://screenshots.iredmail.googlecode.com/hg/iredadmin/user_profile_restrictions.png]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2013-05-24 16:31:25 --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 12 Sep 2011 03:33:57 GMT</pubDate>			<dc:creator>ZhangHuangbin</dc:creator>			<comments>http://iredmail.org/wiki/index.php?title=Talk:IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist</comments>		</item>
		<item>
			<title>ZhangHuangbin:&amp;#32;/* Solution */</title>
			<link>http://iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist&amp;diff=1832&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:32, 12 September 2011&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You can easily manage per-user whitelist/blacklist with iRedAdmin-Pro admin panel. Screenshot:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You can easily manage per-user whitelist/blacklist with iRedAdmin-Pro admin panel. Screenshot:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;http://screenshots.iredmail.googlecode.com/hg/iredadmin/user_profile_restrictions.png&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;http://screenshots.iredmail.googlecode.com/hg/iredadmin/user_profile_restrictions.png&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2013-05-24 16:31:25 --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 12 Sep 2011 03:32:49 GMT</pubDate>			<dc:creator>ZhangHuangbin</dc:creator>			<comments>http://iredmail.org/wiki/index.php?title=Talk:IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist</comments>		</item>
		<item>
			<title>ZhangHuangbin:&amp;#32;Created page with '= Question = How to achieve below restrictions in iRedMail with OpenLDAP backend? * User B can send emails only to given domains and its sub domains (eg. example.com, test.com), …'</title>
			<link>http://iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist&amp;diff=1831&amp;oldid=prev</link>
			<description>&lt;p&gt;Created page with &amp;#39;= Question = How to achieve below restrictions in iRedMail with OpenLDAP backend? * User B can send emails only to given domains and its sub domains (eg. example.com, test.com), …&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Question =&lt;br /&gt;
How to achieve below restrictions in iRedMail with OpenLDAP backend?&lt;br /&gt;
* User B can send emails only to given domains and its sub domains (eg. example.com, test.com), can receive emails from any domain.&lt;br /&gt;
* User C can send and receive emails only to &amp;amp; from given domains and its sub doamins (eg. example.com, test.com)&lt;br /&gt;
* User D can send and receive emails only to &amp;amp; from given email addresses. (eg. admin@example.com, user@test.com)&lt;br /&gt;
&lt;br /&gt;
= Solution =&lt;br /&gt;
This is per-user black/whitelist, implemented in iRedAPD - a postfix policy server.&lt;br /&gt;
&lt;br /&gt;
*) Make sure you have iRedAPD enabled in Postfix. It's enabled by default since iRedMail-0.7.0.&lt;br /&gt;
{{cfg|/etc/postfix/main.cf|&amp;lt;pre&amp;gt;&lt;br /&gt;
smtpd_recipient_restrictions = ..., check_policy_server inet:127.0.0.1:7777, permit_mynetworks, ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
*) Make sure you have plugin 'block_amavisd_blacklisted_senders' enabled in /opt/iredapd/etc/iredapd.ini:&lt;br /&gt;
{{cfg|/opt/iredapd/etc/iredapd.ini|&amp;lt;pre&amp;gt;&lt;br /&gt;
[ldap]&lt;br /&gt;
...&lt;br /&gt;
plugins = block_amavisd_blacklisted_senders, ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
It's now ready to configure per-user blacklist/whitelist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Question: User B can send emails only to given domains and its sub domains (eg. example.com, test.com), can receive emails from any domain.&lt;br /&gt;
&lt;br /&gt;
Add below LDAP attributes/values in LDAP server for user B:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mailBlacklistRecipient: @.          # &amp;lt;-- Reject mails sent to all accounts.&lt;br /&gt;
mailWhitelistRecipient: @.example.com          # &amp;lt;-- Bypass mails sent to domain &amp;quot;example.com&amp;quot; and its sub-domains.&lt;br /&gt;
mailWhitelistRecipient: @.test.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Question: User C can send and receive emails only to &amp;amp; from given domains and its sub doamins (eg. example.com, test.com)&lt;br /&gt;
&lt;br /&gt;
Add below LDAP attributes/values in LDAP server for user C:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
amavisBlacklistSender: @.          # &amp;lt;-- Reject mails sent FROM all accounts.&lt;br /&gt;
amavisWhitelistSender: @.example.com   # &amp;lt;-- Bypass mails sent FROM domain 'example.com' and its sub-domains.&lt;br /&gt;
amavisWhitelistSender: @.test.com&lt;br /&gt;
&lt;br /&gt;
mailBlacklistRecipient: @.          # &amp;lt;-- Reject mails sent to all accounts.&lt;br /&gt;
mailWhitelistRecipient: @.example.com          # &amp;lt;-- Bypass mails sent to domain &amp;quot;example.com&amp;quot; and its sub-domains.&lt;br /&gt;
mailWhitelistRecipient: @.test.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* User D can send and receive emails only to &amp;amp; from given email addresses. (eg. admin@example.com, user@test.com)&lt;br /&gt;
&lt;br /&gt;
Add below LDAP attributes/values in LDAP server for user C:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
amavisBlacklistSender: @.          # &amp;lt;-- Reject mails sent FROM all accounts.&lt;br /&gt;
amavisWhitelistSender: admin@example.com   # &amp;lt;-- Bypass mails sent FROM user 'admin@example.com'&lt;br /&gt;
amavisWhitelistSender: user@test.com&lt;br /&gt;
&lt;br /&gt;
mailBlacklistRecipient: @.          # &amp;lt;-- Reject mails sent to all accounts.&lt;br /&gt;
mailWhitelistRecipient: admin@example.com          # &amp;lt;-- Bypass mails sent to user 'admin@example.com'&lt;br /&gt;
mailWhitelistRecipient: user@test.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily manage per-user whitelist/blacklist with iRedAdmin-Pro admin panel. Screenshot:&lt;br /&gt;
http://screenshots.iredmail.googlecode.com/hg/iredadmin/user_profile_restrictions.png&lt;/div&gt;</description>
			<pubDate>Mon, 12 Sep 2011 03:30:44 GMT</pubDate>			<dc:creator>ZhangHuangbin</dc:creator>			<comments>http://iredmail.org/wiki/index.php?title=Talk:IRedMail/FAQ/LDAP/Per-user.Whitelist.Blacklist</comments>		</item>
	</channel>
</rss>