[Dovecot] Adding Sieve Extensions

James Butler jbutler at thebestdefense.com
Fri Apr 3 23:08:21 EEST 2009


> On Fri, 2009-04-03 at 12:34 -0700, James Butler wrote:
>> How can I add an extension to Dovecot's Sieve implementation?
>>
>> I would like to use 'editheader' and 'redirect'.
>
> I'm not really sure what you mean. editheader isn't implemented,
> although Konstantin is apparently trying to implement it for
> dovecot-libsieve. redirect is implemented and can be used in the same
> way as all other sieve implementations:
>
> redirect "email at example.com";
>
>

Thank you for your response!

- Dovecot v.1.2.beta4
- Sieve 0.1.4

I am getting this in my sieve log:

main script: line 7: error: unsupported sieve capability 'editheader'.
main script: line 7: error: unsupported sieve capability 'discard'.
main script: line 7: error: unsupported sieve capability 'redirect'.
main script: line 12: error: unknown command 'addheader'.

I wish to receive list messages to a list user (i.e. lists at example.com),
then distribute them to the appropriate end users, then discard the
original message. Here's what I am currently experimenting with:

if not header :contains "X-noloop" "true" {
 if header :contains "Subject" "List Title" {
   addheader :last "X-noloop: true";
   redirect ["enduser1 at example.com","enduser2 at example.com"];
   discard;
   stop;
 }
}

Since this is a global script, I figured I need to add a header or flag to
the message then detect it and avoid a loop condition.

James



More information about the dovecot mailing list