Error: I'm afraid this is the first I've heard of a "writeba" flavoured Blosxom. Try dropping the "/+writeba" bit from the end of the URL.

Mon, 24 Jan 2005

total hotness

Those of you who run your own mailserver might be interested to learn that I've slogged through the (surprisingly pleasant) installation of a webmail interface on positron that manages to coexist perfectly with my normal method of access, viz., ssh+mutt. Moreover, in the process I ended up setting up a SSL/TLS-enabled IMAP server so that I can actually use mutt (or some other SSL-enabled IMAP client) on pretty much any machine and it'll make a secure connection and (with an appropriate .muttrc) behave just like the local one.

First things first: imapd. This is incredibly easy:

[root@positron ~]# apt-get install uw-imapd-ssl

You may be asked to install some ancillary packages. Use your best judgement. After that, assuming you already have apache2, SSL, and mysqld up and running (not gonna help you with this; a google search should suffice), just

[root@positron ~]# apt-get install imp3

Note that you'll need a bunch of other stuff as well (e.g., horde2, php4-mysql or -pgsql, et cetera), but apt will happily inform you of all this.

In fact, it's only now that we get to the part that apt doesn't just do for you, but this part is easy, too. First, there ought to be a file called /etc/horde2/apache.conf which needs to be symblinked into /etc/apache2/sites-enabled/. I'd recommend inserting a line saying simply SSLRequireSSL just after the allow from all line. This will ensure that you can't accidentally send your password to the server in cleartext.

After reloading the Apache configuration, you ought to be able to connect to https://localhost/horde2/imp/ (but not to http://&c) and get a login screen. Unfortunately, you won't be able to log in yet, because imp3 will silently fail when presented with the self-signed certificate that dpkg-configure generated for you back when you installed uw-imapd-ssl. You need to modify /etc/imp3/servers.php to include a different file, e.g., /etc/imp3/servers-debian.conf which is a copy of the automatically-generated file /var/lib/imp3/servers-debian.conf except that you need to change the value of the 'protocol' argument to 'imap/novalidate-cert'. Your other option, of course, is to convince the php4-imap-ssl module that your key is a valid signing key, but since I didn't do this, I can't exactly tell you how without working it out myself (which kind of defeats the purpose, viz., laziness, of having done it this way in the first place).

If you have an inordinate number of files under ~/mail/ (as I do), the "folders" view will probably cause the php backend to exceed its maximum memory allocation. This is controlled by the memory_limit variable in /etc/php4/apache2/php.ini; you'll know you need to do this if, after logging in, clicking the "Folders" icon does nothing.

Now comes the real hotness: MIMP. It's Imp for your WAP phone. Once I get some more time, I'm totally going to play around with this. If all goes according to plan, I'll be able to access my mail through any SSL-enabled IMAP client, any web browser, or my cell phone while retaining all my current procmail/spamassassin/&c filtering and the ability to keep using mutt locally on positron.

Hotness. #