Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Ubuntu server 11.10 and trying to set up an IMAP server with Courier-IMAP. I followed guide here: which is basically nothing more than apt-get install courier-imap.

The problem comes when I try to test the server with telnet 143. Immediately get "Connection closed by foreign host." Complete output:

Connected to
Escape character is '^]'.
Connection closed by foreign host.

/var/log/mail.log contains:

dovecot: master: Fatal: execv(/usr/lib/dovecot/imap-login) failed: No such file or directory
dovecot: master: Error: service(imap-login): child 7466 returned error 84 (exec() failed)
dovecot: master: Error: service(imap-login): command startup failed, throttling

The binary imap-login does not exist in that directory, nor does locate imap-login show any output so it's safe to say that I do not have it on my system. Is courier-imap a broken package? Or am I missing a dependency? Keep in mind, this is my first venture into the world of mail servers, so I'm not very knowledgeable on the topic yet. Thanks for any help!

EDIT: After a little more investigation, I can install the package dovecot-imapd which provides imap-login, but apt forces me to remove courier-imap to install it. Then, if I try to install courier-imap and installing dovecot-imapd apt forces me to remove dovecot-imapd which removes imap-login. Something isn't right with the dependencies and conflicts here.

share|improve this question

I was able to get this working by installing dovecot-core and restarting courier:

sudo apt-get install dovecot-core
sudo /etc/init.d/courier-imap restart
share|improve this answer
up vote 0 down vote accepted

I ended up installing the dovecot-imapd package, and copying /usr/lib/dovecot/{imap-login,imap} to my home dir and then uninstalled dovecot-imapd, installed courier-imap and copied the imap-login and imap binaries back into /usr/lib/dovecot/. Everything seems to be working, although I'm sure this will break in the future when courier is updated. Hopefully by then the package dependency/conflict problem will have been corrected.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .