[Dovecot] Proprietary mail storage.

Robert Schetterer robert at schetterer.org
Wed Aug 31 18:17:51 EEST 2011


Am 31.08.2011 17:14, schrieb Timo Sirainen:
> On 31.8.2011, at 18.04, Robert Schetterer wrote:
> 
>>> Is it otherwise a Maildir? If yes, you could base your code on the zlib plugin, or perhaps more easily you could use mail-filter plugin: http://dovecot.org/patches/2.0/mail-filter.tar.gz
>>
>> are there any examples or how too online for mail-filter ?
> 
> For compiling look at the beginning of mail-filter-plugin.c
> 
> For using add it to mail_plugins and:
> 
> plugin {
>   mail_filter_executable = /path/to/your/script.sh
> }
> 
> A script could be for example (totally insecure and broken):
> 
> #!/bin/sh
> 
> sed s/Hello/Hi/ > /tmp/foo
> cat /tmp/foo
> rm /tmp/foo
> 
> Unfortunately you can't both read stdin and write to stdout at the same time because of some internal Dovecot problems with it. So you'll have to write it to a temp file and then output that after the entire input is read.

sorry for silly question
is there any known typical usage for that , or was this on the wishlist
to solve some stuff ?
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria



More information about the dovecot mailing list