Idea for filtered access to cyrus

Michael R. Gettes gettes at duke.edu
Wed Aug 2 11:18:33 EDT 2006


Rob Carter (duke) and I have been discussing for some time how to
provide filtered access to the IMAP store using cyrus (cuz we use
cyrus - duh!).

Problem:  With the blackberry a user can filter what email is sent
to their device.  It's a handy and powerful ability.  Non-blackberry
devices that speak the IMAP protocol do not have such a filtering
ability.  You essentially get ALL your mail.  We see this as  
problematic.
So, how to provide a filtering ability without changing the clients?

The Idea:

I will present this idea from the user perspective and drill down.

The user enters into the device as login information: username 
+filter=foo and pw.
(or something to that effect - don't get hung up on the details at  
this point).

Cyrus gets this and slices off the +filter= and places the value "foo"
into a FILTER variable.

On the mail delivery side:  LMTP is changed to look for X-IMAP-FILTER  
headers
and to store the value of the header as an IMAP flag.  Assuming
X-IMAP-Filter: foo
then we add /filter=foo to the IMAP flags.  Do so for each X-IMAP-FILTER
header found.

then we modify the code to apply looking for /filter=foo to limit all
eligible email for the life of the session.  Any mail stored (copied,  
moved, etc)
would retain or have added the /filter=foo flag.  It is our hope that  
getting
down deep enough into the code that this is not all that hard to do.

We then create a web page service to allow people to tag email with
X-IMAP-Filter headers based on whatever rules using things like  
sieve, procmail
or whatever you favorite mechanism may be.  You can have multiple  
filters for
different devices or purposes.

from the user perspective - a simple web interface to create/modify  
filters and
a simple mechanism to login to an IMAP server with ANY client and  
have a limited
view of all the mail.

I am really not interested in negative filters being implemented at  
this level -
negative filters would be implemented by the web page and the sieve  
like mechanism
to control what X-IMAP-Filter headers are added.  So, if you wanted  
to flag all
non-junkmail then handle this by setting a non-junkmail filter.   
(this takes
a little thought to realize the implications).

So, this is the really simple view of this idea.  I don't see any  
major show
stoppers and it dramatically increases the utility of cyrus to small  
devices
in particular.

Thoughts?

/mrg


More information about the Info-cyrus mailing list