<?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>Racker Hacker &#187; postfix</title>
	<atom:link href="http://rackerhacker.com/tag/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Wed, 16 May 2012 12:55:04 +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>SELinux and .forward files</title>
		<link>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/</link>
		<comments>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 22:44:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2680</guid>
		<description><![CDATA[If you want to forward e-mail from root to another user, you can usually place a .forward file in root's home directory and your mail server will take care of the rest: echo &#34;user@example.com&#34; &#62; /root/.forward With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents [...]<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you want to forward e-mail from root to another user, you can usually place a <code>.forward</code> file in root's home directory and your mail server will take care of the rest:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo &quot;user@example.com&quot; &gt; /root/.forward</pre></div></div>

<p>With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents of the <code>.forward</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">type=AVC msg=audit(1325543823.787:7416): avc:  denied  { open } for  pid=9850 
  comm=&quot;local&quot; name=&quot;.forward&quot; dev=md0 ino=17694734 
  scontext=system_u:system_r:postfix_local_t:s0 
  tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file</pre></div></div>

<p>The reason is that your <code>.forward</code> file doesn't have the right SELinux contexts.  You can set the correct contest quickly with <code>restorecon</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># ls -Z /root/.forward 
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 /root/.forward
# restorecon -v /root/.forward
restorecon reset /root/.forward context unconfined_u:object_r:admin_home_t:s0-&gt;system_u:object_r:mail_forward_t:s0
# ls -Z /root/.forward 
-rw-r--r--. root root system_u:object_r:mail_home_t:s0 /root/.forward</pre></div></div>

<p>Try to send another e-mail to root and you should see the mail server forward the e-mail properly without any additional AVC denials.</p>
<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic procmail configuration with spamassassin filtering</title>
		<link>http://rackerhacker.com/2008/08/13/basic-procmail-configuration-with-spamassassin-filtering/</link>
		<comments>http://rackerhacker.com/2008/08/13/basic-procmail-configuration-with-spamassassin-filtering/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 17:00:48 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=326</guid>
		<description><![CDATA[I've used this extremely basic procmail configuration a million times, and it's a great start for any server configuration. It passes e-mails through spamassassin (if they're smaller than 256KB) and then filters any e-mail marked as spam to /dev/null: LOGFILE=/var/log/procmail.log DROPPRIVS=yes :0fw &#124; /usr/bin/spamc :0 * ^X-Spam-Status: Yes /dev/null Of course, you can make this [...]<p><a href="http://rackerhacker.com/2008/08/13/basic-procmail-configuration-with-spamassassin-filtering/">Basic procmail configuration with spamassassin filtering</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I've used this extremely basic procmail configuration a million times, and it's a great start for any server configuration.  It passes e-mails through spamassassin (if they're smaller than 256KB) and then filters any e-mail marked as spam to /dev/null:</p>
<p><code>LOGFILE=/var/log/procmail.log<br />
DROPPRIVS=yes</p>
<p>:0fw<br />
| /usr/bin/spamc</p>
<p>:0<br />
* ^X-Spam-Status: Yes<br />
/dev/null</code></p>
<p>Of course, you can make this much more complicated with some additional customization.</p>
<p><a href="http://rackerhacker.com/2008/08/13/basic-procmail-configuration-with-spamassassin-filtering/">Basic procmail configuration with spamassassin filtering</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/08/13/basic-procmail-configuration-with-spamassassin-filtering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable submission port 587 in Postfix</title>
		<link>http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/</link>
		<comments>http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 00:29:36 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[submission]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/</guid>
		<description><![CDATA[Enabling submission port support for Postfix is really easy. To have postfix listen on both 25 and 587, be sure that the line starting with submission is uncommented in /etc/postfix/master.cf: smtp inet n - n - - smtpd submission inet n - n - - smtpd Enable submission port 587 in Postfix is a post [...]<p><a href="http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/">Enable submission port 587 in Postfix</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Enabling submission port support for Postfix is really easy.  To have postfix listen on both 25 and 587, be sure that the line starting with <b>submission</b> is uncommented in /etc/postfix/master.cf:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">smtp      inet  n       -       n       -       -       smtpd
submission inet n      -       n       -       -       smtpd</pre></div></div>

<p><a href="http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/">Enable submission port 587 in Postfix</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/07/04/enable-submission-port-587-in-postfix/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

