<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PolicyD Archives - Vavai&#039;s Personal Notes</title>
	<atom:link href="https://www.vavai.net/tag/policyd/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.vavai.net/tag/policyd/</link>
	<description>Life is our precious gift</description>
	<lastBuildDate>Wed, 12 Feb 2014 08:09:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Zimbra Tips : Delivery Restriction to Specific User/Distribution List With PolicyD</title>
		<link>https://www.vavai.net/zimbra-tips-delivery-restriction-to-specific-userdistribution-list-with-policyd/</link>
					<comments>https://www.vavai.net/zimbra-tips-delivery-restriction-to-specific-userdistribution-list-with-policyd/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Wed, 12 Feb 2014 08:09:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Distribution List]]></category>
		<category><![CDATA[Group List]]></category>
		<category><![CDATA[PolicyD]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1521</guid>

					<description><![CDATA[<p>Related tutorial : Zimbra Tips : Policyd &#38; Rate-Limit Sending Message Implementation On Zimbra 8 Zimbra Tips : Securing PolicyD Web Admin Zimbra Tips : Rate-Limit Sending Message With PolicyD Zimbra Tips : Enabling Accounting Module On PolicyD On previous tutorial, we&#8217;ve done the installation and configuration to restrict email sending per user by using...</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-delivery-restriction-to-specific-userdistribution-list-with-policyd/">Zimbra Tips : Delivery Restriction to Specific User/Distribution List With PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Related tutorial :</p>
<ol>
<li><a href="http://v2.vavai.net/2014/02/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/">Zimbra Tips : Policyd &amp; Rate-Limit Sending Message Implementation On Zimbra 8</a></li>
<li><span style="line-height: 1.5em;"><a href="http://v2.vavai.net/2014/02/zimbra-tips-how-to-secure-policyd-web-admin/">Zimbra Tips : Securing PolicyD Web Admin</a></span></li>
<li><span style="line-height: 1.5em;"><a href="http://v2.vavai.net/2014/02/zimbra-tips-rate-limit-sending-message-with-policyd/">Zimbra Tips : Rate-Limit Sending Message With PolicyD</a></span></li>
<li><a href="http://v2.vavai.net/2014/02/zimbra-tips-enabling-accounting-module-on-policyd/"><span style="line-height: 1.5em;">Zimbra Tips : Enabling Accounting Module On PolicyD</span></a></li>
</ol>
<p>On previous tutorial, we&#8217;ve done the installation and configuration to restrict email sending per user by using the quota module, enabling accounting module and securing web admin access. Here we will discuss another PolicyD modules to increase Zimbra mail security by using Access Control module. Access control module is used to perform the control of the user/domain rights, such as preventing user from receiving emails, sending emails and others restriction policy.<br />
<span id="more-1521"></span><br />
<span style="line-height: 1.5em;"><a href="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo2.png"><img decoding="async" class="alignleft  wp-image-1695" style="margin: 5px;" alt="policyd_logo" src="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo2.png" width="295" height="128" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo2.png 369w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo2-300x130.png 300w" sizes="(max-width: 295px) 100vw, 295px" /></a>On the production server, I&#8217;m using Access control module to determine which user is allowed to send an email to distribution list. By default, Zimbra distribution list or group list can receive email from anywhere. This can be dangerous because it could be a target  of spam attacks.</span><br />
Actually, the restriction on the distribution list can be done by doing a little bit of tuning on <a href="https://wiki.zimbra.com/wiki/RestrictPostfixRecipients">Postfix configuration</a>. By using PolicyD, those settings can be done easily, considering the presence of Policyd Web Admin for configuration.<br />
<strong>EXAMPLE SETTING</strong><br />
List of user/domain that allowed to send email to distribution list :</p>
<pre><code>vivianchow@excellent.co.id
zezevavai@excellent.co.id
vavai.net</code></pre>
<p>Distribution List :</p>
<pre><code>team-support@excellent.co.id
team-sales@excellent.co.id</code></pre>
<p><strong>POLICYD WEB ADMIN CONFIGURATION</strong><br />
Log in to the Web Admin PolicyD  : http://IpAddressZimbra:7780/webui/index.php. if you can not accessing PolicyD web admin, make sure Apache services is running on Zimbra. if apache service status in the stop state, start it by using the following command :</p>
<pre><code>su - zimbra
zmapachectl restart</code></pre>
<p>Once you logged in into web admin, select the <strong>Policy</strong> menu | <strong>Groups</strong> and then create a <strong>User_Allow</strong> group and <strong>Distribution_List</strong> and tall its members :<br />
<strong>Policy Group</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd1.jpg"><img fetchpriority="high" decoding="async" class="alignnone  wp-image-1688" alt="vavai-zimbra-restrict-recipient-by-using-policyd1" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd1.jpg" width="684" height="174" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd1.jpg 855w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd1-300x76.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd1-768x195.jpg 768w" sizes="(max-width: 684px) 100vw, 684px" /></a><br />
<strong>User_Allow Group Member</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd2.jpg"><img decoding="async" class="alignnone  wp-image-1689" alt="vavai-zimbra-restrict-recipient-by-using-policyd2" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd2.jpg" width="672" height="152" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd2.jpg 840w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd2-300x68.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd2-768x174.jpg 768w" sizes="(max-width: 672px) 100vw, 672px" /></a><br />
<strong>Distribution List Group Member</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd3.jpg"><img loading="lazy" decoding="async" class="alignnone  wp-image-1690" alt="vavai-zimbra-restrict-recipient-by-using-policyd3" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd3.jpg" width="670" height="154" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd3.jpg 837w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd3-300x69.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd3-768x176.jpg 768w" sizes="auto, (max-width: 670px) 100vw, 670px" /></a><br />
after all the group and its members is made,, create a Policy for the group. Select the <strong>Policies</strong> menu | <strong>Main</strong> then create a rule/policy with the same name distributionlist_allow and distributionlist_deny along with its members<br />
<strong>Main Policy</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd4.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1691" alt="vavai-zimbra-restrict-recipient-by-using-policyd4" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd4.jpg" width="844" height="147" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd4.jpg 844w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd4-300x52.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd4-768x134.jpg 768w" sizes="auto, (max-width: 844px) 100vw, 844px" /></a><br />
See that on  the above example, Priority is zero (0) and one (1). Priority is influential as well as the MX records in the DNS. The smaller priority means the most preferred usage in policy.<br />
<strong>Members of Main distributionlist_allow</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd5.jpg"><img loading="lazy" decoding="async" class="alignnone  wp-image-1692" alt="vavai-zimbra-restrict-recipient-by-using-policyd5" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd5.jpg" width="672" height="137" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd5.jpg 840w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd5-300x61.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd5-768x156.jpg 768w" sizes="auto, (max-width: 672px) 100vw, 672px" /></a><br />
<strong>Members of distributionlist_deny</strong><br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd6.jpg"><img loading="lazy" decoding="async" class="alignnone  wp-image-1693" alt="vavai-zimbra-restrict-recipient-by-using-policyd6" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd6.jpg" width="670" height="133" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd6.jpg 837w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd6-300x59.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd6-768x152.jpg 768w" sizes="auto, (max-width: 670px) 100vw, 670px" /></a><br />
The final stage is to control the policies that already been made. Select the <strong>Access Control</strong> | <strong>Configure</strong> and create 2 pieces of control like the example below :<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd7.jpg"><img loading="lazy" decoding="async" class="alignnone  wp-image-1694" alt="vavai-zimbra-restrict-recipient-by-using-policyd7" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd7.jpg" width="673" height="158" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd7.jpg 841w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd7-300x71.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-zimbra-restrict-recipient-by-using-policyd7-768x181.jpg 768w" sizes="auto, (max-width: 673px) 100vw, 673px" /></a><br />
Test the policies by  sending an email to distribution list using the banned user and the allowed user and check the result. Good luck and hopely this can be useful <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-delivery-restriction-to-specific-userdistribution-list-with-policyd/">Zimbra Tips : Delivery Restriction to Specific User/Distribution List With PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/zimbra-tips-delivery-restriction-to-specific-userdistribution-list-with-policyd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Tips : Enabling Accounting Module on PolicyD</title>
		<link>https://www.vavai.net/zimbra-tips-enabling-accounting-module-on-policyd/</link>
					<comments>https://www.vavai.net/zimbra-tips-enabling-accounting-module-on-policyd/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Tue, 11 Feb 2014 23:35:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PolicyD]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1532</guid>

					<description><![CDATA[<p>One of the modules provided by PolicyD is Accounting module. Accounting module has similar  function as the Quota module that performs the Message Count Limit Counter or Message Cumulative Size in email. The differences between them are in in the policy period. Accounting module divided into three periods : Daily, Weekly dan Monthly. One example of...</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-enabling-accounting-module-on-policyd/">Zimbra Tips : Enabling Accounting Module on PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="line-height: 1.5em;">One of the modules provided by PolicyD is Accounting module. Accounting module has similar  function as the Quota module that performs the Message Count Limit Counter or Message Cumulative Size in email. The differences between them are in in the policy period. Accounting module divided into three periods : Daily, Weekly dan Monthly. One example of the use of accounting module in PolicyD is to restrict sending mail from a particular user to a maximum of 100 thousand emails per month.</span><br />
Accounting module supported on PolicyD since version r343 (v2.1.0). This module supports message count and message cumulative size over a fixed period of time. Message counters can be based on (Tracked) depending on sender, recipient or sender IP.<br />
On previous tutorial : <a href="http://v2.vavai.net/2014/02/zimbra-tips-rate-limit-sending-message-with-policyd/">Zimbra Tips : Rate-Limit Sending Message With Policyd</a>, Accounting module is not activated by default. Below is a tutorial on the procedure for activation of the accounting module in PolicyD.<span id="more-1532"></span></p>
<p style="text-align: center;"><a href="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo.png"><img loading="lazy" decoding="async" class="size-medium wp-image-1515 aligncenter" alt="policyd_logo" src="http://v2.vavai.net/wp-content/uploads/2014/02/policyd_logo-300x130.png" width="300" height="130" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo-300x130.png 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo.png 369w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<pre><code>cd /opt/<span class="k85q5p8ll6d2" id="k85q5p8ll6d2_7">zimbra</span>/cbpolicyd/share/database/
./convert-tsql sqlite accounting.tsql &gt; /tmp/accounting.sql
vi /tmp/accounting.sql</code></pre>
<p>On accounting sql file, remove all line starting with hash/comment tag (#) and then save.<br />
Login as the Zimbra user and enable Accounting modules PolicyD</p>
<pre><code>su - zimbra
zmlocalconfig -e cbpolicyd_module_accounting=1
vi /opt/zimbra/conf/cbpolicyd.conf.in</code></pre>
<p>Edit the section &#8216;Modules to Load&#8217; to be like this :</p>
<pre><code># Modules to load
modules=&lt;</code></pre>
<p>and contents on the bottom gonna be like this :</p>
<pre><code>[AccessControl]
enable=@@cbpolicyd_module_accesscontrol@@
[Accounting]
enable=@@cbpolicyd_module_accounting@@
[Greylisting]
enable=@@cbpolicyd_module_greylisting@@
[CheckHelo]
enable=@@cbpolicyd_module_checkhelo@@
[CheckSPF]
enable=@@cbpolicyd_module_checkspf@@
[Quotas]
enable=@@cbpolicyd_module_quotas@@</code></pre>
<p>Inject the newly converted accounting database</p>
<pre><code>sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb &lt; /tmp/accounting.sql</code></pre>
<p>Restart Service PolicyD</p>
<pre><code>zmcbpolicydctl restart</code></pre>
<p>Next you can use the PolicyD web admin to enable accounting module and applying some restriction.</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-enabling-accounting-module-on-policyd/">Zimbra Tips : Enabling Accounting Module on PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/zimbra-tips-enabling-accounting-module-on-policyd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Tips : Rate-Limit Sending Message with PolicyD</title>
		<link>https://www.vavai.net/zimbra-tips-rate-limit-sending-message-with-policyd/</link>
					<comments>https://www.vavai.net/zimbra-tips-rate-limit-sending-message-with-policyd/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Sun, 09 Feb 2014 07:51:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PolicyD]]></category>
		<category><![CDATA[Rate-Limit]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1514</guid>

					<description><![CDATA[<p>Previous Article : Zimbra Tips : Installing &#38; Configuring PolicyD on Zimbra 8 Zimbra Tips : Securing PolicyD Web Admin After installing, configuring and securing PolicyD, we can apply some policy rule on PolicyD, such as setting up maximum number of emails that can be sent by any account in a certain time interval. For example, each...</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-rate-limit-sending-message-with-policyd/">Zimbra Tips : Rate-Limit Sending Message with PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Previous Article :</p>
<ol>
<li><a href="http://v2.vavai.net/2014/02/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/">Zimbra Tips : Installing &amp; Configuring PolicyD on Zimbra 8</a></li>
<li><a href="http://v2.vavai.net/2014/02/zimbra-tips-how-to-secure-policyd-web-admin/">Zimbra Tips : Securing PolicyD Web Admin</a></li>
</ol>
<p><span style="line-height: 1.5em;">After installing, configuring and securing PolicyD, we can apply some policy rule on PolicyD, such as setting up maximum number of emails that can be sent by any account in a certain time interval. For example, each user can only send a maximum of 300 emails per hour, so if there are some compromised account they cannot send email beyond the limit.</span></p>
<p style="text-align: center;"><a href="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo.png"><img loading="lazy" decoding="async" class="size-medium wp-image-1515 aligncenter" alt="policyd_logo" src="http://v2.vavai.net/wp-content/uploads/2014/02/policyd_logo-300x130.png" width="300" height="130" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo-300x130.png 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo.png 369w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p><strong><span id="more-1514"></span>CONFIGURING POLICY</strong></p>
<ol>
<li>Open the Administration Web PolicyD page, <span style="line-height: 1.5em;">http://lpServerZimbra:7780/webui/index.php</span></li>
<li><span style="line-height: 1.5em;">Select <strong>Quotas | Configure</strong> menu</span></li>
<li><span style="line-height: 1.5em;">In the <strong>Action</strong> options, select <strong>Add</strong> and enter the details as below :<br />
</span><span style="line-height: 1.5em;"><strong>Name</strong> : Delivery Per User<br />
</span><span style="line-height: 1.5em;"><strong>Track</strong> : Select <strong>Sender@domain</strong>. This means that policy will be applies to each user on the domain<br />
</span><span style="line-height: 1.5em;"><strong>Period</strong> : The length of time that given in seconds. Ideally is in counts per hour or 3600 seconds<br />
</span><span style="line-height: 1.5em;"><strong>Link to policy</strong> : Select Default<br />
</span><span style="line-height: 1.5em;"><strong>Verdict</strong> : The rules that will be apply if it meets the period, such as <strong>defer</strong> (hold the messages until next time interval)<br />
</span><span style="line-height: 1.5em;"><strong>Data</strong> : Information that is given if it meets the rule, for example the information is a &#8220;<em><strong>Maximum 2 email delivery per minute</strong></em>&#8221; or &#8220;<em><strong>Maximum 300 emails delivery  per hour</strong></em>&#8221;<br />
</span><span style="line-height: 1.5em;"><strong>Stop processing here</strong> : choose Yes, means that rule will not processing another rule<br />
</span><span style="line-height: 1.5em;"><strong>Comment</strong> : can be filled with anything you like<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-setting-up-policyd-rule.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1543" alt="vavai-setting-up-policyd-rule" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-setting-up-policyd-rule.jpg" width="523" height="341" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-setting-up-policyd-rule.jpg 523w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-setting-up-policyd-rule-300x196.jpg 300w" sizes="auto, (max-width: 523px) 100vw, 523px" /></a><br />
</span></li>
<li>Click <strong>Submit<br />
</strong></li>
<li>by default, the newly created rule set in the disabled state. Set it enable by choose <span style="line-height: 1.5em;">PolicyD that you just created, and then on the <strong>Action</strong> option, select <strong>change<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-enable-policyd-rule.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1544" alt="vavai-enable-policyd-rule" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-enable-policyd-rule.jpg" width="853" height="166" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-enable-policyd-rule.jpg 853w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-enable-policyd-rule-300x58.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-enable-policyd-rule-768x149.jpg 768w" sizes="auto, (max-width: 853px) 100vw, 853px" /></a><br />
</strong></span></li>
<li><span style="line-height: 1.5em;">Change the parameter <strong>Disable=&#8217;Yes&#8217;</strong> to <strong>Disable=&#8217;No&#8217;</strong> on the Disabled option and click submit</span></li>
<li><span style="line-height: 1.5em;">Select the newly created policy again  and then select <strong>Limits</strong> on the <strong>Action</strong> option</span></li>
<li><span style="line-height: 1.5em;">Select <strong>Add</strong>, then select the <strong>Message Count</strong> and fill in with the number of maximum emails  on <strong>Counter Limit<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-set-policyd-rule-limits.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1545" alt="vavai-set-policyd-rule-limits" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-set-policyd-rule-limits.jpg" width="309" height="153" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-set-policyd-rule-limits.jpg 309w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-set-policyd-rule-limits-300x149.jpg 300w" sizes="auto, (max-width: 309px) 100vw, 309px" /></a><br />
</strong></span></li>
<li><span style="line-height: 1.5em;">Click <strong>Back to Limits</strong> and choose the rule that you have just created. Select <strong>Change </strong>In the <strong>Action</strong> option</span></li>
<li><span style="line-height: 1.5em;">Change the parameter <strong>&#8216;Yes&#8217;</strong> to <strong>&#8216;No&#8217;</strong> on the <strong>Disabled</strong> option and click submit</span></li>
</ol>
<p>Try to send emails beyond the limit. On the above screenshot, I&#8217;ve set maximum 2 emails for each user per minute. This is for example only so it wasn&#8217;t too long to see match condition for the above rule. for production use, better to set maximum emails limit  per hour rather than per minutes, to consider the possibility email in CC or BCC which also counted as a single email.<br />
The following is an example screenshot while PolicyD block email from being sent because because the sender has exceeded the maximum limit of sending email quota.</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-rate-limit-sending-message-with-policyd/">Zimbra Tips : Rate-Limit Sending Message with PolicyD</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/zimbra-tips-rate-limit-sending-message-with-policyd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Tips : How To Secure PolicyD Web Admin</title>
		<link>https://www.vavai.net/zimbra-tips-how-to-secure-policyd-web-admin/</link>
					<comments>https://www.vavai.net/zimbra-tips-how-to-secure-policyd-web-admin/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Sat, 08 Feb 2014 00:39:10 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[PolicyD]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1505</guid>

					<description><![CDATA[<p>On previous article : PolicyD and Rate Limit Sending Message Implementation on Zimbra 8,  we&#8217;ve installing and configuring PolicyD to prevent spam message to go to outside network (or to came into internal network).  Zimbra based mail server without PolicyD  can be blacklisted due to spam message sent by compromised account (account got hacked by attacker)....</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-how-to-secure-policyd-web-admin/">Zimbra Tips : How To Secure PolicyD Web Admin</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>On previous article : <a href="http://v2.vavai.net/2014/02/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/">PolicyD and Rate Limit Sending Message Implementation on Zimbra 8</a>,  we&#8217;ve installing and configuring PolicyD to prevent spam message to go to outside network (or to came into internal network).  Zimbra based mail server without PolicyD  can be blacklisted due to spam message sent by compromised account (account got hacked by attacker).<br />
By default, PolicyD Web Admin  can be accesses from anywhere, including from outside or public network. From mail server security perspective, this method is highly not recommended, because attacker could modify  PolicyD on web admin and changes it or disable it to fit with their purposes. We can apply some method to limit the access as describe below :<br />
<strong>Shutdown The Apache Service</strong><br />
This is the easiest way to prevent access by turn off Apache web service used by PolicyD Web Admin<br />
[code language=&#8221;bash&#8221;]<br />
su &#8211; zimbra -c &#8220;zmapachectl stop&#8221;<br />
[/code]<br />
If you need to modify an existing policy, just turn on the services :<br />
[code language=&#8221;bash&#8221;]<br />
su &#8211; zimbra -c &#8220;zmapachectl start&#8221;<br />
[/code]<br />
<strong><a href="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo1.png"><img loading="lazy" decoding="async" class="alignright  wp-image-1534" style="margin: 5px;" alt="policyd_logo" src="http://54.254.121.108/wp-content/uploads/2014/02/policyd_logo1.png" width="221" height="96" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo1.png 369w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyd_logo1-300x130.png 300w" sizes="auto, (max-width: 221px) 100vw, 221px" /></a>Creating Firewall/Block Port 7780</strong><br />
PolicyD web admin using port 7780. Set the firewall to limit the access and set to be accessible from a specific IP address only.<br />
<strong>Using Authentication</strong><br />
We can use web authentication and configure .htaccess to limit access into PolicyD web admin. Only authenticated user can access web admin.</p>
<ul>
<li>Move to the webui cbpolicyd directory</li>
</ul>
<p>[code language=&#8221;bash&#8221;]cd /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui[/code]</p>
<ul>
<li>Move to the webui cbpolicyd directory</li>
</ul>
<p>[code language=&#8221;bash&#8221;]<br />
touch .htaccess<br />
vi .htaccess<br />
[/code]<br />
the contents of .htaccess should looks like this :<br />
[code language=&#8221;bash&#8221;]<br />
AuthUserFile /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/.htpasswd<br />
AuthGroupFile /dev/null<br />
AuthName &#8220;User and Password&#8221;<br />
AuthType Basic<br />
require valid-user<br />
[/code]</p>
<ul>
<li>create a htpasswd file, username and password</li>
</ul>
<p>[code language=&#8221;bash&#8221;]<br />
touch .htpasswd<br />
htpasswd -c .htpasswd cbpadmin<br />
[/code]<br />
or<br />
[code language=&#8221;bash&#8221;]<br />
htpasswd2 -c .htpasswd cbpadmin<br />
[/code]<br />
Edit /opt/zimbra/conf/httpd.conf and append the following line on the bottom of file :<br />
[code language=&#8221;bash&#8221;]<br />
Alias /webui /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/<br />
# Comment out the following 3 lines to make web ui accessible from anywhere<br />
AllowOverride AuthConfig<br />
Order Deny,Allow<br />
Allow from all<br />
[/code]</p>
<ul>
<li>Restart the apache zimbra service</li>
</ul>
<p>[code language=&#8221;bash&#8221;]<br />
su &#8211; zimbra -c &#8220;zmapachectl restart&#8221;<br />
[/code]<br />
Try to reopen Web Admin PolicyD, it should provide authentication login. Login with cbpadmin username and password provided on the above step.</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-how-to-secure-policyd-web-admin/">Zimbra Tips : How To Secure PolicyD Web Admin</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/zimbra-tips-how-to-secure-policyd-web-admin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Tips : PolicyD &#038; Rate-Limit Sending Message Implementation on Zimbra 8</title>
		<link>https://www.vavai.net/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/</link>
					<comments>https://www.vavai.net/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Thu, 06 Feb 2014 13:59:53 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PolicyD]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1498</guid>

					<description><![CDATA[<p>From PolicyD website : Policyd v2 (codenamed &#8220;cluebringer&#8221;) is a multi-platform policy server for popular MTAs. This policy daemon is designed mostly for large scale mail hosting environments. The main goal is to implement as many spam combating and email compliance features as possible while at the same time maintaining the portability, stability and performance...</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/">Zimbra Tips : PolicyD &#038; Rate-Limit Sending Message Implementation on Zimbra 8</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>From PolicyD website : <em>Policyd v2 (codenamed &#8220;cluebringer&#8221;) is a multi-platform policy server for popular MTAs. This policy daemon is designed mostly for large scale mail hosting environments. The main goal is to implement as many spam combating and email compliance features as possible while at the same time maintaining the portability, stability and performance required for mission critical email hosting of today. Most of the ideas and methods implemented in Policyd v2 stem from Policyd v1 as well as the authors&#8217; long time involvement in large scale mail hosting industry. </em><br />
PolicyD can be integrated into Zimbra to add an anti spam layer, especially for rate-limit sending message. We can set maximum messages both for receiving and sending policy and prevent mail server IP address to be blacklisted due to spam message to outside network.<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vmware_zimbra_logo.jpg"><img loading="lazy" decoding="async" class=" wp-image-1499 alignleft" style="margin: 5px;" alt="vmware_zimbra_logo" src="http://54.254.121.108/wp-content/uploads/2014/02/vmware_zimbra_logo.jpg" width="257" height="199" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vmware_zimbra_logo.jpg 321w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vmware_zimbra_logo-300x233.jpg 300w" sizes="auto, (max-width: 257px) 100vw, 257px" /></a>PolicyD activation procedure on Zimbra 8 is slightly different from the procedures on previous version. Some of  features on PolicyD include Access Control, amavis, CheckHelo, CheckSPF, Greylisting, Quotas and Accounting. The new features can be configured through the Web Administration Policyd as well as standard feature.<br />
Below are PolicyD activation procedure on Zimbra 8, fully tested on Zimbra 8.0.6, the latest version of the time this article was written.<span id="more-1498"></span><br />
<strong>ACTIVATING POLICYD ADDON</strong><br />
[code language=&#8221;bash&#8221;]<br />
su &#8211; zimbra<br />
zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd<br />
zmlocalconfig -e postfix_enable_smtpd_policyd=yes<br />
zmprov mcf +zimbraMtaRestriction &#8220;check_policy_service inet:127.0.0.1:10031&#8221;<br />
zmlocalconfig -e cbpolicyd_log_level=4; zmlocalconfig -e cbpolicyd_log_detail=modules,tracking,policies; zmlocalconfig -e cbpolicyd_module_accesscontrol=1 cbpolicyd_module_checkhelo=1 cbpolicyd_module_checkspf=1 cbpolicyd_module_greylisting=1 cbpolicyd_module_quotas=1<br />
zmcontrol restart<br />
exit<br />
[/code]<br />
<strong>WEB UI ACTIVATION FOR POLICYD MANAGEMENT</strong><br />
Run the following command by using root permission<br />
[code language=&#8221;bash&#8221;]<br />
cd /opt/zimbra/httpd/htdocs/ &#038;&#038; ln -s ../../cbpolicyd/share/webui<br />
[/code]<br />
Modify file /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/includes/config.php (vi /opt/zimbra/cbpolicyd-2.1.0-beta/share/webui/includes/config.php) and mark a comment (#) to the line begining with: $DB_DSN and add the following code before line begining with : $DB_USER<br />
[code language=&#8221;bash&#8221;]<br />
$DB_DSN=&#8221;sqlite:/opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb&#8221;;<br />
[/code]<br />
Reload Web UI (http) service with the following command :<br />
[code language=&#8221;bash&#8221;]<br />
cd /srv/<br />
wget -c http://devlabs.linuxassist.net/attachments/download/230/cluebringer-snapshot-2.1.x-201205100639.tar.gz<br />
tar -zxvf cluebringer-snapshot-2.1.x-201205100639.tar.gz<br />
cd cluebringer-snapshot-2.1.x-201205100639/webui/<br />
cp *.php *.css /opt/zimbra/cbpolicyd/share/webui/<br />
su &#8211; zimbra -c &#8220;zmapachectl restart&#8221;<br />
[/code]<br />
Try to open PolicyD web management by accessing the following URL : http://IpAddressOfZimbra:7780/webui/index.php, the correct result should be similar as below :<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/policyD_webadmin.jpg"><img loading="lazy" decoding="async" class="alignnone  wp-image-1500" alt="policyD_webadmin" src="http://54.254.121.108/wp-content/uploads/2014/02/policyD_webadmin.jpg" width="652" height="433" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyD_webadmin.jpg 931w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyD_webadmin-300x199.jpg 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/policyD_webadmin-768x510.jpg 768w" sizes="auto, (max-width: 652px) 100vw, 652px" /></a></p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/">Zimbra Tips : PolicyD &#038; Rate-Limit Sending Message Implementation on Zimbra 8</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/zimbra-tips-policyd-rate-limit-sending-message-implementation-on-zimbra-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 30/99 objects using Disk
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: d3b35uem336dgh.cloudfront.net
Lazy Loading (feed)
Minified using Disk
Database Caching 18/37 queries in 0.011 seconds using Disk

Served from: www.vavai.net @ 2026-10-28 21:38:06 by W3 Total Cache
-->