<?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>DBWS.NET &#187; mailserver</title>
	<atom:link href="http://www.dbws.net/blog/tag/mailserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dbws.net/blog</link>
	<description>Software development mutterings and maybe a little something about myself.</description>
	<lastBuildDate>Wed, 09 Nov 2011 16:56:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Postgrey &#8211; A very useful antispam tool</title>
		<link>http://www.dbws.net/blog/2007/02/15/postgrey-a-seemingly-very-usefull-anti-spam-tool/</link>
		<comments>http://www.dbws.net/blog/2007/02/15/postgrey-a-seemingly-very-usefull-anti-spam-tool/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 18:37:44 +0000</pubDate>
		<dc:creator>Bolo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[mailserver]]></category>
		<category><![CDATA[postgray]]></category>
		<category><![CDATA[postgrey]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.dbws.net/blog/?p=5</guid>
		<description><![CDATA[Today I decided to install Postgrey on my mail server to help reduce the mass influx of crap I get in my mailbox on a daily basis. I&#8217;m not the type of person to have only one email address, I feel the need to use a catch all as I despise the thought of losing [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to install Postgrey on my mail server to help reduce the mass influx of crap I get in my mailbox on a daily basis.  I&#8217;m not the type of person to have only one email address, I feel the need to use a catch all as I despise the thought of losing emails. And yes there are several thousand items in my inbox I haven&#8217;t brought myself to removing.</p>
<p>Anyway I&#8217;ve had it running a couple of hours now and it looks to be pretty efficient in its job and its FAR easier to setup than spamassassin etc.</p>
<p><strong>What is it ?</strong></p>
<p>In a nutshell, Postgrey rejects incoming emails. Yes that sounds drastic but a legitimate mail server will resend the message where as the mailservers spammers use tend to send out messages in such bulk they want to get the job over and done with as quickly as possible and don&#8217;t care if they miss a few recipients. Thats the idea anyway.<br />
On with the setup ..</p>
<p>Firstly I am using postfix on a ubuntu 6.06 based server &amp; assume all instructions are executed as sudo.</p>
<p>1. Install with apt-get</p>
<p><code>apt-get install postgrey</code></p>
<p>2. Edit the postfix configuration so it will work with postgrey. I use nano as an editor.</p>
<p><code>nano /etc/postfix/main.cf</code></p>
<p>Find the line &#8211;  <strong>smtpd_recipient_restrictions = </strong></p>
<p>Add the following lines, you may already have the first, I did.</p>
<p><strong>reject_unauth_destination<br />
check_policy_service inet:127.0.0.1:60000</strong></p>
<p>3. Alter postfix settings (Optional)</p>
<p>By default, postfix will delay an incoming message for 300s, I think 5 minutes is a bit steep so you can change this, although this may increase the chances of receiving spam. I changed mine to 1 minute.</p>
<p><code>nano /etc/default/postgrey</code></p>
<p>Find the line <strong>POSTGREY_OPTS=&#8221;&#8211;inet=127.0.0.1:60000 &#8211;delay=300&#8243;</strong> and change 300 to 60 so you end up with <strong>POSTGREY_OPTS=&#8221;&#8211;inet=127.0.0.1:60000 &#8211;delay=60&#8243;</strong></p>
<p>Next you may wish to specify certain email addresses or domains that you wish postgrey to ignore as you trust them. These configurations are in the whitelist file.</p>
<p><code>nano /etc/postgrey/whitelist_clients</code></p>
<p>If you trust every address from hotmail (EXAMPLE ONLY !) you can add <strong>@hotmail.com</strong> on its own line in this file.</p>
<p>4. Restart Everything</p>
<p><code>/etc/init.d/postgrey restart<br />
postfix reload<br />
</code></p>
<p>Thats it.  You can monitor your mail log using <strong>tail /var/log/mail.log -f</strong> whilst sending an email to yourself from hotmail for example, and you should see the mail being rejected to make sure its working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbws.net/blog/2007/02/15/postgrey-a-seemingly-very-usefull-anti-spam-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

