<?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; qmail</title>
	<atom:link href="http://rackerhacker.com/tag/qmail/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>Setting the maximum mail size in qmail</title>
		<link>http://rackerhacker.com/2008/03/24/setting-the-maximum-mail-size-in-qmail/</link>
		<comments>http://rackerhacker.com/2008/03/24/setting-the-maximum-mail-size-in-qmail/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 18:54:35 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/03/24/setting-the-maximum-mail-size-in-qmail/</guid>
		<description><![CDATA[On a Plesk server, the maximum size for an individual e-mail sent through qmail is unlimited. You can limit this size by adding a number to the /var/qmail/control/databytes file. If you wanted to limit this to something like 10MB, you can just run the following command: echo "10485760" > /var/qmail/control/databytes This will limit the size [...]<p><a href="http://rackerhacker.com/2008/03/24/setting-the-maximum-mail-size-in-qmail/">Setting the maximum mail size in qmail</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>On a Plesk server, the maximum size for an individual e-mail sent through qmail is unlimited.  You can limit this size by adding a number to the /var/qmail/control/databytes file.</p>
<p>If you wanted to limit this to something like 10MB, you can just run the following command:</p>
<p>echo "10485760" > /var/qmail/control/databytes</p>
<p>This will limit the size of messages (including attachments) to 10MB as a maximum.</p>
<p><a href="http://rackerhacker.com/2008/03/24/setting-the-maximum-mail-size-in-qmail/">Setting the maximum mail size in qmail</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/03/24/setting-the-maximum-mail-size-in-qmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reduce iowait in Plesk: put qmail&#039;s queue on a ramdisk</title>
		<link>http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/</link>
		<comments>http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 18:16:57 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[iowait]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/</guid>
		<description><![CDATA[I really dislike qmail. But, since I use Plesk, I'm stuck with it. However, I found a way to improve it's awful mail queue performance by putting the mail queue onto a ramdisk. This is actually pretty darned easy to do. First, toss a line like this into your /etc/fstab: none /mailqueue tmpfs defaults,size=100m,nr_inodes=999k,mode=775 0 [...]<p><a href="http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/">Reduce iowait in Plesk: put qmail's queue on a ramdisk</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 really dislike qmail.  But, since I use Plesk, I'm stuck with it.  However, I found a way to improve it's awful mail queue performance by putting the mail queue onto a ramdisk.  This is actually pretty darned easy to do.</p>
<p>First, toss a line like this into your /etc/fstab:</p>
<p><code>
<pre>none    /mailqueue      tmpfs   defaults,size=100m,nr_inodes=999k,mode=775      0       0</pre>
<p></code></p>
<p>This will make a 100MB ramdisk on /mailqueue.  Now, just symlink /var/qmail/mqueue to /mailqueue and move your e-mail over:</p>
<p># mount /mailqueue<br />
# chmod 750 /mailqueue<br />
# chown qmailq:qmail /mailqueue<br />
# mv /var/qmail/mqueue /var/qmail/mqueue-old<br />
# ln -s /mailqueue /var/qmail/mqueue<br />
# rsync -av /var/qmail/mqueue-old /mailqueue</p>
<p>This has significantly cut the iowait on my server during heavy e-mail periods.  In addition, tools like <a href="http://sourceforge.net/projects/qmhandle">qmHandle</a> now fly through my mail queue and give me reports very quickly.</p>
<p><a href="http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/">Reduce iowait in Plesk: put qmail's queue on a ramdisk</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/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Can&#039;t enable DNSBL/RBL in Plesk because it&#039;s greyed out</title>
		<link>http://rackerhacker.com/2008/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/</link>
		<comments>http://rackerhacker.com/2008/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 17:11:27 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/</guid>
		<description><![CDATA[If you have a new Plesk installation and the following option is greyed out in Server -> Mail: Switch on spam protection based on DNS blackhole lists Just install the following RPM from Plesk: psa-qmail-rblsmtpd Can't enable DNSBL/RBL in Plesk because it's greyed out is a post from: Major Hayden's Racker Hacker blog. Thanks for [...]<p><a href="http://rackerhacker.com/2008/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/">Can't enable DNSBL/RBL in Plesk because it's greyed out</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 have a new Plesk installation and the following option is greyed out in Server -> Mail:</p>
<p><em>Switch on spam protection based on DNS blackhole lists</em></p>
<p>Just install the following RPM from Plesk:</p>
<p><code>psa-qmail-rblsmtpd</code></p>
<p><a href="http://rackerhacker.com/2008/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/">Can't enable DNSBL/RBL in Plesk because it's greyed out</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/01/25/cant-enable-dnsblrbl-in-plesk-because-its-greyed-out/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>qmail: This message is looping: it already has my Delivered-To line</title>
		<link>http://rackerhacker.com/2008/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/</link>
		<comments>http://rackerhacker.com/2008/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 18:20:27 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/</guid>
		<description><![CDATA[I stumbled upon this peculiar bounce message recently while working on a server: Hi. This is the qmail-send program at yourmailserver.com. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. &#60;user1@domain.com&#62;: This message is looping: it already has [...]<p><a href="http://rackerhacker.com/2008/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/">qmail: This message is looping: it already has my Delivered-To line</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 stumbled upon this peculiar bounce message recently while working on a server:</p>
<p><code>Hi. This is the qmail-send program at yourmailserver.com.<br />
I'm afraid I wasn't able to deliver your message to the following addresses.<br />
This is a permanent error; I've given up. Sorry it didn't work out.</p>
<p>&lt;user1@domain.com&gt;:<br />
This message is looping: it already has my Delivered-To line. (#5.4.6)</p>
<p>--- Below this line is a copy of the message.</p>
<p>Return-Path: <remoteuser@otherdomain.com><br />
Received: (qmail 14418 invoked by uid 110); 9 Jan 2008 13:04:33 -0600<br />
Delivered-To: 54-user2@domain.com<br />
Received: (qmail 14411 invoked by uid 110); 9 Jan 2008 13:04:33 -0600<br />
Delivered-To: 53-user1@domain.com<br />
Received: (qmail 14404 invoked from network); 9 Jan 2008 13:04:33 -0600<br />
Received: from otherdomain.com (HELO otherdomain.com) (11.22.33.44)<br />
by yourmailserver.com with SMTP; 9 Jan 2008 13:04:33 -0600</code></p>
<p>Basically, this is qmail's way of letting you know that your e-mails are stuck in a mail loop.  One e-mail user is redirecting to another e-mail user, and that e-mail user is redirecting back to the first one.  If q-mail already has a delivered to line which matches one that it already added, it bounces the e-mail and halts delivery.</p>
<p><a href="http://rackerhacker.com/2008/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/">qmail: This message is looping: it already has my Delivered-To line</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/01/23/qmail-this-message-is-looping-it-already-has-my-delivered-to-line/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Plesk and qmail: 421 temporary envelope failure (#4.3.0)</title>
		<link>http://rackerhacker.com/2007/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/</link>
		<comments>http://rackerhacker.com/2007/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 18:21:23 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/</guid>
		<description><![CDATA[I stumbled upon a server running Plesk 8.2.1 where a certain user could not receive e-mail. I sent an e-mail to the user from my mail client, and I never saw it enter the user's mailbox. It didn't even appear in the logs. After checking the usual suspects, like MX records, mail account configuration, and [...]<p><a href="http://rackerhacker.com/2007/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/">Plesk and qmail: 421 temporary envelope failure (#4.3.0)</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 stumbled upon a server running Plesk 8.2.1 where a certain user could not receive e-mail.  I sent an e-mail to the user from my mail client, and I never saw it enter the user's mailbox.  It didn't even appear in the logs.</p>
<p>After checking the usual suspects, like MX records, mail account configuration, and firewalls, I was unable to find out why it was occurring.  Even after a run of <code>mchk</code>, the emails would not be delivered.</p>
<p>I began testing with a telnet connection to the SMTP port:</p>
<p><code>$ telnet 11.22.33.44 25<br />
Trying 11.22.33.44...<br />
Connected to 11.22.33.44.<br />
Escape character is '^]'.<br />
220 www.yourserver.com ESMTP<br />
HELO domain.com<br />
250 www.yourserver.com<br />
MAIL FROM: test@test.com<br />
250 ok<br />
RCPT TO: someuser@somedomain.com<br />
421 temporary envelope failure (#4.3.0)<br />
QUIT<br />
221 www.yourserver.com<br />
Connection closed by foreign host.</code></p>
<p>Temporary envelope failure?  I was still confused.  After reviewing the logs, I found the following line whenever I tried to telnet to port 25 and send an e-mail:</p>
<p><code>Dec  2 00:15:49 www relaylock: /var/qmail/bin/relaylock: mail from 44.33.22.11:17249 (yourdesktop.com)</code></p>
<p>It turns out that the customer was using greylisting in qmail with qmail-envelope-scanner.  After a quick check of /tmp/greylist_dbg.txt, I found the entries from me (as well as a lot of other senders), and that ended up being the root of the problem.</p>
<p><a href="http://rackerhacker.com/2007/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/">Plesk and qmail: 421 temporary envelope failure (#4.3.0)</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/12/04/plesk-and-qmail-421-temporary-envelope-failure-430/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort e-mail in Plesk with procmail</title>
		<link>http://rackerhacker.com/2007/11/27/sort-e-mail-in-plesk-with-procmail/</link>
		<comments>http://rackerhacker.com/2007/11/27/sort-e-mail-in-plesk-with-procmail/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 18:27:26 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/11/27/sort-e-mail-in-plesk-with-procmail/</guid>
		<description><![CDATA[One of my biggest beefs with Plesk's e-mail handling is the lack of server-side filtering. Plesk will only allow you to throw away e-mails marked as spam, but this won't work for me since SpamAssassin marks some mails as spam that actually aren't. If you set up filters in SquirrelMail or Horde, the filters will [...]<p><a href="http://rackerhacker.com/2007/11/27/sort-e-mail-in-plesk-with-procmail/">Sort e-mail in Plesk with procmail</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>One of my biggest beefs with Plesk's e-mail handling is the lack of server-side filtering.  Plesk will only allow you to throw away e-mails marked as spam, but this won't work for me since SpamAssassin marks some mails as spam that actually aren't.  If you set up filters in SquirrelMail or Horde, the filters will only work if you <strong>always</strong> log into the webmail interface to snag your e-mail.</p>
<p>Luckily, you can do some fancy work with procmail to have the filtering done server-side.</p>
<p>First, make sure procmail is installed on your server, and change to this directory:</p>
<p>/var/qmail/mailnames/yourdomain.com/yourusername/</p>
<p>Inside that directory, drop in a .procmailrc file which contains the following:</p>
<p><code>MAILDIR=/var/qmail/mailnames/yourdomain.com/yourusername/Maildir<br />
DEFAULT=${MAILDIR}/<br />
SPAMDIR=${MAILDIR}/.Junk/<br />
:0<br />
* ^X-Spam-Status: Yes.*<br />
${SPAMDIR}</code></p>
<p>Once that file is in place, move the .qmail file out of the way, and replace it with this:</p>
<p><code>| /usr/local/psa/bin/psa-spamc accept<br />
|preline /usr/bin/procmail -m -o .procmailrc</code></p>
<p>Please be aware that these changes will disappear if you make any adjustments to your mail configuration within Plesk.  To get around this annoyance, just change the file attributes to immutable:</p>
<p><code># chattr +i .qmail .procmailrc</code></p>
<p><em>Credit for this trick goes to <a href="http://www.russwittmann.com/2007/07/14/server-side-mail-filtering-using-qmailprocmail-under-plesk/">Russ Wittmann</a>.</em></p>
<p><a href="http://rackerhacker.com/2007/11/27/sort-e-mail-in-plesk-with-procmail/">Sort e-mail in Plesk with procmail</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/11/27/sort-e-mail-in-plesk-with-procmail/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

