<?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>paulsynnott.com &#187; courier-imap</title>
	<atom:link href="http://www.paulsynnott.com/blog/tag/courier-imap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paulsynnott.com/blog</link>
	<description>Did you get lost?  What are you doing here?</description>
	<lastBuildDate>Mon, 28 Dec 2009 19:13:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to fix: Intermittent IMAP &#8220;BYE Temporary problem, please try again later&#8221; messages (courier-imap)</title>
		<link>http://www.paulsynnott.com/blog/2009/02/14/how-to-fix-intermittent-imap-bye-temporary-problem-please-try-again-later-messages-courier-imap/</link>
		<comments>http://www.paulsynnott.com/blog/2009/02/14/how-to-fix-intermittent-imap-bye-temporary-problem-please-try-again-later-messages-courier-imap/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 07:09:31 +0000</pubDate>
		<dc:creator>psynnott</dc:creator>
				<category><![CDATA[How To Fix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[courier-imap]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Outlook]]></category>

		<guid isPermaLink="false">http://www.paulsynnott.com/blog/?p=52</guid>
		<description><![CDATA[How to fix: Intermittent IMAP "BYE Temporary problem, please try again later" messages (courier-imap)]]></description>
			<content:encoded><![CDATA[<p>This problem has been bugging the life out of me ever since it appeared about a month ago.</p>
<p>Some background:  I have a VPS with EUKHost.com that I have all my sites on.  I have about 5 email accounts spread over my various domains on this VPS.  I prefer to use IMAP, and have MS Outlook open for most of the day with it doing an automatic send/receive every 10 minutes or so.  This worked great for 10 or 11 months.</p>
<p>As I said, a month ago this &#8220;BYE Temporary problem, please try again later&#8221; message kept appearing.  What made it even more annoying is that Outlook displays it in a foreground message window that disturbs any application you may be using at the time the error occurs.  Oh, and it also keeps the mail accounts &#8220;offline&#8221; until you do a manual send-receive.  E-X-T-R-E-M-E-L-Y annoying when this happens every few minutes.  I ended up closing Outlook for most of the day because it just bugged me so much.</p>
<p>EUKHost couldn&#8217;t fix it.  Various google searches I tried before didn&#8217;t help.  Today, I finally have some free time to sit down and finally figure this one out.</p>
<p>First, I had to confirm that it was a server problem and not a problem with my Outlook.  Because this is an intermittent problem, this was difficult to do and partly the reason why it took me 4 weeks to do something about it.  After some research, I found out <a href="http://www.courier-mta.org/authlib/README.authdebug.html" target="_blank">how to debug courier authentication errors</a>.  I wasn&#8217;t 100% sure this was where my problem lay, but as I had nothing else to go on, I decided to give it a try.</p>
<p>How to debug courier authentication errors:</p>
<ol>
<li>Edit <code>authdaemonrc</code> (I found mine at /etc/authlib/authdaemonrc)</li>
<li>Set <code>DEBUG_LOGIN=1</code></li>
<li>Restart <code>authdaemond</code>:<br />
<code># authdaemond stop<br />
# authdaemond start</code></li>
<li>At this point, all debugging output goes to syslog at level &#8216;debug&#8217;, which is normally not shown. You will probably need to change your /etc/syslog.conf file to be able to see these messages.  Add this line to the end of /etc/syslog.conf:<br />
<code>*.debug                        /var/log/debug</code></li>
<li>Create the log file and restart syslog:<br />
<code># touch /var/log/debug<br />
# killall -1 syslogd</code></li>
<li>Keep an eye on the log file:<br />
<code># tail -f /var/log/debug</code></li>
</ol>
<p>OK, so now we&#8217;re debugging authentication errors.  I opened Outlook and just continued doing whatever I normally do until the error message appeared.  It wasn&#8217;t more than 5 minutes before it appeared.  In the log file I saw this:</p>
<p><code>...<br />
Feb 14 15:57:34 vps authdaemond: authpipe: TEMPFAIL - no more modules will be tried<br />
...<br />
Feb 14 15:57:34 vps imapd: LOGIN FAILED, user=paul+fuc.it, ip=[::ffff:222.144.254.98]<br />
Feb 14 15:57:34 vps imapd: authentication error: Input/output error</code></p>
<p>This confirmed that it was indeed an authentication problem.  The input/output error confused me for a while &#8211; was it a hardware problem?  After researching more, I found this useful bit of text within the authdaemonrc.dist file (yes, the configuration file I was editing before didn&#8217;t have any comments&#8230;)</p>
<p><code>##NAME: daemons:0<br />
#<br />
# The number of daemon processes that are started.  authdaemon is typically<br />
# installed where authentication modules are relatively expensive: such<br />
# as authldap, or authmysql, so it's better to have a number of them running.<br />
# PLEASE NOTE:  Some platforms may experience a problem if there's more than<br />
# one daemon.  Specifically, SystemV derived platforms that use TLI with<br />
# socket emulation.  I'm suspicious of TLI's ability to handle multiple<br />
# processes accepting connections on the same filesystem domain socket.<br />
#<br />
</code><strong><code># </code></strong><code><span style="text-decoration: underline;">You may need to increase daemons if as your system load increases.  Symptoms</span></code><strong><code><br />
# </code></strong><code><span style="text-decoration: underline;">include sporadic authentication failures</span></code><strong><code>.</code></strong><code> If you start getting<br />
# authentication failures, increase daemons. </code><code><span style="text-decoration: underline;">However, the default of 5</span></code><strong><code><br />
# </code></strong><code><span style="text-decoration: underline;">SHOULD be sufficient.</span></code><code> Bumping up daemon count is only a short-term<br />
# solution.  The permanent solution is to add more resources: RAM, faster<br />
# disks, faster CPUs...</code></p>
<p>I underlined the important bits.  Sporadic authentication failures?  Check.  Default of 5?  Uhm&#8230;. mine&#8217;s set at 2.  So, I upped it to 5, restarted authdaemond and waited for Outlook.  It&#8217;s been going for a few hours now and no errors.  I hope this resolves it finally.  I also hope that this helps someone else and prevents someone from getting as fed up with it as I did.  Leave a comment if it helped you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsynnott.com/blog/2009/02/14/how-to-fix-intermittent-imap-bye-temporary-problem-please-try-again-later-messages-courier-imap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
