[Dovecot] Plugin when downloading mail

Timo Sirainen tss at iki.fi
Thu Aug 14 18:59:44 EEST 2008


On Aug 14, 2008, at 11:12 AM, <martijn at youngguns.nl> <martijn at youngguns.nl 
 > wrote:

> Is there a way to modify mail messages when they are downloaded  
> using a
> special login.

In theory, yes.

> eg. my normal login for dovecot is martijn at youngguns.nl but when I  
> log in
> using martijn at dosomething.youngguns.nl I would like to download my  
> mail
> which are processed using a Perl script. The Perl script will modify  
> the
> content of the message (the message body). So I don't want to change  
> the
> header or IMAP flags.

There are some problems with that. You'd have to have separate index  
files for the accounts so that Dovecot won't return wrong cached  
values (or disable indexes for the other login). I think the plugin  
could work very much like the zlib plugin works now (override struct  
mail.get_stream()). Just make sure it always returns exactly the same  
output, because IMAP guarantees that the messages are immutable (and  
e.g. fetching RFC822.SIZE must match your modified message's size).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080814/aee7d5ee/attachment.bin 


More information about the dovecot mailing list