[Dovecot] sieve script

Lampa lampacz at gmail.com
Fri Jan 29 13:20:30 EET 2010


Hello,

after qmail migration need convert some .procmailrc scripts. Found
converter procmail -> sieve, but i'm not sure of quality of
conversion.

My script:
---------------
if header :contains "from" ["user at domain1.tld", "user2 at domain2.tld",
"user3 at domain3.tld"] {
        redirect "foo1 at bar.tld";
        redirect "foo2 at bar.tld";
....
        redirect "foo20 at bar.tld";
} else {
        keep;
}
---------------

Converter script:
---------------
require ["fileinto","regex","envelope","vacation"];

if envelope :comparator "i;octet" :contains
"From.*(user at domain1.tld|user2 at domain2.tld|user3 at domain3.tld)" "" {
        redirect "foo1 at bar.tld foo2 at bar.tld .... foo20 at bar.tld";
}

if true {
        fileinto "$DEFAULT";
}
---------------

Converter script is cannot be compiled. But it used other style envelope.

So what is difference between envelope and header ?
And there are some limits for redirect ?

Thank you.
-- 
Lampa


More information about the dovecot mailing list