[Dovecot] sieve

upen upendra.gandhi at gmail.com
Tue May 22 23:45:13 EEST 2012


On Tue, May 22, 2012 at 3:37 PM, Daniel Parthey
<daniel.parthey at informatik.tu-chemnitz.de> wrote:
> 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;

Thanks Daniel. It worked flawlessly. I didn't need to add require
statement, script worked even without it.



More information about the dovecot mailing list