# Courier Problem with Virtual Mailhosting System Guide

## banderos

Hi,

I am doing a fresh install and following the guide here http://www.gentoo.org/doc/en/virt-mail-howto.xml (which I have used several times before on different installations).

I seem to be running into a problem in Step 3 after installing courier-imap. Postfix is working fine at this point, but I cannot connect to the server via imapd or imapd-ssl.

ERRORS from client using imapd:

tweak courier-imap # Oct  5 11:27:15 tweak imapd: Connection, ip=[192.168.1.10]

Oct  5 11:27:15 tweak authdaemond: failed to connect to mysql server (server=mysql.example.com, userid=admin): Unknown MySQL server host 'mysql.example.com' (1)

Oct  5 11:27:15 tweak imapd: LOGIN FAILED, user=ben, ip=[192.168.1.10]

Oct  5 11:27:15 tweak imapd: authentication error: Input/output error

ERRORS from client using imapd-ssl:

tweak courier-imap # Oct  5 11:25:37 tweak imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[192.168.1.10]

Oct  5 11:25:37 tweak imapd-ssl: authentication error: Input/output error

Oct  5 11:25:37 tweak authdaemond: failed to connect to mysql server (server=mysql.example.com, userid=admin): Unknown MySQL server host 'mysql.example.com' (1)

Oct  5 11:25:37 tweak imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[192.168.1.10]

Oct  5 11:25:37 tweak imapd-ssl: authentication error: Input/output error

Oct  5 11:26:37 tweak imapd-ssl: couriertls: /var/lib/courier-imap/couriersslcache: No such file or directory

Oct  5 11:26:37 tweak imapd-ssl: Connection, ip=[192.168.1.10]

Oct  5 11:26:38 tweak authdaemond: failed to connect to mysql server (server=mysql.example.com, userid=admin): Unknown MySQL server host 'mysql.example.com' (1)

Oct  5 11:26:38 tweak imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[192.168.1.10]

Oct  5 11:26:38 tweak imapd-ssl: authentication error: Input/output error

I am guessing the default authentication methods in the latest courier packages are causing problems, either that or I have a dodgy use flag somewhere in this!:

USE=" 7zip X alsa apache2 arts authdaemond authlib automount avi bash-completion berkdb bitmap-fonts cairo ccache cdb cdda cddb cdr chroot cli cpudetection cpulimit crypt cups -cyrus dbus dlloader dri dvd dvdr eds elibc_glibc emboss encode esd ethereal fam firefox foomaticdb fortran ftp -gdbm gif -gnome gpm gstreamer gtk hal imap input_devices_evdev input_devices_keyboard input_devices_mouse -ipv6 isdnlog jpeg kde kernel_linux -ldap libg++ libwww mad maildir memlimit mikmod mp3 mpeg mysql ncurses nls nptl nptlonly ogg opengl oss pam pam-mysql pam_chroot pam_console pam_timestamp pcap pcre pdflib perl php png pop postfix ppds pppd python qt3 qt4 -quicktime rdesktop readline reflection samba sasl sdl session snmp -snortsam spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode unzip userland_GNU vhosts vorbis wifi win32codecs x86 xml xorg xv zip zlib"

Has anyone else run into this? I would rather avoid hacking courier etc files until I know what's going on...

cheers,

Ben C

----------

## banderos

The ol' find a fix as soon as you post technique...   :Very Happy: 

#authmodulelist="authmysql authldap authpam authuserdb authshadow authcustom authpipe"

authmodulelist="authshadow"

Now I can auth with my system username and password.

I imagine the docs need updating if it's not something to do with my USE flags.

----------

## warthog

 *banderos wrote:*   

> 
> 
> #authmodulelist="authmysql authldap authpam authuserdb authshadow authcustom authpipe"
> 
> authmodulelist="authshadow"
> ...

 

BTW, I recently had the same problem after upgrading.  This fix allowed me to login via squirrelmail again.  Thanks!

----------

## ebpowell

Banderos:

Which file should I change (I am having the same problem) but a grep on 'authmod' returns about 4 different files.

Any guidance would be appreciated. My mailserver (Courier-IMAP-SSL, Postfix, SquirellMail) suddenly went extinct after an emerge -u world about a month ago.

Eric

----------

## banderos

```
server authlib # egrep authmodulelist *

authdaemonrc:##NAME: authmodulelist:2

authdaemonrc:#authmodulelist="authmysql authldap authpam authuserdb authshadow authcustom authpipe"

[b]authdaemonrc:authmodulelist="authmysql authpam"[/b]

authdaemonrc:##NAME: authmodulelistorig:3

authdaemonrc:authmodulelistorig="authuserdb authpam authshadow authldap authmysql authcustom authpipe"

authdaemonrc.dist:##NAME: authmodulelist:2

authdaemonrc.dist:authmodulelist="authuserdb authpam authshadow authmysql authcustom authpipe"

authdaemonrc.dist:##NAME: authmodulelistorig:3

authdaemonrc.dist:authmodulelistorig="authuserdb authpam authshadow authmysql authcustom authpipe"

```

2 files...the .dist just means distribution for original version.

----------

