<?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>Mail Server Archives - Vavai&#039;s Personal Notes</title>
	<atom:link href="https://www.vavai.net/tag/mail-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.vavai.net/tag/mail-server/</link>
	<description>Life is our precious gift</description>
	<lastBuildDate>Thu, 18 Oct 2018 13:00:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Bash Script for Spam Queue Removal on Zimbra Mail Server (Updated)</title>
		<link>https://www.vavai.net/bash-script-for-spam-queue-removal-on-zimbra-mail-server-updated/</link>
					<comments>https://www.vavai.net/bash-script-for-spam-queue-removal-on-zimbra-mail-server-updated/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Thu, 18 Oct 2018 13:00:03 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=2036</guid>

					<description><![CDATA[<p>I have a small script-got it from Internet-for Zimbra spam queue removal based on Postfix queue message removal. The script written on Perl language and become a mandatory script on each Zimbra server deployment, as a quick tools to remove spam message from queue caused by compromised account. As of Zimbra 8.7, there is a little...</p>
<p>The post <a href="https://www.vavai.net/bash-script-for-spam-queue-removal-on-zimbra-mail-server-updated/">Bash Script for Spam Queue Removal on Zimbra Mail Server (Updated)</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have a small script-got it from Internet-for Zimbra spam queue removal based on Postfix queue message removal. The script written on Perl language and become a mandatory script on each Zimbra server deployment, as a quick tools to remove spam message from queue caused by compromised account.<br />
<figure id="attachment_2038" aria-describedby="caption-attachment-2038" style="width: 1280px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="wp-image-2038 size-full" src="http://54.254.121.108/wp-content/uploads/2018/10/phising.png" alt="" width="1280" height="977" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2018/10/phising.png 1280w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2018/10/phising-300x229.png 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2018/10/phising-1024x782.png 1024w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2018/10/phising-768x586.png 768w" sizes="(max-width: 1280px) 100vw, 1280px" /><figcaption id="caption-attachment-2038" class="wp-caption-text">image from pixabay</figcaption></figure><br />
As of Zimbra 8.7, there is a little change on path for some Postfix binary. On previous version, Postfix binary located on <strong>/opt/zimbra/postfix/ </strong>but since version 8.7, the binary folder moved into <strong>/opt/zimbra/common/ </strong>so I take a little time to change the script.<br />
Below is an updated script, check for Zimbra version and change binary folder accordingly :<br />
[code lang=&#8221;bash&#8221;]<br />
#!/usr/bin/perl -w<br />
#<br />
# pfdel &#8211; deletes message containing specified address from<br />
# Postfix queue. Matches either sender or recipient address.<br />
#<br />
# Usage: pfdel sender-or-recipient-address<br />
#<br />
use strict;<br />
my $LISTQ;<br />
my $POSTSUPER;<br />
# Change these paths if necessary.<br />
system(&#8220;su &#8211; zimbra -c &#8216;zmcontrol -v&#8217; &gt; /tmp/zcs-ver.txt&#8221;);<br />
my $VER=`awk &#8216;/Release 6|Release 7|Release 8.0|Release 8.5|Release 8.6/&#8217; /tmp/zcs-ver.txt`;<br />
#print $VER<br />
if (length($VER) &gt; 0)<br />
{<br />
$LISTQ = &#8220;/opt/zimbra/postfix/sbin/postqueue -p&#8221;;<br />
$POSTSUPER = &#8220;/opt/zimbra/postfix/sbin/postsuper&#8221;;<br />
}<br />
else<br />
{<br />
$LISTQ = &#8220;/opt/zimbra/common/sbin/postqueue -p&#8221;;<br />
$POSTSUPER = &#8220;/opt/zimbra/common/sbin/postsuper&#8221;;<br />
}<br />
my $email_addr = &#8220;&#8221;;<br />
my $qid = &#8220;&#8221;;<br />
my $euid = $&gt;;<br />
if ( @ARGV != 1 ) {<br />
die &#8220;Usage: pfdel \n&#8221;;<br />
} else {<br />
$email_addr = $ARGV[0];<br />
}<br />
if ( $euid != 0 ) {<br />
die &#8220;You must be root to delete queue files.\n&#8221;;<br />
}<br />
open(QUEUE, &#8220;$LISTQ |&#8221;) ||<br />
die &#8220;Can&#8217;t get pipe to $LISTQ: $!\n&#8221;;<br />
my $entry = ; # skip single header line<br />
$/ = &#8220;&#8221;; # Rest of queue entries print on<br />
# multiple lines.<br />
while ( $entry = ) {<br />
if ( $entry =~ / $email_addr$/m ) {<br />
($qid) = split(/\s+/, $entry, 2);<br />
$qid =~ s/[\*\!]//;<br />
next unless ($qid);<br />
#<br />
# Execute postsuper -d with the queue id.<br />
# postsuper provides feedback when it deletes<br />
# messages. Let its output go through.<br />
#<br />
if ( system($POSTSUPER, &#8220;-d&#8221;, $qid) != 0 ) {<br />
# If postsuper has a problem, bail.<br />
die &#8220;Error executing $POSTSUPER: error &#8221; .<br />
&#8220;code &#8221; . ($?/256) . &#8220;\n&#8221;;<br />
}<br />
}<br />
}<br />
close(QUEUE);<br />
if (! $qid ) {<br />
die &#8220;No messages with the address &lt;$email_addr&gt; &#8221; .<br />
&#8220;found in queue.\n&#8221;;<br />
}<br />
exit 0;<br />
[/code]<br />
If you tend to lazy to copy-paste the script, get it from mine :<br />
[code lang=&#8221;bash&#8221;]<br />
wget https://www.vavai.com/pfdel<br />
chmod +x pfdel<br />
[/code]<br />
And to run it, just run this script with root permissions :<br />
[code lang=&#8221;bash&#8221;]<br />
./pfdel email-spammer<br />
[/code]<br />
ex :<br />
[code lang=&#8221;bash&#8221;]<br />
./pfdel spammersampah@vavai.com<br />
[/code]<br />
However, this is only a quick tools to remove spam, but more importantly is prevent spam from being filling into queue.</p>
<p>The post <a href="https://www.vavai.net/bash-script-for-spam-queue-removal-on-zimbra-mail-server-updated/">Bash Script for Spam Queue Removal on Zimbra Mail Server (Updated)</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/bash-script-for-spam-queue-removal-on-zimbra-mail-server-updated/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>My Personal Experience Using DigitalOcean, Vultr and Linode</title>
		<link>https://www.vavai.net/performance-experience-between-digitalocean-vultr-and-linode/</link>
					<comments>https://www.vavai.net/performance-experience-between-digitalocean-vultr-and-linode/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Sun, 06 Dec 2015 04:08:33 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[DigitalOcean]]></category>
		<category><![CDATA[Linode]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[Vultr]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1928</guid>

					<description><![CDATA[<p>After Moving my server Infrastructure from Self Co-Location Server to VPS Provider, I tested several providers. The first one is DigitalOcean and pick their &#8220;middle specs&#8221; droplet with 4 GB Memory, 2 Core Processor, 60 GB SSD Disk and 4 TB Transfer  and installing Zimbra Mail Server on top of Ubuntu 14.04 64 bit or CentOS 6...</p>
<p>The post <a href="https://www.vavai.net/performance-experience-between-digitalocean-vultr-and-linode/">My Personal Experience Using DigitalOcean, Vultr and Linode</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>After <a href="http://v2.vavai.net/2015/12/moving-infrastructure-from-self-co-location-server-to-vps-provider/">Moving my server Infrastructure from Self Co-Location Server to VPS Provider</a>, I tested several providers. The first one is DigitalOcean and pick their &#8220;middle specs&#8221; droplet with 4 GB Memory, 2 Core Processor, 60 GB SSD Disk and 4 TB Transfer  and installing Zimbra Mail Server on top of Ubuntu 14.04 64 bit or CentOS 6 64 bit.<br />
It seems that 4 GB memory is minimum requirement for Zimbra on DigitalOcean droplet but I got some bad experiences with the performance. 4 GB memory may suitable for Zimbra with less than 50 users but not stable enough to handle more than 100 users, even if disabling anti spam, anti virus and some services (I have separate clusters for anti spam and anti virus on different geographical locations). Upgrading to better specs (8 GB Memory, 4 Core Processor, 80 GB SSD Disk and 5 TB Transfer) helps me overcome this obstacle but I don&#8217;t think it&#8217;s a good choice because cost me twice than before <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
<a href="http://54.254.121.108/wp-content/uploads/2015/12/linode.png"><img decoding="async" class="alignnone size-full wp-image-1929" src="http://54.254.121.108/wp-content/uploads/2015/12/linode.png" alt="linode" width="300" height="119" /></a><br />
<span id="more-1928"></span>I&#8217;ve trying Vultr for some others purpose, mostly for website hosting but also facing some problems with the performance. The bad news is that VPS several times inaccessible, although not all servers experience the same problem. It seems that my instance problem caused by host problem. Another problem is slow network access from Indonesia, due to their nearest location are on Tokyo, Japan.<br />
I&#8217;ve also trying Linode on Japan location and experienced similar slowness network speed, so I still used DO for a while, until find a better solution in terms of server performance and low latency from Indonesia.<br />
When Linode announced availability of Singapore data centers, I give it a second try. For similar specs and pricing but with bigger SSD disk than DO (4 GB RAM, 4 CPU Cores, 96 GB SSD Storage, 4 TB Transfer, 40 Gbps Network In, 500 Mbps Network Out) Linode has better performance than DO. Linode 4 GB RAM are quite stable for Zimbra with about 200-300 users. The good news is that Singapore Linode has a decent network speed from Indonesia.<br />
<a href="http://54.254.121.108/wp-content/uploads/2015/12/linode-vavai-perf.png"><img decoding="async" class="alignnone size-full wp-image-1930" src="http://54.254.121.108/wp-content/uploads/2015/12/linode-vavai-perf.png" alt="linode-vavai-perf" width="764" height="319" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2015/12/linode-vavai-perf.png 764w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2015/12/linode-vavai-perf-300x125.png 300w" sizes="(max-width: 764px) 100vw, 764px" /></a><br />
On the subsequent testing, I can even run Zimbra for about 50-100 users on Linode 2 GB (2 GB RAM, 2 CPU Cores, 48 GB SSD Storage, 3 TB Transfer, 40 Gbps Network In, 250 Mbps Network Out) by disabling some services like anti spam/anti virus and applying some tuning to the configuration. Disabling anti spam and anti virus doesn&#8217;t cause others problem because I&#8217;ve manage different cluster for anti spam/anti virus and allowing incoming SMTP transaction from my anti spam/anti virus cluster only.<br />
So for now, I&#8217;m using Linode as my preferred VPS provider and have a better sleep at night because Linode help me guarantee better server availability and performance to my customer <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
Note : If you don&#8217;t mind about affiliate link, here is my aff link for <a href="https://www.linode.com/?r=a7c53afae9644090ba36d40566e970bce0f70fe4">sign up to Linode</a></p>
<p>The post <a href="https://www.vavai.net/performance-experience-between-digitalocean-vultr-and-linode/">My Personal Experience Using DigitalOcean, Vultr and Linode</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/performance-experience-between-digitalocean-vultr-and-linode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Improvement : Restricted Sender/Sender Must Login on Zimbra 8</title>
		<link>https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8/</link>
					<comments>https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Mon, 17 Feb 2014 23:04:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Telnet]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1725</guid>

					<description><![CDATA[<p>As a powerful mail server, Zimbra has some system security features applied by default. We can also applying some additional security policy to increase mail server protection, such as applying PolicyD and Fail2Ban All the above security rule may be sufficient, but there are some additional security tips should be considered, especially in the case...</p>
<p>The post <a href="https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8/">Zimbra Improvement : Restricted Sender/Sender Must Login 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><a href="http://54.254.121.108/wp-content/uploads/2014/02/email.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1829" style="margin: 5px;" src="http://54.254.121.108/wp-content/uploads/2014/02/email.png" alt="email" width="180" height="193" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/email.png 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/email-280x300.png 280w" sizes="auto, (max-width: 180px) 100vw, 180px" /></a>As a powerful mail server, Zimbra has some system security features applied by default. We can also applying some additional security policy to increase mail server protection, such as applying <a href="http://v2.vavai.net/tag/policyd/">PolicyD</a> and <a href="http://v2.vavai.net/2011/10/tips-improving-zimbra-mail-server-security-with-fail2ban/">Fail2Ban</a><br />
All the above security rule may be sufficient, but there are some additional security tips should be considered, especially in the case of SMTP authorization.<br />
Look at the following mail flow delivery, sent from or into Zimbra :<br />
<strong>From : External User   To : External User, Result : Relay Access Denied</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@yahoo.com</strong>
250 2.1.0 Ok
<strong>rcpt to:zezevavai@gmail.com</strong>
554 5.7.1 &lt;zezevavai@gmail.com&gt;: Relay access denied</pre>
<p><strong><span id="more-1725"></span>From : External User   To : Zimbra User, Result : Accepted with prior Scanning for Spam and Viruses</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@yahoo.com</strong>
250 2.1.0 Ok
<strong>rcpt to:myemail@mycompanydomain.co.id</strong>
250 2.1.5 Ok
<strong>data</strong>
354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;
<strong>Hello Vavai</strong>
<strong>.</strong>
250 2.0.0 Ok: queued as C78EDB6E001
<strong>quit</strong>
221 2.0.0 Bye</pre>
<p><strong>From : Zimbra User  To : External User, Result : Accepted with prior SMTP Authorization check</strong><br />
Zimbra should be respond our request  with &#8220;Relay Access Denied when trying to send emails without prior authorization</p>
<pre>telnet mail.mycompanydomain.co.id 25
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
ehlo mail
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 6144000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:vivianchow@mycompanydomain.co.id
250 2.1.0 Ok
rcpt to:myemail@gmail.com
554 5.7.1 &lt;myemail@vavai.com&gt;: Relay access denied</pre>
<p><strong>From : Zimbra User  To : Zimbra User, Result : Accepted WITHOUT prior SMTP Authorization check</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 6144000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@mycompanydomain.co.id</strong>
250 2.1.0 Ok
<strong>rcpt to:vivianchow@mycompanydomain.co.id</strong>
250 2.1.5 Ok</pre>
<p><a href="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg"><img loading="lazy" decoding="async" class="alignright size-full wp-image-1710" src="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg" alt="zimbra-logo" width="200" height="53" /></a>Look at the last example. I&#8217;m trying to send email from <strong>vivianchow@mycompanydomain.co.id </strong>to <strong>vivianchow@mycompanydomain.co.id </strong>without prior authorization and Zimbra accepted this email whereas should not. How if I&#8217;m trying to send fake email, let&#8217;s say from my boss email into my colleagues?<br />
To prevent the above security hole, below are some modification which are able to be applied on Zimbra 8. This modification will force the user to authenticate and login before sending an email to an internal users.</p>
<ol>
<li>Backup all configuration. Incorrect settings while applying &#8220;sender must login&#8221; policy would interfere Zimbra services and would stop your email communication</li>
<li>Log in as Zimbra user and edit <strong>/opt/zimbra/conf/zmconfigd.cf</strong><br />
Add the following lines right under <strong>POSTCONF smtpd_recipient_restrictions FILE zmconfigd/postfix_recipient_restrictions.cf</strong></p>
<pre>POSTCONF proxy_read_maps FILE zmconfigd/proxy_read_maps.cf</pre>
<p>and add the following lines right under <strong>POSTCONF smtpd_sender_restrictions FILE zmconfigd/smtpd_sender_restrictions.cf</strong></p>
<pre>POSTCONF smtpd_sender_login_maps proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</pre>
</li>
<li>Save your changes and then navigate to /opt/zimbra/conf/zmconfigd/ folder and edit smtpd_sender_restriction.cf
<pre>cd /opt/zimbra/conf/zmconfigd/
vi smtpd_sender_restrictions.cf</pre>
</li>
<li>Put the following code on the top of the lines
<pre>permit_mynetworks, reject_sender_login_mismatch</pre>
</li>
<li>Save your change</li>
<li>Check your read maps settings with the following command :
<pre>postconf | grep proxy_read_maps</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">On my Zimbra 8, the result would shown as below<br />
</span></span></p>
<pre>$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Create a proxy_read_maps.cf file<br />
</span></span></p>
<pre>vi proxy_read_maps.cf</pre>
<p><span style="line-height: 1.5em;">and add </span><i style="line-height: 1.5em;">proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</i><span style="line-height: 1.5em;"><span style="line-height: 1.5em;"> on the last line of postconf result, so the result is supposedly like this:<br />
</span></span></p>
<pre>$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps, proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Navigate to /opt/zimbra/conf and create ldap-slm.cf file<br />
</span></span></p>
<pre>cd /opt/zimbra/conf
grep server_host /opt/zimbra/conf/ldap-vam.cf
grep bind_pw /opt/zimbra/conf/ldap-vam.cf
vi ldap-slm.cf</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Content of ldap-slm.cf file<br />
</span></span></p>
<pre>server_host = <b>ldap://HOST:389</b>
server_port = 389
search_base =
query_filter = (&amp;(|(zimbraMailDeliveryAddress=%s)(zimbraMailAlias=%s)(zimbraMailCatchAllAddress=%s)(mail=%s))(zimbraMailStatus=enabled))
result_attribute = zimbraMailDeliveryAddress,zimbraMailForwardingAddress,zimbraPrefMailForwardingAddress,zimbraMailCatchAllForwardingAddress,uid
version = 3
<b>start_tls = yes</b>
tls_ca_cert_dir = /opt/zimbra/conf/ca
bind = yes
bind_dn = uid=zmpostfix,cn=appaccts,cn=zimbra
bind_pw = <b>PASSWORD</b>
timeout = 30</pre>
</li>
<li><span style="line-height: 1.5em;">Replace </span><i style="line-height: 1.5em;">server_host  </i><span style="line-height: 1.5em;">and </span><i style="line-height: 1.5em;">bind_pw </i><span style="line-height: 1.5em;">with the result of grep command</span></li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Save all changes and then run the postfix reload to apply the changes<br />
</span></span></p>
<pre>chown zimbra:postfix ldap-slm.cf
postfix reload</pre>
</li>
<li>Test the policy by telnet to your Zimbra server and send an email from internal to internal users without prior authorization
<pre>telnet mail.mycompanydomain.co.id 25
Trying XXX.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@mycompanydomain.co.id</strong>
250 2.1.0 Ok
<strong>rcpt to:vivianchow@mycompanydomain.co.id</strong>
553 5.7.1 vivianchow@mycompanydomain.co.id: Sender address rejected: not logged in</pre>
</li>
</ol>
<p>Notes : Please backup all configuration before trying to set the &#8220;Sender must login&#8221; policy to prevent  unexpected things <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8/">Zimbra Improvement : Restricted Sender/Sender Must Login 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-improvement-restricted-sendersender-must-login-on-zimbra-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Improvement : Restricted Sender/Sender Must Login on Zimbra 8</title>
		<link>https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8-2/</link>
					<comments>https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8-2/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Mon, 17 Feb 2014 23:04:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Telnet]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1725</guid>

					<description><![CDATA[<p>As a powerful mail server, Zimbra has some system security features applied by default. We can also applying some additional security policy to increase mail server protection, such as applying PolicyD and Fail2Ban All the above security rule may be sufficient, but there are some additional security tips should be considered, especially in the case...</p>
<p>The post <a href="https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8-2/">Zimbra Improvement : Restricted Sender/Sender Must Login 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><a href="http://54.254.121.108/wp-content/uploads/2014/02/email.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1829" style="margin: 5px;" src="http://54.254.121.108/wp-content/uploads/2014/02/email.png" alt="email" width="180" height="193" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/email.png 300w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/email-280x300.png 280w" sizes="auto, (max-width: 180px) 100vw, 180px" /></a>As a powerful mail server, Zimbra has some system security features applied by default. We can also applying some additional security policy to increase mail server protection, such as applying <a href="http://v2.vavai.net/tag/policyd/">PolicyD</a> and <a href="http://v2.vavai.net/2011/10/tips-improving-zimbra-mail-server-security-with-fail2ban/">Fail2Ban</a><br />
All the above security rule may be sufficient, but there are some additional security tips should be considered, especially in the case of SMTP authorization.<br />
Look at the following mail flow delivery, sent from or into Zimbra :<br />
<strong>From : External User   To : External User, Result : Relay Access Denied</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@yahoo.com</strong>
250 2.1.0 Ok
<strong>rcpt to:zezevavai@gmail.com</strong>
554 5.7.1 &lt;zezevavai@gmail.com&gt;: Relay access denied</pre>
<p><strong><span id="more-2758"></span>From : External User   To : Zimbra User, Result : Accepted with prior Scanning for Spam and Viruses</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@yahoo.com</strong>
250 2.1.0 Ok
<strong>rcpt to:myemail@mycompanydomain.co.id</strong>
250 2.1.5 Ok
<strong>data</strong>
354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;
<strong>Hello Vavai</strong>
<strong>.</strong>
250 2.0.0 Ok: queued as C78EDB6E001
<strong>quit</strong>
221 2.0.0 Bye</pre>
<p><strong>From : Zimbra User  To : External User, Result : Accepted with prior SMTP Authorization check</strong><br />
Zimbra should be respond our request  with &#8220;Relay Access Denied when trying to send emails without prior authorization</p>
<pre>telnet mail.mycompanydomain.co.id 25
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
ehlo mail
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 6144000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:vivianchow@mycompanydomain.co.id
250 2.1.0 Ok
rcpt to:myemail@gmail.com
554 5.7.1 &lt;myemail@vavai.com&gt;: Relay access denied</pre>
<p><strong>From : Zimbra User  To : Zimbra User, Result : Accepted WITHOUT prior SMTP Authorization check</strong></p>
<pre><strong>telnet mail.mycompanydomain.co.id 25</strong>
Trying 103.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 6144000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@mycompanydomain.co.id</strong>
250 2.1.0 Ok
<strong>rcpt to:vivianchow@mycompanydomain.co.id</strong>
250 2.1.5 Ok</pre>
<p><a href="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg"><img loading="lazy" decoding="async" class="alignright size-full wp-image-1710" src="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg" alt="zimbra-logo" width="200" height="53" /></a>Look at the last example. I&#8217;m trying to send email from <strong>vivianchow@mycompanydomain.co.id </strong>to <strong>vivianchow@mycompanydomain.co.id </strong>without prior authorization and Zimbra accepted this email whereas should not. How if I&#8217;m trying to send fake email, let&#8217;s say from my boss email into my colleagues?<br />
To prevent the above security hole, below are some modification which are able to be applied on Zimbra 8. This modification will force the user to authenticate and login before sending an email to an internal users.</p>
<ol>
<li>Backup all configuration. Incorrect settings while applying &#8220;sender must login&#8221; policy would interfere Zimbra services and would stop your email communication</li>
<li>Log in as Zimbra user and edit <strong>/opt/zimbra/conf/zmconfigd.cf</strong><br />
Add the following lines right under <strong>POSTCONF smtpd_recipient_restrictions FILE zmconfigd/postfix_recipient_restrictions.cf</strong></p>
<pre>POSTCONF proxy_read_maps FILE zmconfigd/proxy_read_maps.cf</pre>
<p>and add the following lines right under <strong>POSTCONF smtpd_sender_restrictions FILE zmconfigd/smtpd_sender_restrictions.cf</strong></p>
<pre>POSTCONF smtpd_sender_login_maps proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</pre>
</li>
<li>Save your changes and then navigate to /opt/zimbra/conf/zmconfigd/ folder and edit smtpd_sender_restriction.cf
<pre>cd /opt/zimbra/conf/zmconfigd/
vi smtpd_sender_restrictions.cf</pre>
</li>
<li>Put the following code on the top of the lines
<pre>permit_mynetworks, reject_sender_login_mismatch</pre>
</li>
<li>Save your change</li>
<li>Check your read maps settings with the following command :
<pre>postconf | grep proxy_read_maps</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">On my Zimbra 8, the result would shown as below<br />
</span></span></p>
<pre>$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Create a proxy_read_maps.cf file<br />
</span></span></p>
<pre>vi proxy_read_maps.cf</pre>
<p><span style="line-height: 1.5em;">and add </span><i style="line-height: 1.5em;">proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</i><span style="line-height: 1.5em;"><span style="line-height: 1.5em;"> on the last line of postconf result, so the result is supposedly like this:<br />
</span></span></p>
<pre>$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps, proxy:ldap:/opt/zimbra/conf/ldap-slm.cf</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Navigate to /opt/zimbra/conf and create ldap-slm.cf file<br />
</span></span></p>
<pre>cd /opt/zimbra/conf
grep server_host /opt/zimbra/conf/ldap-vam.cf
grep bind_pw /opt/zimbra/conf/ldap-vam.cf
vi ldap-slm.cf</pre>
</li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Content of ldap-slm.cf file<br />
</span></span></p>
<pre>server_host = <b>ldap://HOST:389</b>
server_port = 389
search_base =
query_filter = (&amp;(|(zimbraMailDeliveryAddress=%s)(zimbraMailAlias=%s)(zimbraMailCatchAllAddress=%s)(mail=%s))(zimbraMailStatus=enabled))
result_attribute = zimbraMailDeliveryAddress,zimbraMailForwardingAddress,zimbraPrefMailForwardingAddress,zimbraMailCatchAllForwardingAddress,uid
version = 3
<b>start_tls = yes</b>
tls_ca_cert_dir = /opt/zimbra/conf/ca
bind = yes
bind_dn = uid=zmpostfix,cn=appaccts,cn=zimbra
bind_pw = <b>PASSWORD</b>
timeout = 30</pre>
</li>
<li><span style="line-height: 1.5em;">Replace </span><i style="line-height: 1.5em;">server_host  </i><span style="line-height: 1.5em;">and </span><i style="line-height: 1.5em;">bind_pw </i><span style="line-height: 1.5em;">with the result of grep command</span></li>
<li><span style="line-height: 1.5em;"><span style="line-height: 1.5em;">Save all changes and then run the postfix reload to apply the changes<br />
</span></span></p>
<pre>chown zimbra:postfix ldap-slm.cf
postfix reload</pre>
</li>
<li>Test the policy by telnet to your Zimbra server and send an email from internal to internal users without prior authorization
<pre>telnet mail.mycompanydomain.co.id 25
Trying XXX.XXX.XXX.XXX...
Connected to mail.mycompanydomain.co.id.
Escape character is '^]'.
220 mail.mycompanydomain.co.id ESMTP Postfix
<strong>ehlo mail</strong>
250-mail.mycompanydomain.co.id
250-PIPELINING
250-SIZE 51200000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
<strong>mail from:vivianchow@mycompanydomain.co.id</strong>
250 2.1.0 Ok
<strong>rcpt to:vivianchow@mycompanydomain.co.id</strong>
553 5.7.1 vivianchow@mycompanydomain.co.id: Sender address rejected: not logged in</pre>
</li>
</ol>
<p>Notes : Please backup all configuration before trying to set the &#8220;Sender must login&#8221; policy to prevent  unexpected things <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://www.vavai.net/zimbra-improvement-restricted-sendersender-must-login-on-zimbra-8-2/">Zimbra Improvement : Restricted Sender/Sender Must Login 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-improvement-restricted-sendersender-must-login-on-zimbra-8-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Tips : Script to Check Mailbox Usage for Each User</title>
		<link>https://www.vavai.net/zimbra-tips-checking-mailbox-usage-for-each-user/</link>
					<comments>https://www.vavai.net/zimbra-tips-checking-mailbox-usage-for-each-user/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Wed, 12 Feb 2014 06:33:50 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1575</guid>

					<description><![CDATA[<p>Yesterday,  a friend of mine  asked me how to take all  data usage for each Zimbra user  for information and reporting purpose. Actually, all information about how many  mailboxes usages for each user on Zimbra Mail Server,  can be seen on the  Zimbra Admin &#124; Server Statistics &#124; Mailbox Quota. You can see total quota...</p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-checking-mailbox-usage-for-each-user/">Zimbra Tips : Script to Check Mailbox Usage for Each User</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday,  a friend of mine  asked me how to take all  data usage for each Zimbra user  for information and reporting purpose. Actually, all information about how many  mailboxes usages for each user on Zimbra Mail Server,  can be seen on the  Zimbra Admin | Server Statistics | Mailbox Quota.<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg"><img loading="lazy" decoding="async" class="alignright size-full wp-image-1710" style="margin: 5px;" alt="zimbra-logo" src="http://54.254.121.108/wp-content/uploads/2014/02/zimbra-logo1.jpg" width="200" height="53" /></a>You can see total quota and the quota already in use for each user. Although quite informative, it is not really flexible if we would like to use the data for other purposes. We must re-write the existing information or make a screenshot which will be difficult to be done if Zimbra has a large account.<br />
<span id="more-1575"></span>To resolve this issue, we can utilize  Zimbra CLI and then create a small script  to find out how many mailboxes and the total quota usage for each user. Here&#8217;s an example of the command line :<br />
<span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">su &#8211; zimbra</span></p>
<pre>zmmailbox -z -m ahmad.iman@excellent.co.id gms</pre>
<p>Command Line to see the total mailboxes</p>
<pre>su - zimbra
zmprov ga vivianchow@excellent.co.id | grep zimbraMailQuota</pre>
<p>From the  above example, we can create a simple script to looping all user mailbox and retrieve information about mailbox quota</p>
<pre>vi /srv/quota-used.sh</pre>
<p>paste the following code to the file you just created</p>
<pre>#!/bin/bash
echo "Username           Total Quota         Usage"
zmprov -l gaa | while read ACCOUNT
 do
        QUOTA_TOTAL=`zmprov ga ${ACCOUNT} | grep "zimbraMailQuota" | cut -d ":" -f2`
        QUOTA_USAGE=`zmmailbox -z -m ${ACCOUNT} gms`
        echo "${ACCOUNT}    ${QUOTA_TOTAL}    ${QUOTA_USAGE}"
done</pre>
<p>give executable permissions and run by using Zimbra permission</p>
<pre>chmod +x /srv/quota-used.sh
su - zimbra
sh /srv/quota-used.sh</pre>
<p><span style="line-height: 1.5em;">The above script  can be modified so that the result can be opened as csv file. Good luck and hopely it 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;" /> . </span></p>
<p>The post <a href="https://www.vavai.net/zimbra-tips-checking-mailbox-usage-for-each-user/">Zimbra Tips : Script to Check Mailbox Usage for Each User</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-checking-mailbox-usage-for-each-user/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Build an Anti Spam Appliance Using Untangle-Part 1</title>
		<link>https://www.vavai.net/how-to-build-an-anti-spam-appliance-using-untangle-part-1/</link>
					<comments>https://www.vavai.net/how-to-build-an-anti-spam-appliance-using-untangle-part-1/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Mon, 10 Feb 2014 10:12:35 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Anti Spam]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Untangle]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1590</guid>

					<description><![CDATA[<p>This article is intended as a glowing article. Its contents are part of the training material on my startup company, PT. Excellent Infotama Kreasindo for the subject &#8220;Security Hardening &#38;  Improving Mail Server Performance&#8221;. Training utilize Untangle as its base system for anti spam appliance. ***** WHAT IS ANTI SPAM APPLIANCE ? Anti spam appliance is a system...</p>
<p>The post <a href="https://www.vavai.net/how-to-build-an-anti-spam-appliance-using-untangle-part-1/">How to Build an Anti Spam Appliance Using Untangle-Part 1</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This article is intended as a glowing article. Its contents are part of the training material on my startup company, <a href="http://www.excellent.co.id">PT. Excellent Infotama Kreasindo</a> for the subject &#8220;Security Hardening &amp;  Improving Mail Server Performance&#8221;. Training utilize Untangle as its base system for anti spam appliance.</p>
<p style="text-align: center;">*****</p>
<p><strong><a href="http://54.254.121.108/wp-content/uploads/2014/02/check-spam.jpg"><img loading="lazy" decoding="async" class="alignright  wp-image-1594" alt="The person examines email sign" src="http://54.254.121.108/wp-content/uploads/2014/02/check-spam.jpg" width="228" height="190" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/check-spam.jpg 380w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/check-spam-300x249.jpg 300w" sizes="auto, (max-width: 228px) 100vw, 228px" /></a>WHAT IS ANTI SPAM APPLIANCE ?</strong><br />
Anti spam appliance is a system (can be based on Linux, Windows, FreeBSD ) that has a mail server security functions . In some products, anti spam is one module from main functions of the UTM (Unified Threat Management ). Anti spam appliance can be installed in the form of software and hardware. Some UTM / anti- spam appliance that is quite popular among other things are :</p>
<ol>
<li>Cisco IronPort</li>
<li>Fortigate Fortimail</li>
<li>Astaro</li>
<li>Symantec Brightmail</li>
<li>Juniper Networks</li>
<li>Cyberoam</li>
<li>Check Point</li>
<li>Barracuda</li>
<li>etc. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
</ol>
<p><span id="more-1590"></span>Anti spam appliance licensing  price are usually calculated based on the number of users and is calculated per year (can be multi -year depending on the calculation mechanism of each vendor) . There is also a UTM appliance that has a lot of modules , but the module is determined by the activation of the purchased license. For example, if you buy the license  for  web filter only and does not include an email filter, UTM can only protect your web and not for mail server even though it actually has a feature for that.<br />
In addition to using a hardware appliance, we can also use other products, mainly in the form of software at a lower price. Software appliance are much cheaper because it does not include hardware and usually licensed based on the number of server/modul, not by the number of user. Untangle is best example for this kind of appliance (although Untangle also provided hardware appliance for some country).<br />
<strong>WHAT IS UNTANGLE ?</strong><br />
<strong></strong>Untangle is a software -based network gateway built from Debian Linux to secure the network . Since the end of 2013 , Untangle split their product into 2 products line : Untangle NG ( Next Generation )  Firewall and Untangle IC (Internet Control) . We will  discus Untangle NG Firewall for anti spam appliance.<br />
<a href="http://54.254.121.108/wp-content/uploads/2014/02/vavai-untangle.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1591" alt="vavai-untangle" src="http://54.254.121.108/wp-content/uploads/2014/02/vavai-untangle.jpg" width="640" height="371" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-untangle.jpg 640w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/vavai-untangle-300x174.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a><br />
Features of Untangle</p>
<ul>
<li><span style="line-height: 1.5em;">Web Filter</span></li>
<li><span style="line-height: 1.5em;">Spam Blocker</span></li>
<li>Application Control</li>
<li>Virus Blocker</li>
<li>Spyware Blocker</li>
<li>Phish Blocker</li>
<li>Intrusion Prevention</li>
<li>Attack Blocker</li>
<li>Firewall</li>
<li>Open VPN</li>
<li>Captive Portal</li>
<li>Ad Blocker</li>
<li>Reports</li>
</ul>
<p>Our engineers test several anti-spam software  and Untangle eventually be an option due to  the following consideration :</p>
<ol>
<li>Easy to install</li>
<li><span style="line-height: 1.5em;">Provides a variety of free features</span></li>
<li><span style="line-height: 1.5em;">Paid Feature  are modular, can choose some specific modules and disable the features that are not required</span></li>
<li><span style="line-height: 1.5em;">Can be set as an anti- spam appliance with a few brief setting, goal of this article <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></li>
<li><span style="line-height: 1.5em;">Proven reliable based on personal experience <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></li>
<li><span style="line-height: 1.5em;">Appliance can be installed above or directly on a physical computer</span></li>
<li><span style="line-height: 1.5em;">Has the complete functions , including remote access option by Untangle engineer for premium license</span></li>
</ol>
<p><a href="http://54.254.121.108/wp-content/uploads/2014/02/untangle-spam-blocker-feature.png"><img loading="lazy" decoding="async" class="alignnone  wp-image-1593" alt="untangle-spam-blocker-feature" src="http://54.254.121.108/wp-content/uploads/2014/02/untangle-spam-blocker-feature.png" width="607" height="253" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/untangle-spam-blocker-feature.png 674w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/untangle-spam-blocker-feature-300x125.png 300w" sizes="auto, (max-width: 607px) 100vw, 607px" /></a><br />
Based on our test results on the production server for 1 month usage, the total incoming email approximately 1 million emails and Untangle kick about 800 thousand spam emails . Due to the <a href="https://www.untangle.com/store/spam-blocker-conf.html">information page on their website</a>, Untangle claims its accuracy detection rate are about 97% of the total incoming spam. Beware : the result may varies due to many factor, please try it to obtain the actual result.<br />
Although most of our deployment are for protecting Zimbra mail server, Untangle can be deploys with with Microsoft Exchange Server, MDaemon , Lotus Domino and others.<br />
In the next article we will discuss about the installation and configuration procedures for preparing Untangle as an anti spam appliance.</p>
<p>The post <a href="https://www.vavai.net/how-to-build-an-anti-spam-appliance-using-untangle-part-1/">How to Build an Anti Spam Appliance Using Untangle-Part 1</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/how-to-build-an-anti-spam-appliance-using-untangle-part-1/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>
	</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 8/131 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 using Disk (Request-wide modification query)

Served from: www.vavai.net @ 2026-10-29 05:34:09 by W3 Total Cache
-->