On Aug 14, 2008, at 11:12 AM, martijn@youngguns.nl wrote: Is there a way to modify mail messages when they are downloaded In theory, yes. eg. my normal login for dovecot is martijn@youngguns.nl but when I There are some problems with that. You'd have to have separate index
using a
special login.
log in
using martijn@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.
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).