[Dovecot] Transparent IMAP proxy

Timo Sirainen tss at iki.fi
Sun Jun 16 20:06:01 EEST 2013

On 16.6.2013, at 16.42, Yonatan Broza <yonatan at cuppcomputing.com> wrote:

> I'm considering patching Dovecot to work as a transparent (and virus scanning) IMAP proxy.
> What is the appropriate feature to extend? (I've considered the following: IMAPC and reverse proxying, with IMAPC looking more promising since it actually parses IMAP communication).
> Can anyone who is familiar with the IMAPC code recommend what are the most appropriate locations in the code to make the required changes? (I've considered hooking the storage virtual functions and making the settings local rather than global - but would appreciate more specific ideas).

imapc and http://dovecot.org/patches/2.1/mail-filter.tar.gz can do this. But note that the MIME structure or the parts' sizes must not change. Basically you'll have to replace the viruses with empty spaces or something.

imapc isn't very efficient though. It translates all IMAP commands to rather simple ones. So for example a SEARCH won't be passed through to the backend server.

More information about the dovecot mailing list