[Dovecot] Setting IMAP keywords/flags on delivery

Matt Doran matt.doran at papercut.com
Thu Jan 8 04:24:14 EET 2009


Hi there,

We've been long time users of Dovecot, and have found it a great IMAP 
server.  I don't think we've had any serious problems in the 3-4 years 
of use.  So great work. :)

We have a IMAP inbox that is accessed by a number of different users 
from Thunderbird.   We have a rule in Thunderbird to flag new emails as 
"TO DO", so someone can unflag the email once it has been actioned.  
This process works fairly well for a simple workflow, but problems arise 
when someone connects to the inbox with a Thunderbird instance that 
doesn't have the "TO DO" rule configured.    The email will not be 
flagged properly. :(

I'd like to be able to set this flag/keyword when the mail is delivered 
to the inbox, on the server side.  That way the flag will be set no 
matter which client accesses the Inbox first.   We currently use mail 
drop for our server-side mail filtering .... and would like to do a 
similar thing with this flagging process.

We're using Dovecot 1.0.15 on Debian Testing, and use Maildir storage 
and maildrop as our delivery agent.

I've read about how the keywords and Thunderbird labels work in the wiki 
article here (http://wiki.dovecot.org/MailboxFormat/Maildir).  So I 
could probably write some sort of script to query the "dovecot-keywords" 
file, and rename the Maildir file to set the appropriate flag.  But this 
sounds a like a bit of a hack, and maybe a little dangerous.

Does anyone have any recommendations as to how I could achieve something 
like this?  I'm keen to hear any ideas, whether it's through scripting, 
or some sort of scriptable/command-line IMAP client.

Ideally, we'd have a way to set the flag at the time when the mail is 
delivered.... or when the first client retrieves any new mail?

Thanks in advance!!

-- 
Matt Doran
PaperCut Software International Pty. Ltd.
Phone:   +61 (3) 9807 5767
E-mail:  matt.doran at papercut.com
Profile: http://www.papercut.com/about/#matt
Blog:    http://www.papercut.com/blog/



More information about the dovecot mailing list