atom feed2 messages in org.dovecot.dovecotRe: [Dovecot] Sieve Editheader Extens...
FromSent OnAttachments
Michael K SandersMay 31, 2008 11:34 am 
Timo SirainenMay 31, 2008 11:56 am 
Subject:Re: [Dovecot] Sieve Editheader Extension?
From:Timo Sirainen (ts@iki.fi)
Date:May 31, 2008 11:56:53 am
List:org.dovecot.dovecot

On Sat, 2008-05-31 at 11:35 -0700, Michael K Sanders wrote:

I've done extensive searches, and there is virtually no information about actual implementations of the draft Sieve Editheader Extension (which provides 'addheader' and 'deleteheader' actions):

http://www.ietf.org/internet-drafts/draft-ietf-sieve-editheader-11.txt

Is anyone currently working on this for Dovecot Sieve?

If not, are there any plans to do so? And before I start digging through the source, is the architecture amenable to this functionality?

deliver doesn't directly support modifying the message, so you'll have to change the plugin to hook into struct mail.get_stream() and have it return your own filtered stream instead of the original one (see e.g. mail_log plugin how to override struct mail's methods). Deleting headers is simple with i_stream_create_header_filter(), but adding headers is a bit trickier. Maybe i_stream_create_concat() will help: filtered istream with HIDE_BODY flag + data_istream for your added headers + message body as limit_istream.

Also the cmusieve plugin will be deprecated soon after Stephen Bosch's own implementation is finished. Two weeks ago he said the first release should be available in a few weeks.