# Courier-IMAP: no IMAP4 mailserver error?

## llongi

Hi! I just upgraded my courier-imap installation from 3.0.8 to the 4.0 release that appeared today in the Portage tree. I passed all my conf files with etc-update, no major changes, and I transferred my authentication config files to /etc/courier/authlib like the upgrade doc suggested. I only use the authmysql module since I have a totally virtual email setup. So now the conf for the authentication is all in the two files /etc/courier/authlib/authmysqlrc and /etc/courier/authlib/authdaemonrc, and the config for imapd/pop3d in /etc/courier-imap, like it should be. The server starts without problems, courier-authlib, courier-imapd and courier-imapd-ssl all start without a problem and show perfectly fine with ps faux. The network ports are also open, netstat -lanp shows that. The logs say nothing, except:

```

Feb  4 21:11:38 Mordor authdaemond: modules="authmysql", daemons=5

Feb  4 21:11:38 Mordor authdaemond: Installing libauthmysql

Feb  4 21:11:38 Mordor authdaemond: Installation complete: authmysql

```

That also makes me belive the startup of Courier was a success... I can successfully connect to the ports with telnet for example. All ok until here... Then I started my Mozilla Thunderbird: I can't anymore get my emails via IMAP, Thunderbird says "Mail server at XXX.XXX.XXX.XXX is not an IMAP4 mailserver.", I can't understand why, the capabilities passage in the configuration file of curier states IMAP4rev1, so it should work, it's the same as before... Then to doublecheck it wasn't only my mail client I tried the webmail (Squirrelmail) I use on that server, it also stopped working with an "Error: connection dropped by IMAP server."! Again the logs don't say a thing, and I couldn't find anything here on the Gentoo forums. MySQL USE flag is of course activated on both courier-imap and courier-authlib packages. I also read the courier-imap-gentoo.readme file in the doc folder but it didn't help me solve my problem, it all worked before...

Anyone out there who has an idea? Thanks in advance, CHTEKK.

----------

## j-m

Did you run dispatch-conf or etc-update? And honestly, I found it much easier and faster to let it overwrite the original settings (of course after backing them up to a safe location) and tweak them from scratch. Just a few minutes and no problems with this upgrade.

You might also have a look at this thread: https://forums.gentoo.org/viewtopic.php?t=290170

----------

## llongi

 *j-m wrote:*   

> Did you run dispatch-conf or etc-update? And honestly, I found it much easier and faster to let it overwrite the original settings (of course after backing them up to a safe location) and tweak them from scratch. Just a few minutes and no problems with this upgrade.
> 
> You might also have a look at this thread: https://forums.gentoo.org/viewtopic.php?t=290170

 

I did run etc-update, let him change all my config files to the new ones and then I modified them again from scratch to suit my configuration. The old authdaemond is stopped and deleted, I use and started the correct courier-authlib and I also placed the right config files of it in /etc/courier/autlib.  I already examined every thread with the word "courier" in it that dates back to 03.02.2005, so all "upgrade problem" threads are already read, still nothing... The whole Courier system seems to start fine, but all the mail clients refuse to connect with various errors... Also if i telnet to the IP+Port i only get a blank line after the "Escape character is '^]'." line, shouldn't there be the listing of the capabilities of the IMAP server? :S But they are in the config file for the imapd, so there should be no problem...  :Sad: 

----------

## langthang

hop on irc.freenode.net and /join #gentoo-netmail if you can.

----------

## llongi

 *langthang wrote:*   

> hop on irc.freenode.net and /join #gentoo-netmail if you can.

 

Did that and thanks to langthang i solved my problem:

I deleted the two new lines at the end of /etc/courier-imap/imapd:

```

MAILDIR=.maildir

MAILDIRPATH=.maildir

```

since i was thinking they were not needed for my particular setup, but it seems they now are necessary, and after adding them again at the end of the file all did work perfectly fine. Thanks again to all involved!  :Smile: 

----------

## TimG

Thank you CHTEKK.  That would have taken me forever to figure out.

----------

