<?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>k3mist™ &#187; postfix</title>
	<atom:link href="http://k3mist.com/tag/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://k3mist.com</link>
	<description>Development, Design &#38; System Administration</description>
	<lastBuildDate>Sat, 12 Sep 2009 15:40:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Postfix catch-all. The proper way&#8230;</title>
		<link>http://k3mist.com/linux/posix-catch-all-the-proper-way/</link>
		<comments>http://k3mist.com/linux/posix-catch-all-the-proper-way/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 16:34:44 +0000</pubDate>
		<dc:creator>k3mist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[postfix catch-all]]></category>

		<guid isPermaLink="false">http://k3mist.com/?p=172</guid>
		<description><![CDATA[<p>An issue I recently encountered with some mail servers was poor MTA reputation. Even though the servers were only used for corporate email, somehow their MTA is poor at senderbase, even though none of the IP&#8217;s are on a single RBL/SBL. This is partly due to Slicehost having bad IP blocks and the method they use for assigning IP&#8217;s to new slices. But I believe the issue can be resolved with good history.</p>
<p>I know that the servers are properly configured (because I set them up) and they are not an open relay. They reject mail correctly and SA/CAV are filtering mail correctly.</p>
<p>Without knowing the cause I took two approaches to resolve the issue. The first thing I did was change the RDNS for the machines. The second thing I did was setup a Postfix catch-all to cut down on outgoing mail from the machines. The servers each receive 30-60 or more email&#8217;s a minute to unknown users. This is a mere trickle compared to most mail servers, but enough.</p>
<p>It&#8217;s bad practice to setup a catch-all. But when you are not AOL, Microsoft, Google, etc, you have very little push and pull on the internet and can get blocked for adding to the spam. Some spammers are clever enough to purposely use other mail servers to reject mail and send that email to their intended recipient.</p>
<p>Anyway, after much research, not a single blog, howto or tutorial demonstrated how to setup a catch-all in Postfix correctly. Every method I read about caught ALL mail even if the intended recipient existed locally on the machine. One blog post I read said it would send the mail to the correct recipient before it redirected mail for the unknown user, which goes to show this guy did not test his configuration and even posted about it!</p>
<p>I eventually found my way by reading the postfix configuration documentation. This very simple method is a combination of two parameters you can add in /etc/postfix/main.cf<br />
<code><br />
luser_relay = localuser@localdomain.com<br />
local_recipient_maps =<br />
</code></p>
<p>luser_relay is the local user on the machine to catch all email that does not belong to an existing local user. <a href="http://www.postfix.org/postconf.5.html#luser_relay" target="_blank">luser_relay documentation</a>.</p>
<p>local_recipient_maps is left blank to stop Postfix from checking if the user exists on the local machine. This is very important, without this line, Postfix will still reject the mail and send a bounce message. <a href="http://www.postfix.org/postconf.5.html#local_recipient_maps" target="_blank">local_recipient_maps documenation</a>.</p>
<p>After adding the above two lines to the configuration, apply the changes and restart Postfix in terminal.<br />
<code><br />
service postfix reload<br />
/etc/init.d/postfix restart<br />
</code></p>
]]></description>
			<content:encoded><![CDATA[<p>An issue I recently encountered with some mail servers was poor MTA reputation. Even though the servers were only used for corporate email, somehow their MTA is poor at senderbase, even though none of the IP&#8217;s are on a single RBL/SBL. This is partly due to Slicehost having bad IP blocks and the method they use for assigning IP&#8217;s to new slices. But I believe the issue can be resolved with good history.</p>
<p>I know that the servers are properly configured (because I set them up) and they are not an open relay. They reject mail correctly and SA/CAV are filtering mail correctly.</p>
<p>Without knowing the cause I took two approaches to resolve the issue. The first thing I did was change the RDNS for the machines. The second thing I did was setup a Postfix catch-all to cut down on outgoing mail from the machines. The servers each receive 30-60 or more email&#8217;s a minute to unknown users. This is a mere trickle compared to most mail servers, but enough.</p>
<p>It&#8217;s bad practice to setup a catch-all. But when you are not AOL, Microsoft, Google, etc, you have very little push and pull on the internet and can get blocked for adding to the spam. Some spammers are clever enough to purposely use other mail servers to reject mail and send that email to their intended recipient.</p>
<p>Anyway, after much research, not a single blog, howto or tutorial demonstrated how to setup a catch-all in Postfix correctly. Every method I read about caught ALL mail even if the intended recipient existed locally on the machine. One blog post I read said it would send the mail to the correct recipient before it redirected mail for the unknown user, which goes to show this guy did not test his configuration and even posted about it!</p>
<p>I eventually found my way by reading the postfix configuration documentation. This very simple method is a combination of two parameters you can add in /etc/postfix/main.cf<br />
<code><br />
luser_relay = localuser@localdomain.com<br />
local_recipient_maps =<br />
</code></p>
<p>luser_relay is the local user on the machine to catch all email that does not belong to an existing local user. <a href="http://www.postfix.org/postconf.5.html#luser_relay" target="_blank">luser_relay documentation</a>.</p>
<p>local_recipient_maps is left blank to stop Postfix from checking if the user exists on the local machine. This is very important, without this line, Postfix will still reject the mail and send a bounce message. <a href="http://www.postfix.org/postconf.5.html#local_recipient_maps" target="_blank">local_recipient_maps documenation</a>.</p>
<p>After adding the above two lines to the configuration, apply the changes and restart Postfix in terminal.<br />
<code><br />
service postfix reload<br />
/etc/init.d/postfix restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://k3mist.com/linux/posix-catch-all-the-proper-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
