[Dovecot] Future enhancement of imap: sorting?

Andy Dills andy at xecu.net
Fri Mar 7 03:59:00 EET 2008


After solving a problem with a sweet little application I discovered (more 
on that below), I wanted to get some feedback about a potential 
enhancement for IMAP: standardized, MUA independant, server-side sorting.

Currently, there are two basic solutions for sorting: handle it during 
delivery or handle it in the MUA. However, if you handle it in the MUA, 
you lose some of the client independancy and portability that imap was 
designed to address, as there is no mechanism to sync sorting rules 
between clients, and many lightweight clients don't support sorting at 
all. On the flip side, in distributed mail envrionments sorting at 
delivery time isn't feasible, as you typically have the entire mailspool 
owned by a single UID and mounted via NFS. My basic point is that the two 
paradigms for sorting have fundemental flaws that severaly limit them.

It occured to me that it would be ideal to enable sorting in the imap 
daemon, enabling users to implement sorting rules which are stored in 
their directory (similar to the other imap metadata), and which get 
invoked whenever mail is checked. Perhaps that is beyond the reasonable 
scope of the imap protocol, but in my mind sorting is a critical task that 
is poorly addressed and needs to be standardized. I'd love to hear 
opinions on this.


See, in our mail cluster environment, it's basically impossible to use 
procmail without forwarding your mail to our shell server (nor are we able 
to use the dovecot LDA). So, the question presented to me by one of my 
business partners was, since Outlook was shortsighted and didn't include 
the ability to sync sorting rules between clients, nor did they implement 
sorting functionality whatsoever on the windows mobile version, what 
options does he have to ensure proper sorting of his mail without having 
to leave outlook running 24x7? He doesn't want to have to wade through 
mailing list email on his mobile outlook, nor does he want to have to 
ensure his filter rules are consistent in both his outlook and our 
webmail.

So, I poked around in the ports tree, and found a gem: imapfilter.

http://imapfilter.hellug.gr/

It's configured via lua, supports a very rich array of actions and 
queries, and has proven to be very robust and lightweight. I helped him 
get started with some sample rules, added it to run every minute as a cron 
job, and boom: robust, fully featured, MUA independant filtering in an 
environment that can't support procmail or the dovecot LDA. 

As nice as it is, it's still a personal solution. In my mind we need to 
have standardized, server-side, MUA-independant sorting rules that get 
invoked when a mailbox is checked. Thoughts?

Andy

---
Andy Dills
Xecunet, Inc.
www.xecu.net
301-682-9972
---


More information about the dovecot mailing list