IMAP Access via Outlook
Note: this documentation is fairly old, and may be out-of-date. I no longer run my own IMAP server.
My brother needed a good way to get at his email from Outlook on Windows. He had typically been using POP, but I wanted to move to a more secure method. There's no point in using SSH for logins if your password goes in cleartext over the wire to download your mail.
I decided to install uw-imapd. Why this IMAP server? Mainly, it's the first one I found when querying Debian's list of packages. I wanted one which supported standard UNIX mbox format and had SSL connectivity, and uw-imapd fits the bill. I also looked briefly at courier, but decided against it because it only supports maildir, not mbox.
First, I installed uw-imapd:
daystrom:/root# apt-get install uw-imapd
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
libc-client2002edebian mlock
Suggested packages:
uw-mailutils mutt imap-client
Recommended packages:
exim4 mail-transport-agent
The following NEW packages will be installed:
libc-client2002edebian mlock uw-imapd
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 675kB of archives.
After unpacking 1348kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://http.us.debian.org sarge/main mlock 7:2002edebian1-11 [25.3kB]
Get:2 http://http.us.debian.org sarge/main libc-client2002edebian 7:2002edebian1-11 [580kB]
Get:3 http://http.us.debian.org sarge/main uw-imapd 7:2002edebian1-11 [69.7kB]
Fetched 675kB in 1s (376kB/s)
Preconfiguring packages ...
Selecting previously deselected package mlock.
(Reading database ... 43412 files and directories currently installed.)
Unpacking mlock (from .../mlock_7%3a2002edebian1-11_i386.deb) ...
Selecting previously deselected package libc-client2002edebian.
Unpacking libc-client2002edebian (from .../libc-client2002edebian_7%3a2002edebian1-11_i386.deb) ...
Selecting previously deselected package uw-imapd.
Unpacking uw-imapd (from .../uw-imapd_7%3a2002edebian1-11_i386.deb) ...
Setting up mlock (2002edebian1-11) ...
Setting up libc-client2002edebian (2002edebian1-11) ...
Setting up uw-imapd (2002edebian1-11) ...
Creating generic self-signed certificate: /etc/ssl/certs/imapd.pem
(replace with hand-crafted or authorized one if needed).When given the choice, I just enabled imaps (secure IMAP) and kept pop2 and pop3 disabled. No point in enabling services that I won't use.
I also had to open port 993 (imaps) in my firewall to allow connections.
Note that the docs have this to say about SSL certificates:
This package has been compiled with SSL support. On installation it will generate a self-signed certificate for you in /etc/ssl/certs/imapd.pem. This certificate will expire in one year. You can replace this with a cerificate from verisign etc. if you want. Or you can follow the instructions in the openssl package to generate your own.
Because of this, some mail clients (like Outlook) may complain that the cert is not "valid". If you can't live with this, check out RealSSL for information on how to create a real certificate signed by your own personal certificate authority .
The one-year limitation on the cert is annoying. It looks like all you have to do in order to recreate the certificate is to remove /etc/ssl/certs/imapd.pem (and possibly the link that points at it) and then run dpkg-reconfigure uw-imapd. Of course, this isn't required if you're using a real certificate.
Getting connectivity to this server from Outlook was a breeze. Mark just set up a new IMAP connection to daystrom, and told it that SSL was required. There was no need to check "Log on using Secure Password Authentication (SPA)" or anything like that. Outlook does complain about the cert being invalid (as discussed above), but it does work.