resolving some courier-imapd errors after a recent update of gentoo

problem 1:

Feb 11 01:46:58 o2 authdaemond: failed to connect to mysql server (, userid=admin): Unknown MySQL Server Host ‘’ (1)
Feb 11 01:46:58 o2 imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:]
Feb 11 01:46:58 o2 imapd-ssl: authentication error: Input/output error

reason 1: the configuration of courier imapd authentication methods has been resetted by this update. courier thus erroneously tries to use the (not configured) mysql auth method.

solution 1:

edit /etc/courier/authlib/authdaemonrc and replace the line

authmodulelist=”authmysql authpam authuserdb authshadow authcustom”



(adjust to match your courier-imapd authentication method)

# /etc/init.d/courier-imapd restart
# /etc/init.d/courier-imapd-ssl restart

problem 2:

Feb 11 02:08:03 o2 imapd-ssl: Failed to create cache file: maildirwatch (mettlerd)
Feb 11 02:08:03 o2 imapd-ssl: Error: Input/output error
Feb 11 02:08:03 o2 imapd-ssl: Check for proper operation and configuration
Feb 11 02:08:03 o2 imapd-ssl: of the File Access Monitor daemon (famd).

reason 2: famd is not started by default

solution 2:

# rc-update add famd default
# /etc/init.d/famd start


9 Replies to “resolving some courier-imapd errors after a recent update of gentoo”

  1. Raydude: right, I forgot to mention it. And the authlib init-script even cares about restart courier-imap properly. So just do

    # /etc/init.d/courier-authlib restart

  2. Thanks a lot, this confused me after a version upgrade. This really goes straight to the root of the problem.

  3. hi
    your writen problem & solution is good , but I have a problem that dosn’t exist there problem .

    I install vpopmail courier-imap-4.0.2 and courier-authlib-0.5
    and mysql-4.1.11 cerfully
    also telnet to port 143(imap) successfully and I want login to existing mail account , there was error .
    and report this error line in log file:
    ” UnKnown MYSQL server host ”
    and input/output error .
    I think this error related with authmysqlrc file
    but I don’t know how to solve this problem .
    please help me .

  4. Hasan: Well, I can only guess what your problem might be. So, it might be that one of the daemons you installed (perhaps vpopmail) still tries to authenticate using mysql instead of using pam. I’d do a

    find /etc|xargs grep -i authmysql

    and disable mysql authentication completely. That is, unless you actually want to authenticate using mysql. In that case you need to properly configure both mysql and authmysql. first of all, you should replace “” with the true name of your mysql server (“localhost”, if on the same host). Take a look at


    for configuring authmysql.

    If you can’t find the solution yourself I recommend searching or asking in channel #gentoo on


  5. I have another problem with courier-imap after update to version 4.0. When starting courier-authlib i get the error message:

    * Starting courier-authlib: authdaemond …
    pidof: invalid options on command line!

    I tried many solutions, changing the /etc/init.d/courier-authlib, but had no success.


Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 6 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.