<?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>Random thoughts of an overloaded mind &#187; esa</title>
	<atom:link href="http://blog.amarkulo.com/tag/esa/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.amarkulo.com</link>
	<description>Yet another technical blog about iOS, Windows, Linux, Arduino and everything else</description>
	<lastBuildDate>Tue, 13 Dec 2011 16:56:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Defending Exchange server against spam with SpamAssassin</title>
		<link>http://blog.amarkulo.com/defending-exchange-server-against-spam-with-spamassassin</link>
		<comments>http://blog.amarkulo.com/defending-exchange-server-against-spam-with-spamassassin#comments</comments>
		<pubDate>Wed, 10 Sep 2008 17:28:22 +0000</pubDate>
		<dc:creator>amar</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[esa]]></category>
		<category><![CDATA[esa sink]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[sink]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://dzo.blogsite.org/?p=139</guid>
		<description><![CDATA[This short howto is written and done on Windows 2003 Server and Exchange 2003 Server. Because lately I (among other users) have begun to receive large number of spam on e-mail server of the company where I work, I have &#8230; <a href="http://blog.amarkulo.com/defending-exchange-server-against-spam-with-spamassassin">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This short howto is written and done on Windows 2003 Server and Exchange 2003 Server.</p>
<p>Because lately I (among other users) have begun to receive large number of spam on e-mail server of the company where I work, I have decided to implement SpamAssassin which is primary made for Linux.</p>
<p>I have searched little bit on the net how to do it and found <a title="ESA Sink" href="http://www.christopherlewis.com/ESA/ExchangeSpamAssassin.htm" target="_blank">ESA Sink</a> written by Christopher G. Lewis. It works on the principle that SpamAssasin is working in serial mode (it scans one message at a time) and ESA Sink take incoming message from Exchange, outputs it to file, run that file through SpamAssasin and returns it to Exchange if it is OK.</p>
<p>Installation and configuration of everything is not that much complicated. It can be divided in following steps:</p>
<ol>
<li>Download and install the latest version of Active Perl from <a title="Active State" href="http://www.activestate.com/" target="_blank">Active State</a></li>
<li>Download <a title="NMake" href="http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe" target="_blank">NMake</a> from Microsoft and after extracting move files to c:\perl\bin</li>
<li>Download <a title="ESA Sink" href="http://www.christopherlewis.com/ESA/ExchangeSpamAssassin.htm" target="_blank">ESA Sink</a> from <a title="Christopher G. Lewis" href="http://www.christopherlewis.com/" target="_blank">Chris&#8217;s site</a></li>
<li>After installation of ESA Sink you will get <strong>ExchangeSpamassassin.ini </strong>file opened</li>
<li>Check config file values, change if necessary, I have changed MaxMsgSizeKB from -1 to 2048 = 2MB and leave it opened for later as well as installation</li>
<li>Now start command prompt, Start-&gt;Run-&gt;Cmd and enter ppm to start Perl Package Manager</li>
<li>If you receive message that ppm is not recognizable type <strong>set path=%path%;c:\perl\bin\</strong> and then <strong>ppm</strong></li>
<li>Now in PPM press<strong> Ctrl+1</strong> to see list of available perl modules for installation</li>
<li>Type <strong>Net-Dns</strong> in search field and when you get this package in list click with right mouse button on it and select install</li>
<li>Now we will do same thing for <strong>IO-Socket-INET6, IP-Country</strong> and <strong>Mail-SPF</strong></li>
<li>Now press <strong>Ctrl+Enter</strong> to install these packages and when it is done you can close <strong>PPM</strong></li>
<li>Download the latest version of <a title="SpamAssassin" href="http://spamassassin.apache.org/" target="_blank">SpamAssassin</a> and unzip it to c:\Mail-SpamAssassin-3.2.5 (3.2.5=current version that you are downloading, in my case 3.2.5)</li>
<li>In the command prompt now type cd c:\Mail-SpamAssassin-3.2.5</li>
<li>Type following command: perl makefile.pl and answer questions before compiling</li>
<li>Now we need to run nmake, so just type <strong>nmake /i </strong>(/i means that we want nmake to compile application ignoring errors)</li>
<li>After compiling we need to run <strong>nmake /i install</strong> to install compiled files</li>
<li>Unset read-only attribute from <strong>c:\perl\site\bin\spamassassin.bat </strong>file</li>
<li>Now to test SpamAssassin we will enter in command prompt to directory <strong>C:\Mail-SpamAssassin-3.2.5\t\data\spam </strong>and execute command <strong>spamassassin -D &lt; 001</strong></li>
<li>If you see lot of text on your command prompt it means that SpamAssassin works like it should and on the end of output you should find scoring for content of file <strong>001</strong></li>
<li>Now we will return to <strong>.ini</strong> file from ESA setup and change line <strong>SpamAssassin_Batch_File </strong>to points to the location of our <strong>spamassassin.bat</strong> file which is <strong>c:\perl\site\bin\spamassassin.bat</strong></li>
<li>Save and close file and finish the ESA installation</li>
<li>At the end of the installation you will leave checkbox to run ESA install script and click Finish button</li>
<li>Small command prompt window will come and leave as soon as ESA is installed</li>
<li>Now to see if it is working properly you can check <strong>C:\ESA\Ham</strong> or <strong>C:\ESA\Spam</strong> directories for files and you can send e-mail to yourself as well, if everything works you should find SpamAssassin information in header of the e-mail</li>
<li>To be sure that you don&#8217;t have any errors you can check C:\ESA\Log directory in which you should find log file with errors</li>
</ol>
<p>This configuration works OK on servers that don&#8217;t receive more than 1500-2000 e-mail per day, but I wouldn&#8217;t recommend it for higher number of e-mails without very strong machine, because in this configuration SpamAssassin works in serial mode, it process one object at a time and this includes downloading of e-mail to file, control against filters, control against URBL lists and then if everything is ok returning it to server for delivery.</p>
<p>For me it was simple test to see if it will work for us, it didn&#8217;t worked because of large number of e-mails that we receive (10 000+ per day) so I will go on solution to create Linux SpamAssassin gateway.</p>
<p>Note: I would recomend creating of small .bat script that will delete .out files older than 7 days to avoid running out of disk on your system disk</p>
<hr>
<p><div class="entry-utility">If you don't already have a <a href="http://db.tt/aqrG0tY">Dropbox</a> account then you can create it by clicking on my <a href="http://db.tt/aqrG0tY">affiliate link</a>. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)</div></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amarkulo.com/defending-exchange-server-against-spam-with-spamassassin/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

