The Book of IMAP

The Book of IMAPBefore starting on The Book of IMAP by Peer Heinlein and Peer Hartleben, you'd better have a very good understanding of e-mail, and I recommend you at least have some experience with IMAP, or you'll probably close the book after a few pages only.

I got the impression that the publisher dropped the original manuscript on the floor and upon gathering it up, they mixed up the order of the material. The book starts off with protocols and terms, moves into load distribution via load balancers, round robin DNS, IMAP proxies, selection of file systems for IMAP servers, Webmail clients and IMAP migration before starting on the IMAP servers proper! A beginner will find that very hard to follow and digest.

The book is full of valuable information on the Courier and Cyrus IMAP servers, and the authors have collected plenty of tips on those programs. However, there is little information about interaction with client programs and with e-mail servers, so if you've never set up an e-mail server with an IMAP (or POP3) server, I think it will be difficult to follow.

The (unofficial) Web site of The Book of IMAP has little additional information
(at the time of this writing), but that may change.

Mail.app yok

I've stopped using Apple's Mail.app (Mail.app yok) on the Mac, and I'm back to using Thunderbird. Thunderbird properly supports IMAP IDLE, correctly identifies the number of unread messages in folders, and just works better than Mail.app, for me. It also supports Growl, which I enjoy using.

Mail.app is more beautiful, but I can live with that.

Every three or four years

Every three or four years, depending on how a company writes off its hardware, you have machines to replace. Now, replacing a box with a few cables on it isn't hard: you rip the old cords out of the wall and throw the lot on the dump. After that, you place the new boxes in your data centre and plug in all the cords in their respective sockets.

But that isn't quite all there is to it, is it?

You then install a base operating system. If you are lucky, nothing much has changed and you load backup tapes (or whatever media you've used) and restore from that. If you aren't so lucky (as what happened to me), the machine you are replacing wasn't quite, shall we call it up to date?

In that case, it is more or less a start from scratch kind of operation. Software has changed, you decide to use a different IMAP server, the MTA configuration needs tweaking, Apache's authentication modules have changed (for the, it must be, trillionth and a half time), etc., etc., etc.

Oh, well, I'm all done.

Well: not quite. There is still half a load of utilities and stuff that need recompiling (new version of GCC, you know), but I should be getting there soon.

I hope. :-)

Mulberry: FLOSS

The source code of the excellent Mulberry IMAP client has been released, and it includes a CalDAV client.

Mail-reorganization

I'm in the process of revamping and consolidating the way I handle, store and process e-mail. Having neglected to get things done properly for quite a while now, this became an urgent task.

The MX for mens.de is hosted by my provider. From there, I pick every
thing up with getmail, sorting messages into folders automatically, etc. Within my network, I can access the whole lot with IMAP. Outgoing mail is handled with Exim of course, and generally speaking, all works to my satisfaction.

There is one thing that irked me though: I have two very important people foreign to my SOHO network who have mens.de addresses, and since that domain is handled locally, I had to resort to work-arounds to get messages to them. I've finally got around to fixing that, a cinch with Exim.

An Exim router handles that nicely:

special_mens:
 driver = manualroute
 domains = mens.de
 local_parts = lsearch;/etc/exim/localparts-mens
 transport = ...
 route_list = * ...

The file localparts-mens contains their user names, one on each line, and the rest is magic.

More pain with attachments

I've created six files with bogus extensions. The filename prefix denotes the actual content (text/plain, image/png and application/octet-stream), and I simply tacked on an extension for decoration.

What happens when I send off a message with all six files attached? Let me look at three e-mail clients I use regularly.

Lotus Notes 7.0.2 on Mac OS X displays the problem right after attaching the files. Note how the icons match the file extensions and not their content (remember: the file's content are the first three letters of the name, the rest is decorum):

Not a single one is right.

In Thunderbird version 2.0.0.6 we have a very similar situation after attaching the files:

All wrong again.

Mutt interprets the files with these content-types and gets none right. The reason is explained in the manual: Mutt consults the mime.types file to determine the type from the extension.

A  2 exe.jpg                 [image/jpeg, base64, 56K]
A  3 exe.txt   [text/plain, quoted, unknown-8bit, 56K]
A  4 png.jpg                [image/jpeg, base64, 133K]
A  5 png.txt  [text/plain, quoted, unknown-8bit, 133K]
A  6 txt.exe        [applica/x-msdos-pr, quoted, 0.1K]
A  7 txt.jpg                [image/jpeg, quoted, 0.1K]

Is it trivial to determine a file's content? Let me use the Unix file command and see.

$ file ???.???
exe.jpg: MS-DOS executable (EXE), OS/2 or MS Windows
exe.txt: MS-DOS executable (EXE), OS/2 or MS Windows
png.jpg: PNG image data, 500 x 778, 8-bit/color RGB, non-interlaced
png.txt: PNG image data, 500 x 778, 8-bit/color RGB, non-interlaced
txt.exe: ASCII text
txt.jpg: ASCII text

Yes, it is trivial.

deepOfix Mail Server

deepOfix is a mail server in a box licensed under the GPL.

deepOfix is LDAP-driven with an OpenLDAP server, brings SpamAssassin and ClamAV support with it and offers Webmail and the ubiquitious SMTP, POP3 and IMAP services.

I spent an hour test driving this software and it looks good. A clean web interface to manage the lot, shell access for root and optionally for individual users offer what a small business would need.

Note to self: keep an eye on this project.

RSS to IMAP: Newspipe

NewspipeMost RSS feed readers will keep a cache of downloaded articles for a user-defined amount of time. In NetNewsWire which I use, I can set article expiry in the program's preferences. In spite of having that functionality, there are some feeds that I want to archive for ever, and I'd like to have access to the article from wherever I am located. Additionally, I'd love to be able to access this archive with a simple mail client.

To this effect, I want certain feeds stored on an IMAP server. If I search for rss to imap or any similar query, there is a mass of software and solutions that turn up, but the best program I have found to date is Newspipe, an Open Source tool which is very easy to use and extremely flexible at that.

Newspipe is fed an OPML file with a twist, and it then grabs the feeds on a regular basis, or when I want it to, and produces SMTP messages which are then submitted to my mail server.

The twist on the OPML file is that Newspipe recognizes special attributes in the OPML outline entries which cause it to handle a feed in a special way. By the way, many feed readers can export an OPML file of my feeds on request, and I can use that as a starting point for Newspipe.

For example, certain feeds (such as the one on this site) have a short text–only representation of the post. If so desired, I can tell Newspipe to go and get the actual page, and it will download the page and all images to create a full MIME message representing the page, sending that off via SMTP to my account. This feature should be used with care, as the messages can become quite large. This is a sample of a textual message as rendered by Thunderbird

Newspipe text

and here is the same RSS feed entry as viewed when the referring page is downloaded by Newspipe:

Newspipe MIME

(Please note that these screen shots are not taken from Thunderbird's built-in RSS feed reader, but rather as seen by Thunderbird's IMAP client.)

Newspipe is controlled by a small .ini file and by attributes in the OPML entries, as described above. It runs on any platform that has Python and it is well documented.

By default, Newspipe runs for ever when started; I changed this behaviour in the configuration, because I execute the program every few hours via cron, so I set sleep_time=0.