[Dovecot] sieve

Daniel Parthey daniel.parthey at informatik.tu-chemnitz.de
Tue May 22 23:37:04 EEST 2012


Upendra Gandhi wrote:
> I'd like to keep all emails coming from alom-alert at anydomain and not
> forward those but rest of the emails will be kept and forwarded as
> well.
> 
> I put following in the .dovecot.sieve
> 
> if header :contains "Sender" "alom-alert@" {
> keep;
> if not header :contains "Sender" "alom-alert@" {
> redirect "my at emailid on server";
> redirect "xyz at gmail.com";
> redirect "abc at tbc.edu";
> stop;
>   }
> }

You can find a list of available extensions in Dovecot wiki
http://wiki2.dovecot.org/Pigeonhole/Sieve
and include such extensions like this:
require ["fileinto","regex","vacation"];

The nesting of the curly brackets seems to be wrong:
The inner branch which should trigger the redirects
will never be reached, since it resides inside of the
bracket of condition 'if header :contains "Sender" "alom-alert@"'.

I'm thinking of something like this (without having checked syntax):

if header :contains "Sender" "alom-alert@" {
  keep;
}
redirect "my at emailid on server";
redirect "xyz at gmail.com";
redirect "abc at tbc.edu";
stop;

Regards,
Daniel



More information about the dovecot mailing list