LWN.net Logo

IMAP

IMAP

Posted Jun 17, 2004 14:02 UTC (Thu) by corbet (editor, #1)
In reply to: IMAP by lakeland
Parent article: The Grumpy Editor's guide to mail clients: introduction

IMAP does look like it will be a part of the eventual solution. It achieves a nice separation between the storage and presentation levels, and makes it easier to use a wide variety of mail clients.

What IMAP doesn't do, by itself, is provide the flexibility of the low-level MH interface. While MH makes it easy, for example, to write shell scripts which do interesting things with messages and folders, IMAP servers have a tendency to lock up mail inside a black box. At that point you are back to the "you can only do what the mail client developer could imagine" mode.

One of the upcoming articles, anyway, will likely be a look at IMAP servers. There's a bunch of them out there and choosing the right one is not always straightforward.


(Log in to post comments)

IMAP Black box?

Posted Jun 17, 2004 15:24 UTC (Thu) by rfunk (subscriber, #4054) [Link]

Most of the IMAP servers I'm familiar with use one of the standard mailbox formats. (Cyrus is the major exception. And if I remember correctly its format is fairly MH-ish.)

In fact, many of the better ones seem to be maildir-compatible these days.

Again, check out my recent writeup on mailbox formats.

IMAP Black box?

Posted Jun 17, 2004 21:10 UTC (Thu) by lakeland (subscriber, #1157) [Link]

Right, the four IMAP servers I've used have all worked with Maildir (for
three of them it was the default). I've come back to using courier now,
it just seemed the others needed manual restarting every so often -- say
once a month while courier just keeps on ticking...

IMAP

Posted Jun 24, 2004 7:09 UTC (Thu) by cras (guest, #7000) [Link]

I've had exactly the same thoughts about scriptability. IMAP isn't very well suited to it by itself. The protocol is too complex to access directly with simple shell scripts, you'd need separate utilities that provide easier interface for it.

For example I quite often want to search a message from a specific sender where message body contains specific words. While IMAP itself allows this with SEARCH command, it only gives back a list of message numbers which have to be separately fetched. I can't just do "echo ... | nc imap.server | less". grepping mailboxes directly doesn't work very well either. I'm using Evolution which would allow it with advanced search, but it needs so many mouse clicks that I usually just begin grepping.

Fortunately, I've finally gotten my IMAP server's (dovecot.org) internals very flexible. It's no longer limited to only what IMAP can provide, so I can easily do pretty much any kind of mail accessing with it. First I'll add new IMAP extension which allows pipelining commands together, something like:

search from "user name" body "text" | fetch body.peek[]

This would allow me to do most of what I want. Perhaps the next step would be to create new protocol which allows much easier scriptability.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds