Jay
2012-Nov-09 05:37 UTC
[Dovecot] Is there a hook for a plugin to do some transient operation on the mail body ...
... when the MUA has issued a FETCH? ? I am a Dovecot newbie ... so please bear with me if this is obvious. Basically what I am trying to do is process the mail body (in my own specific way) before Dovecot serves it up to the MUA. I want to do it as a transient operation in memory. So think of the scenario as ... ? - the MUA issues a FETCH ? - Dovecot intercepts the FETCH ? - Dovecot internally gets the mail from the storage into a buffer in memory ? ----> This is where I'd like to apply a function to the mail body and modify the mail body?in the buffer (not in the storage) ? - Dovecot serves up the (modified) mail to the MUA ? Looking for a hook that allows me to do it using a plugin. Looks like the zlib plugin does something similar ... applies a decompression function ... but I am not 100% sure. ? Thanks for your help. -- J.
Timo Sirainen
2012-Nov-23 06:39 UTC
[Dovecot] Is there a hook for a plugin to do some transient operation on the mail body ...
On 9.11.2012, at 7.37, Jay wrote:> ... when the MUA has issued a FETCH? > > I am a Dovecot newbie ... so please bear with me if this is obvious. Basically what I am trying to do is process the mail body (in my own specific way) before Dovecot serves it up to the MUA. I want to do it as a transient operation in memory. So think of the scenario as ... > - the MUA issues a FETCH > - Dovecot intercepts the FETCH > - Dovecot internally gets the mail from the storage into a buffer in memory > ----> This is where I'd like to apply a function to the mail body and modify the mail body in the buffer (not in the storage) > - Dovecot serves up the (modified) mail to the MUA > > Looking for a hook that allows me to do it using a plugin. Looks like the zlib plugin does something similar ... applies a decompression function ... but I am not 100% sure.http://dovecot.org/patches/2.1/mail-filter.tar.gz allows you to run it through a script. But note that IMAP protocol requires that messages never change, and Dovecot relies on that internally as well. Practically it's ok enough to change the message content, as long as you don't change the message/MIME structure sizes.
Apparently Analagous Threads
- Sent mail issue
- Password issue
- Auto MX Email Client configuration, the right way?
- [trees-plugin] - Dovecot index gets corrupted, when using maildir and recievend and accessing mail at the same time
- Question about the pop3 feature "leave messages on server for a certain period of time"