<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://serverkb.co.uk/index.php?action=history&amp;feed=atom&amp;title=Qmail</id>
	<title>Qmail - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://serverkb.co.uk/index.php?action=history&amp;feed=atom&amp;title=Qmail"/>
	<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;action=history"/>
	<updated>2026-04-26T02:04:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.4</generator>
	<entry>
		<id>http://serverkb.co.uk/index.php?title=Qmail&amp;diff=672&amp;oldid=prev</id>
		<title>Rootadminacc: /* Correct permissions */</title>
		<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;diff=672&amp;oldid=prev"/>
		<updated>2013-04-30T11:24:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Correct permissions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:24, 30 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l243&quot;&gt;Line 243:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 243:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;******* courierimapkeywords, cur, new and tmp should have 700&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;******* courierimapkeywords, cur, new and tmp should have 700&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get the below error on a Plesk server, increase [http://serverkb.co.uk/wiki/Mail#Limit_Global_Mailbox_size this] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or &lt;/del&gt;set the Subscription to Unlimited.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get the below error on a Plesk server, increase [http://serverkb.co.uk/wiki/Mail#Limit_Global_Mailbox_size this]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;set the Subscription to Unlimited &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or try disable grey listing&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;qq trouble in home directory (#4.3.0) (state 17).&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;qq trouble in home directory (#4.3.0) (state 17).&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key SKBmw:diff:1.41:old-314:rev-672:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Rootadminacc</name></author>
	</entry>
	<entry>
		<id>http://serverkb.co.uk/index.php?title=Qmail&amp;diff=314&amp;oldid=prev</id>
		<title>Rootadminacc: /* Important files */</title>
		<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;diff=314&amp;oldid=prev"/>
		<updated>2013-02-19T19:58:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Important files&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:58, 19 February 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l158&quot;&gt;Line 158:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 158:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/var/qmail/control/locals&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/var/qmail/control/locals&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The default value in /var/qmail/control/concurrencyremote is 20&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The default value in /var/qmail/control/concurrencyremote &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and /var/qmail/control/concurrencyincoming &lt;/ins&gt;is 20&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script to email if queue exceeds a limit ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script to email if queue exceeds a limit ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key SKBmw:diff:1.41:old-313:rev-314:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Rootadminacc</name></author>
	</entry>
	<entry>
		<id>http://serverkb.co.uk/index.php?title=Qmail&amp;diff=313&amp;oldid=prev</id>
		<title>Rootadminacc: /* Increasing mail sending/attachment limit */</title>
		<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;diff=313&amp;oldid=prev"/>
		<updated>2013-02-19T19:58:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Increasing mail sending/attachment limit&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:58, 19 February 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Change your hostname to a valid entry.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Change your hostname to a valid entry.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Increasing mail sending/attachment limit ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Increasing concurrent outgoing/incoming ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/var/qmail/control/concurrencyincoming&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This can be useful if there seems to be a cap on how many emails the mail program can handle at a time.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Increasing mail sending/attachment &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;size &lt;/ins&gt;limit ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;vim /var/qmail/control/databytes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;vim /var/qmail/control/databytes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key SKBmw:diff:1.41:old-288:rev-313:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Rootadminacc</name></author>
	</entry>
	<entry>
		<id>http://serverkb.co.uk/index.php?title=Qmail&amp;diff=288&amp;oldid=prev</id>
		<title>Rootadminacc: /* Removing mail via qmHandle */</title>
		<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;diff=288&amp;oldid=prev"/>
		<updated>2013-02-11T19:53:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Removing mail via qmHandle&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:53, 11 February 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l116&quot;&gt;Line 116:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 116:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;or&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;or&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;svc -u /service/qmail-*&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;svc -u /service/qmail-*&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== [http://www.fileformat.info/tip/linux/qmailnow.htm Resend remote queue] ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Or /etc/init.d/qmail doqueue (commonly won&#039;t be there)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Installing qmqtool ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Installing qmqtool ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key SKBmw:diff:1.41:old-21:rev-288:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Rootadminacc</name></author>
	</entry>
	<entry>
		<id>http://serverkb.co.uk/index.php?title=Qmail&amp;diff=21&amp;oldid=prev</id>
		<title>Rootadminacc: Created page with &quot;== As a service ==  &lt;pre&gt;/etc/init.d/qmail start|restart|stop&lt;/pre&gt;  == Mail in the queue ==  &lt;pre&gt;/var/qmail/bin/qmail-qstat&lt;/pre&gt;  Resend it: qmailctl doqueue&lt;br&gt; * See how ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://serverkb.co.uk/index.php?title=Qmail&amp;diff=21&amp;oldid=prev"/>
		<updated>2013-01-15T11:29:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== As a service ==  &amp;lt;pre&amp;gt;/etc/init.d/qmail start|restart|stop&amp;lt;/pre&amp;gt;  == Mail in the queue ==  &amp;lt;pre&amp;gt;/var/qmail/bin/qmail-qstat&amp;lt;/pre&amp;gt;  Resend it: qmailctl doqueue&amp;lt;br&amp;gt; * See how ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== As a service ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/init.d/qmail start|restart|stop&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mail in the queue ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/var/qmail/bin/qmail-qstat&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resend it: qmailctl doqueue&amp;lt;br&amp;gt;&lt;br /&gt;
* See how many times a user is mentioned in the mail log: cat mail.log | find emailaddress@example.com | wc -l&lt;br /&gt;
- e.g.&lt;br /&gt;
cat /opt/psa/var/log/maillog | find bob@test.com | wc -l&lt;br /&gt;
* Find mail from or to a user in mail log: cat /opt/psa/var/log/maillog | grep emailaddress@example.com -C 15&amp;lt;br&amp;gt;&lt;br /&gt;
* Find emails over 1MB: find /var/qmail/queue/ -type f -size +1000000 -a -print -exec ls -l {} \;&amp;lt;br&amp;gt;&lt;br /&gt;
* Find mail from or to a user in the queue: find /var/qmail/queue/ -type f -exec grep -l someone@somewhere.com {} \; &amp;lt;br&amp;gt;&lt;br /&gt;
Remove ones with @gmail.com in them: find /var/qmail/queue/ -type f -exec grep -l &amp;#039;@gmail.com&amp;#039; {} \; | xargs rm&amp;lt;br&amp;gt;&lt;br /&gt;
Remove failed emails: find /var/qmail/queue/ -type f -exec grep -l &amp;#039;Subject: failure notice&amp;#039; {} \; | xargs rm&lt;br /&gt;
&lt;br /&gt;
A good method to scan the mail log if you know when the mail was sent is to do:&lt;br /&gt;
&lt;br /&gt;
tac /opt/psa/var/log/maillog&amp;lt;br&amp;gt;&lt;br /&gt;
CTRL + C&amp;lt;br&amp;gt;&lt;br /&gt;
Right click Putty &amp;quot;Copy All to Clipboard&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Paste into Notepad&amp;lt;br&amp;gt;&lt;br /&gt;
CTRL + F email@thatyouwant.com&lt;br /&gt;
&lt;br /&gt;
Or do cp mail.log /var/www/vhosts/domain.com/httpdocs&lt;br /&gt;
Download it via FTP and view it in notepad&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Main mail log ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/psa/var/log/maillog&lt;br /&gt;
/usr/local/psa/var/log/maillog&lt;br /&gt;
/var/log/maillog&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
opt is a symlink for /usr/local. This file is good for checking failed login attempts and failed/successful emails.&lt;br /&gt;
&lt;br /&gt;
Mailnames is the individual users/mailboxes. &amp;#039;&amp;#039;&amp;#039;To test sent mail&amp;#039;&amp;#039;&amp;#039; from an external command line type telnet VPS IP 25 or on the server telnet localhost 25. If it does not return 220 or any lines, it may be set in the firewall within Modules in Plesk.&lt;br /&gt;
&lt;br /&gt;
[http://www.gossamer-threads.com/lists/qmail/users/124173 Qmail-queue not processing outgoing or incoming mail example]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Mail Log messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;delivery 1: deferral: 92.60.112.25_failed_on_DATA_command./Remote_host_said:_451_4.7.1_Please_try_again_later&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This normally happens when a recipient has you on a greylist. The mail may take a while to come through. Try sending to another recipient to see if it is any quicker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;501 Syntactically invalid HELO argument(s)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change your hostname to a valid entry.&lt;br /&gt;
&lt;br /&gt;
== Increasing mail sending/attachment limit ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;vim /var/qmail/control/databytes&lt;br /&gt;
10485760 #for 10MB&lt;br /&gt;
#20971520 #for 20MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing mail via Qmail ==&lt;br /&gt;
&lt;br /&gt;
Stop qmail first before doing this command using /etc/init.d/qmail stop&lt;br /&gt;
&lt;br /&gt;
/usr/local/psa/admin/bin/mailqueuemng -D&amp;lt;br&amp;gt;&lt;br /&gt;
/usr/local/psa/admin/bin/mailmng --help&lt;br /&gt;
&lt;br /&gt;
== Removing mail from Qmail manually ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To be safe do this first:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar -zcvf /root/qmail-queue-backup.tar.gz /var/qmail/queue/mess/&lt;br /&gt;
/etc/init.d/qmail stop ; svc -d /service/qmail-qmqpd ; svc -d /service/qmail-send ; svc -d /service/qmail-smtpd ; /etc/init.d/qmail stop&lt;br /&gt;
telnet localhost 25&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you can still telnet to 25, check if qmail is still running and kill the process and run the above commands again:&lt;br /&gt;
&lt;br /&gt;
ps aux | grep qmail&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /var/qmail/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;find /var/qmail/queue/mess/ -type f -mtime +1 -exec rm -v {} \;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This removes mail from before the last 48 hours.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;find /var/qmail/queue/mess/ -type f -mtime 1 -exec rm -v {} \;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This removes mail from the last 24-48 hours.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./ubu-queue-fix /var/qmail/queue/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CTRL + R allows you to reverse search your bash history.&lt;br /&gt;
&lt;br /&gt;
== Removing mail via qmHandle ==&lt;br /&gt;
&lt;br /&gt;
If you are going to do this you &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to stop qmail using either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/init.d/qmail stop&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;svc -d /service/qmail-qmqpd ; svc -d /service/qmail-send ; svc -d /service/qmail-smtpd ; /etc/init.d/qmail stop&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;wget serverkb.co.uk/tools/qmhandle.tar.gz&lt;br /&gt;
gunzip qmhandle.tar.gz ; tar -xvf qmhandle.tar ; cd qmhandle-1.3.2&lt;br /&gt;
./qmHandle&lt;br /&gt;
qmHandle -c -s&lt;br /&gt;
qmHandle -c -l&lt;br /&gt;
qmHandle -c -m(mail ID)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete one email find the number next to the hash) and do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/var/qmail/bin/qmail-qread&lt;br /&gt;
./qmHandle -d&amp;lt;mailid&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete the entire queue do;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;qmHandle -D&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then start qmail again using either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/init.d/qmail start&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;svc -u /service/qmail-*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing qmqtool ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;wget http://jeremy.kister.net/code/qmqtool/files/qmqtool-1.14.tgz&lt;br /&gt;
tar –xpf /path/to/qmqtool-1.14.tgz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the .tgz is extracted, check the following installation. qmqtool is just a lightweight perl script.  Without the ./configure process, users are left changing the script&lt;br /&gt;
(/usr/local/bin/perl vs. /usr/bin/perl, etc.).  The install process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1. ./configure&lt;br /&gt;
   optional arguments to configure are:&lt;br /&gt;
   --prefix=PREFIX   install architecture-independent files in PREFIX&lt;br /&gt;
                      [/usr/local]&lt;br /&gt;
   --mandir=DIR      man documentation [PREFIX/man]&lt;br /&gt;
   --scriptdir=DIR   qmqtool script [PREFIX/script]&lt;br /&gt;
&lt;br /&gt;
   --perl=PERL       full path to perl (e.g. /usr/local/bin/perl)&lt;br /&gt;
   --qmaildir=DIR    directory qmail is locted (e.g. /var/qmail)&lt;br /&gt;
   --upgrade         upgrade existing installation&lt;br /&gt;
                      (default when no prefix/mandir/scriptdir specified)&lt;br /&gt;
   --help            show help message&lt;br /&gt;
&lt;br /&gt;
2. make&lt;br /&gt;
3. make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Important files ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/var/qmail/control/rcpthosts&lt;br /&gt;
/var/qmail/control/me&lt;br /&gt;
/var/qmail/control/virtualdomains&lt;br /&gt;
/var/qmail/control/locals&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value in /var/qmail/control/concurrencyremote is 20&lt;br /&gt;
&lt;br /&gt;
== Script to email if queue exceeds a limit ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
ATTACH=&amp;quot;/root/mailcount.txt&amp;quot;&lt;br /&gt;
EMAIL=&amp;quot;test@example.com&amp;quot;&lt;br /&gt;
LIMIT=300&lt;br /&gt;
QSTAT=&amp;quot;/var/qmail/bin/qmail-qstat&amp;quot;&lt;br /&gt;
QREAD=&amp;quot;/var/qmail/bin/qmail-qread&amp;quot;&lt;br /&gt;
QVALUE=`/var/qmail/bin/qmail-qstat | head -1 | awk &amp;#039;{print $4;}&amp;#039;`&lt;br /&gt;
WARNING=&amp;quot;Your mail queue is over $LIMIT, please investigate.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$QSTAT | head -1&lt;br /&gt;
#this one below is used for when the queue is below the limit&lt;br /&gt;
$QSTAT | head -1 &amp;gt; /root/mailqueue.txt&lt;br /&gt;
$QREAD | head -100&lt;br /&gt;
#these two below append the amount in queue and the headers, and is used when the queue is above the limit&lt;br /&gt;
$QSTAT | head -1 &amp;gt;&amp;gt; /root/mailcount.txt&lt;br /&gt;
$QREAD | head -100 &amp;gt;&amp;gt; /root/mailcount.txt&lt;br /&gt;
&lt;br /&gt;
if&lt;br /&gt;
 [ &amp;quot;$QVALUE&amp;quot; -ge &amp;quot;$LIMIT&amp;quot; ] ; then&lt;br /&gt;
 echo $WARNING&lt;br /&gt;
 mail -s&amp;quot;$WARNING&amp;quot; $EMAIL &amp;lt; $ATTACH&lt;br /&gt;
  else&lt;br /&gt;
&lt;br /&gt;
 if&lt;br /&gt;
  [ &amp;quot;$QVALUE&amp;quot; -lt &amp;quot;$LIMIT&amp;quot; ] ; then&lt;br /&gt;
 #this ensures it only sends the mail queue amount if the queue is below 300, instead of the qread output&lt;br /&gt;
 if [ -f $ATTACH ] ; then&lt;br /&gt;
  echo &amp;quot;$ATTACH exists, removed.&amp;quot;&lt;br /&gt;
  rm /root/mailcount.txt&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 echo Mail Queue below $LIMIT&lt;br /&gt;
 mail -s&amp;quot;Mail Queue count&amp;quot; $EMAIL &amp;lt; /root/mailqueue.txt&lt;br /&gt;
 fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ -f $ATTACH ]&lt;br /&gt;
 then&lt;br /&gt;
  echo &amp;quot;$ATTACH exists, removed.&amp;quot;&lt;br /&gt;
  rm /root/mailcount.txt&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ -f /root/mailqueue.txt ]&lt;br /&gt;
 then&lt;br /&gt;
  echo &amp;quot;/root/mailqueue.txt exists, removed.&amp;quot;&lt;br /&gt;
  rm /root/mailqueue.txt&lt;br /&gt;
fi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Stop qmail listening on port 2500 ==&lt;br /&gt;
&lt;br /&gt;
To stop qmail running/listening on port 2500 do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;svc -d /service/qmail-smtpd-2500&lt;br /&gt;
svc -d /service/qmail-smtpd-2500/log&lt;br /&gt;
rm -r /service/qmail-smtpd-2500&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Correct permissions ==&lt;br /&gt;
&lt;br /&gt;
This is important as if you escalate permissions to 777 mail will fail and you will get one of the following messages in your maillog or bouncebacks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;delivery 54: deferral: Uh-oh:_home_directory_is_writable._(#4.7.0)/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* qmail folder and the &amp;#039;&amp;#039;&amp;#039;folders below&amp;#039;&amp;#039;&amp;#039; should be 755 (rwxr-x-rx):&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;alias, bin, boot, control, plugins, popuser, queue, users&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;mailnames&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;alias&amp;#039;&amp;#039;&amp;#039; should have alias:qmail, &amp;#039;&amp;#039;&amp;#039;bin, boot, control, plugins&amp;#039;&amp;#039;&amp;#039;, users should have root:qmail &lt;br /&gt;
*** queue folder should be owned by qmailq:qmail&lt;br /&gt;
*** mailnames should be owned by root:root and all domain folders below have 700 (rwx------)&lt;br /&gt;
* All &amp;#039;&amp;#039;&amp;#039;domain folders&amp;#039;&amp;#039;&amp;#039; e.g. &amp;#039;&amp;#039;&amp;#039;example.co.uk&amp;#039;&amp;#039;&amp;#039; below mailnames should be owned by popuser:popuser (the folder popuser needs popuser:popuser)&lt;br /&gt;
** Within a &amp;#039;&amp;#039;&amp;#039;domain folder&amp;#039;&amp;#039;&amp;#039; .qmail-default should have 600 (rw-------) and the &amp;#039;&amp;#039;user account&amp;#039;&amp;#039; folders should have 700, for example:&lt;br /&gt;
*** &amp;#039;&amp;#039;admin&amp;#039;&amp;#039;&lt;br /&gt;
*** &amp;#039;&amp;#039;postmaster&amp;#039;&amp;#039;&lt;br /&gt;
**** Within the &amp;#039;&amp;#039;user account folder&amp;#039;&amp;#039; .qmail should have 600, .spamassassin should have 755 and @attachments and Maildir should have 700&lt;br /&gt;
***** Within .&amp;#039;&amp;#039;&amp;#039;spamassassin&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
****** user_prefs should have 600&lt;br /&gt;
***** Within &amp;#039;&amp;#039;&amp;#039;Maildir&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
****** courierimapsubscribed, courierimapuiddb and maildirsize should have 644 (rw-r--r--)&lt;br /&gt;
****** &amp;#039;&amp;#039;&amp;#039;courierimapkeywords, cur, new, tmp, .Sent&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;.Spam&amp;#039;&amp;#039;&amp;#039; should have 700. Within .Sent and .Spam:&lt;br /&gt;
******* maildirfolder should have 600&lt;br /&gt;
******* courierimapacl, courierimapuiddb should have 644 &lt;br /&gt;
******* courierimapkeywords, cur, new and tmp should have 700&lt;br /&gt;
&lt;br /&gt;
If you get the below error on a Plesk server, increase [http://serverkb.co.uk/wiki/Mail#Limit_Global_Mailbox_size this] or set the Subscription to Unlimited.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;qq trouble in home directory (#4.3.0) (state 17).&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rootadminacc</name></author>
	</entry>
</feed>