My weekend project was to set up an SMTP and IMAP server on my home server so I could finally have my own mail server and be free from the prying eyes of the large email hosts.

Most of this process was relatively simple thanks to this wonderful guide from the Ubuntu help site. However, I ran into one problem: the courier-IMAP server would not accept any connections with the default configuration. A quick look in the mail log revealed:

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

Lo and behold, /usr/lib/dovecot/imap-login did not exist. Furthermore, locate imap-login returned nothing so I concluded that this binary was no where to be found on my system. However, apt-file search imap-login showed that the package dovecot-imapd provided imap-login. I went ahead to install it to find that courier-imap and dovecot-imapd conflict with one another and apt won’t allow them both to be installed. So, my hack-ish workaround, copy the binaries I needed out of the directory, uninstall dovecot-imap and reinstall courier-imap. For those who just want the “solution”:

sudo apt-get install dovecot-imapd
cp /usr/lib/dovecot/{imap,imap-login} ~/
sudo apt-get remove dovecot-imapd
sudo apt-get install courier-imap
sudo cp ~/{imap,imap-login} /usr/lib/dovecot/

Obviously, this is not an ideal solution. Most likely, courier will break with a future update since imap-login won’t be updated, but hopefully this dependency problem will be sorted by then.