<?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>numlock.ch - a changelog by Daniel Mettler &#187; Postfix</title>
	<atom:link href="http://www.numlock.ch/news/tag/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.numlock.ch/news</link>
	<description>Make a diff!</description>
	<lastBuildDate>Tue, 01 Nov 2011 16:19:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gentoo: Mailman 2.1.11 incompatibility with Python 2.6</title>
		<link>http://www.numlock.ch/news/it/gentoo-mailman-2-1-11-incompatibility-with-python-2-6/</link>
		<comments>http://www.numlock.ch/news/it/gentoo-mailman-2-1-11-incompatibility-with-python-2-6/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 22:00:30 +0000</pubDate>
		<dc:creator>Daniel Mettler</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.numlock.ch/news/?p=752</guid>
		<description><![CDATA[Mailman 2.1.11 (or earlier) isn&#8217;t compatible to Python 2.6. So if you upgrade your box to Python 2.6 without upgrading to Mailman 2.1.12 at the same time, you&#8217;ll run into troubles. And if you&#8217;re unlucky (e.g. when running some low-volume &#8230; <a href="http://www.numlock.ch/news/it/gentoo-mailman-2-1-11-incompatibility-with-python-2-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnu.org/software/mailman/index.html" target="_blank">Mailman</a> 2.1.11 (or earlier) isn&#8217;t compatible to Python 2.6. So if you upgrade your box to Python 2.6 without upgrading to Mailman 2.1.12 at the same time, you&#8217;ll run into troubles. And if you&#8217;re unlucky (e.g. when running some low-volume mailing lists), you might not even notice it.</p>
<p>One sign of such troubles is that messages sent to your Mailman mailing lists aren&#8217;t processed anymore. They simply seem to get &#8220;swallowed&#8221; by your Mailman server: Messages don&#8217;t reach the list, don&#8217;t get forwarded to subscribers and there&#8217;s no bounce or failure notice. For low-traffic lists, this might go unnoticed for several days or even weeks.</p>
<p>Another sign (that can easily slip through under certain, quite common circumstances) is that as long as you&#8217;re running Mailman 2.1.11 with Python 2.6, cron will, every 5 minutes,  send an error message to mailman@myhost.com with a subject similar to</p>
<blockquote><p>Cron &lt;mailman@myhost&gt; /usr/bin/python -S /usr/lib64/mailman/cron/gate_news</p></blockquote>
<p>and a content like</p>
<blockquote><p>/usr/lib64/mailman/Mailman/Utils.py:32: DeprecationWarning: the sha module is deprecated; use the hashlib module instead<br />
import sha<br />
Traceback (most recent call last):<br />
File &#8220;/usr/lib64/mailman/cron/gate_news&#8221;, line 44, in &lt;module&gt;<br />
from Mailman import MailList<br />
File &#8220;/usr/lib64/mailman/Mailman/MailList.py&#8221;, line 51, in &lt;module&gt;<br />
from Mailman.Archiver import Archiver<br />
File &#8220;/usr/lib64/mailman/Mailman/Archiver/__init__.py&#8221;, line 17, in &lt;module&gt;<br />
from Archiver import *<br />
File &#8220;/usr/lib64/mailman/Mailman/Archiver/Archiver.py&#8221;, line 32, in &lt;module&gt;<br />
from Mailman import Mailbox<br />
File &#8220;/usr/lib64/mailman/Mailman/Mailbox.py&#8221;, line 21, in &lt;module&gt;<br />
import mailbox<br />
File &#8220;/usr/lib64/python2.6/mailbox.py&#8221;, line 19, in &lt;module&gt;<br />
import email.message<br />
ImportError: No module named message</p></blockquote>
<p>That by itself wouldn&#8217;t be a big problem and probably get noticed quickly if you forwarded mailman@yourhost.com to your admin&#8217;s e-mail address. The problem arises if you happen to host a mailing list named &#8220;mailman&#8221; (which is often set up as a mailing list for testing and debugging). In that (not uncommon) case, all these cron error messages are forwarded to the &#8220;mailman&#8221; mailing list.  This makes about 288 messages per day that are queued in /var/lib/mailman/qfiles/in and won&#8217;t be delivered (due to the compatibility problem with Python 2.6).</p>
<p>Once you upgrade to Mailman 2.1.12 (and restart /etc/init.d/mailman), all these messages in /var/lib/mailman/qfiles/in will be queued by your MTA (e.g. postfix). This may seem like a strange loop problem in Mailman (or your MTA configuration), which is quite irritating at first.</p>
<p>Here&#8217;s how to solve the problem (you may need to adjust these steps to your settings/system paths):</p>
<p>1) Temporarily stop the Mailman service</p>
<blockquote><p>/etc/init.d/mailman stop</p></blockquote>
<p>2) Delete all the queued messages to/for mailman-owner@myhost.mydomain.com in your MTA&#8217;s mail queue. For postfix as MTA, the following script may be helpful: <a href="/news/it/mailman-developers-postfix-mailq-formatterdumpersearcher-mq/" target="_self">mailq</a> by Dan Mick.</p>
<p>3) Delete all the cron-generated error messages in /var/lib/mailman/qfiles/in.</p>
<p>In order to determine these error messages, use Mailman&#8217;s show_qfiles command to view the message content, e.g.</p>
<blockquote><p>/usr/lib64/mailman/bin/show_qfiles /var/lib/mailman/qfiles/in/longnumber.longnumber.pck</p></blockquote>
<p>The best way to identify these messages is by filtering them according to their file size. Usually they have sizes around 1600 bytes. E.g. for a file size of 1635 bytes, try sth similar to:</p>
<blockquote><p>cd /var/lib/mailman/qfiles/in</p>
<p>find ./ -size 1635c -exec rm {} \;</p></blockquote>
<p>4) Once you&#8217;ve deleted all these cron error messages in Mailman&#8217;s in-queue, you can restart Mailman (/etc/init.d/mailman start). Mailman will then start delivering the remaining valid files in its in-queue. Your MTA/postfix queue looks normal again (i.e. there&#8217;s no more overflowing)!</p>
<p>5) Finally, you need to manually &#8220;discard all messages marked <em>Defer</em>&#8221; for the &#8216;mailman&#8217; mailing list using the web admin interface (usually on https://myhost.mydomain.com/mailman/admindb/mailman or similar). Before discarding these messages, make sure you don&#8217;t discard any valid messages.</p>
<p>That&#8217;s it!</p>
<p>Thanks to <a href="http://launchpad.net/~msapiro">Mark Sapiro</a> AKA msapiro from #mailman @ irc.freenode.net for very useful hints and help!</p>
<p>P.S. Some other helpful resources in case of Mailman problems:</p>
<p><a href="http://wiki.list.org/display/DOC/4.68+Why+do+I+get+-Errno+2-+No+such+file+or+directory-+referring+to+a+qfiles+.pck+file+in+my+error+log.;jsessionid=D8945CFF11791F2F932E0B9C7E25A1CA" target="_blank">How to find running Mailman instances (qrunners)</a></p>
<p><a href="http://list.org/mailman-install/node13.html" target="_blank">How to integrate postfix and Mailman</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.numlock.ch/news/it/gentoo-mailman-2-1-11-incompatibility-with-python-2-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo: Greylisting for Postfix using Postgrey</title>
		<link>http://www.numlock.ch/news/it/gentoo-greylisting-for-postfix-using-postgrey/</link>
		<comments>http://www.numlock.ch/news/it/gentoo-greylisting-for-postfix-using-postgrey/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 01:58:27 +0000</pubDate>
		<dc:creator>Daniel Mettler</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[numlock.ch]]></category>
		<category><![CDATA[printscreen.ch]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Greylisting]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Postgrey]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.numlock.ch/news/?p=695</guid>
		<description><![CDATA[Finally, I&#8217;ve had to enable greylisting for this domain due to ever increasing levels of spam. Fortunately, setting it up is very easy. For Gentoo and Postfix, here&#8217;s a nice walkthrough: postfix greylisting on gentoo (postgrey) &#124; andreas d.&#8217;s. Let&#8217;s &#8230; <a href="http://www.numlock.ch/news/it/gentoo-greylisting-for-postfix-using-postgrey/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finally, I&#8217;ve had to enable <a href="http://en.wikipedia.org/wiki/Greylisting" target="_blank">greylisting</a> for this domain due to ever increasing levels of spam. Fortunately, setting it up is very easy. For Gentoo and Postfix, here&#8217;s a nice walkthrough:</p>
<p><a href="http://www.selbstzweck.net/2008/11/postfix-greylisting-on-gentoo-postgrey/">postfix greylisting on gentoo (postgrey) | andreas d.&#8217;s</a>.</p>
<p>Let&#8217;s hope that this, in conjunction with other anti-spam measures, will do it for a while.</p>
<p>Non-spammers shouldn&#8217;t experience any problems due to this change, but if you do, please contact me using Skype (mettlerd), phone or SMS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numlock.ch/news/it/gentoo-greylisting-for-postfix-using-postgrey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Procmail and Postfix with maildir for mobile usage</title>
		<link>http://www.numlock.ch/news/it/setting-up-procmail-and-postfix-with-maildir-for-mobile-usage/</link>
		<comments>http://www.numlock.ch/news/it/setting-up-procmail-and-postfix-with-maildir-for-mobile-usage/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 23:04:32 +0000</pubDate>
		<dc:creator>Daniel Mettler</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[numlock.ch]]></category>
		<category><![CDATA[printscreen.ch]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[maildir]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia e61i]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://www.numlock.ch/news/?p=561</guid>
		<description><![CDATA[When I&#8217;m on the road, I can check my private and business e-mail using my very handy Nokia e61i smartphone (which I like a lot, apart from its rather unstable web browser). However, as I&#8217;ve never been far away from &#8230; <a href="http://www.numlock.ch/news/it/setting-up-procmail-and-postfix-with-maildir-for-mobile-usage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I&#8217;m on the road, I can check my private and business e-mail using my very handy Nokia e61i smartphone (which I like a lot, apart from its rather unstable web browser). However, as I&#8217;ve never been far away from a computer for a long time so far, I&#8217;ve only used to check mail that was delivered to my inbox, and not to any of its about 200 subfolders (I once tried to subscribe to all folders &#8211; the mail client of the e61i simply crashed ;). Now, I figured I&#8217;d need to do something about this in order to not miss any of the mails that are automatically moved to a subfolder by the server-side procmail mail filter.</p>
<p>The solution: Simply create a new procmail rule that <strong>copies</strong> (that&#8217;s what the c stands for)<strong> </strong>any incoming message to a special folder (I named it &#8220;mobile&#8221;; note that my postfix uses the maildir format to store messages):</p>
<blockquote><p>:0 c<br />
.mobile/</p></blockquote>
<p>Preferably, this rule should be placed after the spam filtering rules (you don&#8217;t want to pay for spam on your mobile, do you? ;) and before the normal procmail mail filter rules (which move every incoming mail to the appropriate subfolder). You can also use a dedicated rules file for every group of similar rules. For example, I include the files spam.rc, mobile.rc, lists.rc (with their according rules) in the main .procmailrc config file.</p>
<p>Now every mail that wasn&#8217;t filtered by the spam filter gets copied to the &#8220;mobile&#8221; subfolder of your inbox prior to getting moved to the appropriate subfolder (by the rules in lists.rc).</p>
<p>On my e61i, I hence only need to subscribe to the &#8220;mobile&#8221; subfolder in order to catch all incoming messages. As you can&#8217;t unsubscribe from the inbox subfolder itself, you should set the maximum number of caught new inbox mails to 1 (which is the minimum) in order to avoid fetching things twice. You can further configure that only headers are fetched to minimize the amount of data[1] that is automatically downloaded with every mail check (also: switch off polling if you don&#8217;t need it).</p>
<p>Note that another advantage of this solution is that you won&#8217;t tamper with any of the original messages (that are either in your inbox or in any of its subfolders). Some might call this a disadvantage though.</p>
<p>That&#8217;s it, have fun! :)</p>
<p>[1] I pay 0.10 CHF per 20 KB, i.e. 5 CHF (5 USD) per MB (which is incredibly expensive as I currently don&#8217;t have any flat rate data plan -&gt; please don&#8217;t send me a mail bomb just for fun, else I&#8217;ll have to write a more sophisticated procmail rule that only copies messages &lt; 100 KB to the mobile folder)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numlock.ch/news/it/setting-up-procmail-and-postfix-with-maildir-for-mobile-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up postfix for virtual mail hosts</title>
		<link>http://www.numlock.ch/news/it/setting-up-postfix-for-virtual-mail-hosts/</link>
		<comments>http://www.numlock.ch/news/it/setting-up-postfix-for-virtual-mail-hosts/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 21:41:12 +0000</pubDate>
		<dc:creator>Daniel Mettler</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[numlock.ch]]></category>
		<category><![CDATA[printscreen.ch]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtual hosting]]></category>

		<guid isPermaLink="false">https://www.numlock.ch/news/it/setting-up-postfix-for-virtual-mail-hosts/</guid>
		<description><![CDATA[After setting up name-based virtual web hosting for Apache, I&#8217;ve just set up virtual mail hosting for my new company, Printscreen GmbH, using postfix &#8211; and it was amazingly simple! :) For some basic virtual mail hosting using normal UNIX/Linux &#8230; <a href="http://www.numlock.ch/news/it/setting-up-postfix-for-virtual-mail-hosts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After setting up name-based virtual web hosting for Apache, I&#8217;ve just set up virtual mail hosting for my new company, <a href="http://www.printscreen.ch" target="_blank">Printscreen GmbH</a>, using postfix &#8211; and it was amazingly simple! :) For some basic virtual mail hosting using normal UNIX/Linux user accounts, all you need is a plain-text file (&#8216;/etc/postfix/virtual&#8217;) that maps virtual mail addresses to the actual user accounts and two additional lines in main.cf:</p>
<blockquote><p> /etc/postfix/virtual:<br />
<code>postmaster@example.com postmaster<br />
# Uncomment entry below to implement a catch-all address<br />
# @example.com         jim</code></p>
<p>/etc/postfix/main.cf:<br />
<code>virtual_alias_domains = example.com<br />
virtual_alias_maps = hash:/etc/postfix/virtual</code></p></blockquote>
<p>Then just execute</p>
<p><code># postmap /etc/postfix/virtual &amp;&amp; /etc/init.d/postfix reload</code></p>
<p>Voilà!</p>
<p>The nice postfix readme file for this and some more complicated virtual mail hosting configurations:</p>
<p><a href="http://www.postfix.org/VIRTUAL_README.html" target="_blank">http://www.postfix.org/VIRTUAL_README.html</a></p>
<p>Another, possibly helpful howto (search):</p>
<p><a href="http://www.freebsddiary.org/postfix.php" target="_blank">http://www.freebsddiary.org/postfix.php</a></p>
<p>For setups using a MySQL database as a backend for storing the mappings, see Google. I currently don&#8217;t need this and hence don&#8217;t like to introduce any unnecessary MySQL dependency to my postfix server &#8211; remember the <a href="http://en.wikipedia.org/wiki/KISS_principle" target="_blank">KISS principle</a> ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numlock.ch/news/it/setting-up-postfix-for-virtual-mail-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix mailq formatter/dumper/searcher: mq</title>
		<link>http://www.numlock.ch/news/it/mailman-developers-postfix-mailq-formatterdumpersearcher-mq/</link>
		<comments>http://www.numlock.ch/news/it/mailman-developers-postfix-mailq-formatterdumpersearcher-mq/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 19:33:10 +0000</pubDate>
		<dc:creator>Daniel Mettler</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[numlock.ch]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[mailq]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">https://www.numlock.ch/news/it/mailman-developers-postfix-mailq-formatterdumpersearcher-mq/</guid>
		<description><![CDATA[While debugging a Gentoo/Mailman problem, I found this very useful python wrapper for mailq provided by Dan Mick. It allows to selectively display message IDs of queued messages for a certain recipient. Thanks, Dan! [Mailman-Developers] Postfix mailq formatter/dumper/searcher: mq]]></description>
			<content:encoded><![CDATA[<p>While debugging a Gentoo/Mailman problem, I found this very useful python wrapper for mailq provided by <a href="http://blogs.sun.com/dmick/" target="_blank">Dan Mick</a>. It allows to selectively display message IDs of queued messages for a certain recipient. Thanks, Dan!</p>
<p><a href="http://mail.python.org/pipermail/mailman-developers/2002-January/010542.html" target="_blank">[Mailman-Developers] Postfix mailq formatter/dumper/searcher: mq</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.numlock.ch/news/it/mailman-developers-postfix-mailq-formatterdumpersearcher-mq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

