Posts Tagged ‘e-mail’

How to fix: Intermittent IMAP “BYE Temporary problem, please try again later” messages (courier-imap)

February 14, 2009 - 4:09 pm 2 Comments

This problem has been bugging the life out of me ever since it appeared about a month ago.

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.

As I said, a month ago this “BYE Temporary problem, please try again later” 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 “offline” 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.

EUKHost couldn’t fix it.  Various google searches I tried before didn’t help.  Today, I finally have some free time to sit down and finally figure this one out.

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 how to debug courier authentication errors.  I wasn’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.

How to debug courier authentication errors:

  1. Edit authdaemonrc (I found mine at /etc/authlib/authdaemonrc)
  2. Set DEBUG_LOGIN=1
  3. Restart authdaemond:
    # authdaemond stop
    # authdaemond start
  4. At this point, all debugging output goes to syslog at level ‘debug’, 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:
    *.debug /var/log/debug
  5. Create the log file and restart syslog:
    # touch /var/log/debug
    # killall -1 syslogd
  6. Keep an eye on the log file:
    # tail -f /var/log/debug

OK, so now we’re debugging authentication errors.  I opened Outlook and just continued doing whatever I normally do until the error message appeared.  It wasn’t more than 5 minutes before it appeared.  In the log file I saw this:

...
Feb 14 15:57:34 vps authdaemond: authpipe: TEMPFAIL - no more modules will be tried
...
Feb 14 15:57:34 vps imapd: LOGIN FAILED, user=paul+fuc.it, ip=[::ffff:222.144.254.98]
Feb 14 15:57:34 vps imapd: authentication error: Input/output error

This confirmed that it was indeed an authentication problem.  The input/output error confused me for a while – 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’t have any comments…)

##NAME: daemons:0
#
# The number of daemon processes that are started. authdaemon is typically
# installed where authentication modules are relatively expensive: such
# as authldap, or authmysql, so it's better to have a number of them running.
# PLEASE NOTE: Some platforms may experience a problem if there's more than
# one daemon. Specifically, SystemV derived platforms that use TLI with
# socket emulation. I'm suspicious of TLI's ability to handle multiple
# processes accepting connections on the same filesystem domain socket.
#
# You may need to increase daemons if as your system load increases. Symptoms
#
include sporadic authentication failures. If you start getting
# authentication failures, increase daemons.
However, the default of 5
#
SHOULD be sufficient. Bumping up daemon count is only a short-term
# solution. The permanent solution is to add more resources: RAM, faster
# disks, faster CPUs...

I underlined the important bits.  Sporadic authentication failures?  Check.  Default of 5?  Uhm…. mine’s set at 2.  So, I upped it to 5, restarted authdaemond and waited for Outlook.  It’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!

Email Typo = Get Invited to China.

February 11, 2009 - 8:17 pm No Comments

Great Wall of China
Great Wall of China

Two days ago, I received an unexpected email congratulating me on my new job.  It was personally written and seemed genuine … except for the fact I have been in my job for over 5 years and the sender’s name didn’t ring any bells.  Oh, and the fact it was addressed to a “Peter” not me (I’m a “Paul” by the way).  However, we do share the same surname.

As any nice chap would do, I replied back informing the sender that I wasn’t “Peter” and wished them good luck in finding their intended recipient.

Yesterday, the sender told me she’s teaching in China.  Interesting, I thought.  I’m teaching in Japan, so it’s a bit of a similar situation, and … we have the same surname (the sender and the intended recipient are related, just not to me).  I replied back saying how I’ve always intended to visit China but just never got round to it.

Cue invitation to visit China.  Wow.

If I didn’t have a honeymoon and related expenses coming up later this year, I would most certainly be accepting the kind invitation.  I’ve always wanted to see China, but it’s just never happened.  I’m hoping I’ll have an opportunity to take the kind sender up on their offer sometime later, but it’ll not be this year.

Incase you’re wondering, just one character was missing from the email address which routed the email to me instead of her son.