<?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>Viktor Petersson.com &#187; SMTP</title>
	<atom:link href="http://viktorpetersson.com/tag/smtp/feed/" rel="self" type="application/rss+xml" />
	<link>http://viktorpetersson.com</link>
	<description>Hello my name is Viktor, and I&#039;m a startup-oholic.</description>
	<lastBuildDate>Tue, 15 May 2012 20:32:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Implementing ASSP with Postfix on FreeBSD</title>
		<link>http://viktorpetersson.com/2010/12/14/implementing-assp-with-postfix-on-freebsd/</link>
		<comments>http://viktorpetersson.com/2010/12/14/implementing-assp-with-postfix-on-freebsd/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 22:15:54 +0000</pubDate>
		<dc:creator>Viktor Petersson</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[ASSP]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://viktorpetersson.com/?p=731</guid>
		<description><![CDATA[In this article, I will walk you through the process of setting up ASSP. If you&#8217;ve never heard of ASSP, it is a great anti-virus and spam-fighting proxy that sits in front of your SMTP server. Under the hood, ASSP includes a lot of intelligent spam logic, but you won&#8217;t really have to worry about [...]]]></description>
			<content:encoded><![CDATA[<p>In this article, I will walk you through the process of setting up <a href="http://assp.sourceforge.net/">ASSP</a>. If you&#8217;ve never heard of ASSP, it is a great anti-virus and spam-fighting proxy that sits in front of your SMTP server. Under the hood, ASSP includes a lot of intelligent spam logic, but you won&#8217;t really have to worry about it. All you really need to know is that it great at fighting spam and that it is easy to set up.  </p>
<p>In this article I assume that you already got Postfix in place, but you can use ASSP with any other SMTP server, as it simply sits as a proxy between the user and the SMTP server. In essence, what you need to do is to re-bind your SMTP server to another port (eg. 125) or IP (eg. 127.0.0.1) and have ASSP listen on the public interface and relay the messages to your SMTP server.</p>
<p>Let&#8217;s get started.<br />
<span id="more-731"></span></p>
<h3>Install ASSP</h3>
<p>We start by installing ASSP. Since this guide is for FreeBSD, we will use the ports-system. However, if you&#8217;re on a different platform, you can simply install ASSP from source.</p>
<blockquote><p>
cd /usr/ports/mail/assp/<br />
make install
</p></blockquote>
<p>Enable ASSP and Clamav by adding the following to /etc/rc.conf</p>
<blockquote><p>
clamav_clamd_enable=&#8221;YES&#8221;<br />
clamav_freshclam_enable=&#8221;YES&#8221;<br />
assp_enable=&#8221;YES&#8221;
</p></blockquote>
<p>Add your domains from Postfix to ASSP:</p>
<blockquote><p>
postconf  | grep -e ^virtual_alias_domains.* -e ^mydestination.* | perl -pe &#8220;s/^(mydestination|virtual_alias_domains)\s=\s(.*)$/\2/g; s/\s/\n/g;&#8221; > /usr/local/share/assp/files/localdomains.txt
</p></blockquote>
<p>(This simply extract the settings from Postfix and insert them to ASSP)</p>
<p>Now start the two services:</p>
<blockquote><p>
/usr/local/etc/rc.d/assp start<br />
/usr/local/etc/rc.d/clamav-clamd start<br />
 /usr/local/etc/rc.d/ clamav-freshclam start
</p></blockquote>
<h3>Configure ASSP</h3>
<p>Now we need to make some changes to ASSP. By default, ASSP&#8217;s webserver listen on port 55555, so you need to point your browser to your server and this port. (eg. http://yourhostname:55555).</p>
<p>The default username is root and the password is &#8216;nospam4me&#8217;</p>
<p>Go ahead and make the following changes:</p>
<ul>
<li>Second SMTP Listen Port: 587</li>
<li>All TestModes ON: True</li>
<p>You need this set for about a week while you train ASSP. </p>
<li>Prepend Spam Subject: [Spam]</li>
<li>Accept All Mail: The IP or hostname of your server</li>
<li>Local Domains: file:files/localdomains.txt</li>
<li>Local Domains,IPs and Hostnames: The IP or hostname of your server</li>
<li>Use ClamAV: True</li>
<li>Modify ClamAV Module: False</li>
<li>Port or file socket for ClamAV: /var/run/clamav/clamd.sock</li>
<li>Web Admin Password: Your password</li>
</ul>
<p>Press &#8216;Apply changes&#8217;.</p>
<h3>Modify Postfix</h3>
<p>When you&#8217;re happy with your ASSP configuration, we need to modify your SMTP server to listen on a different port (in this case, port 125). If you are using Postfix, open /usr/local/etc/postfix/master.cf and change the line:</p>
<blockquote><p>
smtp      inet  n       &#8211;       n       &#8211;       &#8211;       smtpd
</p></blockquote>
<p>to</p>
<blockquote><p>
125      inet  n       &#8211;       n       &#8211;       &#8211;       smtpd
</p></blockquote>
<p>You also need to comment out the following line by simply adding a &#8216;#&#8217; to the beginning of the line.</p>
<blockquote><p>
submission inet n       &#8211;       n       &#8211;       &#8211;       smtpd
</p></blockquote>
<p>Now we need to restart both Postfix and ASSP to apply the changes (the sequence here is important):</p>
<blockquote><p>
/usr/local/etc/rc.d/postfix restart<br />
/usr/local/etc/rc.d/assp restart
</p></blockquote>
<p>Verify that all the services are running with</p>
<blockquote><p>
sockstat -4l | grep -e 25 -e 125 -e 587
</p></blockquote>
<p>If not, take a look in the following log-files:</p>
<ul>
<li>/var/log/maillog</li>
<li>/var/log/assp/maillog.txt</li>
</ul>
<h3>Training ASSP</h3>
<p>Once you got ASSP up and running, you are likely to get a lot of valid emails marked as spam the first days.  That&#8217;s normal. ASSP needs some training. If you run across a message that was marked as spam but was indeed a valid message, simply forward it to <strong>assp-notspam@assp.local</strong>. In a similar fashion, if you run across a spam message that ASSP failed to detect as spam, simply forward it to <strong>assp-spam@assp.local</strong>. </p>
<p>After about  a week or so of training (depending on your volume), you can go ahead and disable &#8216;All TestModes&#8217; in the web interface.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://viktorpetersson.com/2010/12/14/implementing-assp-with-postfix-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New email troubleshooting guide</title>
		<link>http://viktorpetersson.com/2010/02/04/new-email-troubleshooting-guide/</link>
		<comments>http://viktorpetersson.com/2010/02/04/new-email-troubleshooting-guide/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:11:26 +0000</pubDate>
		<dc:creator>Viktor Petersson</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[POP3]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://viktorpetersson.com/?p=211</guid>
		<description><![CDATA[I just published a guide on how to troubleshoot email over at Email Service Guide. It&#8217;s fairly straight forward, but does require a bit of technical skills. The reason why I wrote the guide was actually because I quite frequently found myself Googling for a good IMAP cheat sheet (the RFC is not very good [...]]]></description>
			<content:encoded><![CDATA[<p>I just published a guide on how to troubleshoot email over at <a href="http://www.emailserviceguide.com/email-troubleshooting-guide/">Email Service Guide</a>. It&#8217;s fairly straight forward, but does require a bit of technical skills. </p>
<p>The reason why I wrote the guide was actually because I quite frequently found myself Googling for a good IMAP cheat sheet (the RFC is not very good for this).  Once I started writing, I realized that it wouldn&#8217;t take a whole lot more effort to include POP3 and SMTP as well (since the technique is the same). So I included them too. </p>
]]></content:encoded>
			<wfw:commentRss>http://viktorpetersson.com/2010/02/04/new-email-troubleshooting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 3/7 queries in 0.003 seconds using apc
Object Caching 337/345 objects using apc

Served from: viktorpetersson.* @ 2012-05-18 07:20:32 -->
