Lampa wrote:
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" ["[email protected]", "[email protected]",
"[email protected]"] {
redirect "[email protected]";
redirect "[email protected]";
....
redirect "[email protected]";
} else {
keep;
}
---------------
Converter script:
---------------
require ["fileinto","regex","envelope","vacation"];
if envelope :comparator "i;octet" :contains
"From.*([email protected]|[email protected]|[email protected])" "" {
redirect "[email protected] [email protected] .... [email protected]";
}
if true {
fileinto "$DEFAULT";
}
This not Sieve. There is no envelope part "From.*(... " and redirect
only accepts one address.
---------------
Converter script is cannot be compiled. But it used other style envelope.
The converter's script does not make much sense, although I can see what
it is trying to do.
So what is difference between envelope and header ?
The header test matches against headers of the message itself. The
envelope test matches against the SMTP envelope.
And there are some limits for redirect ?
Check the 'Configurable Limits' section of the INSTALL file (wiki needs
to be updated):
http://hg.rename-it.nl/dovecot-1.2-sieve/file/0.1.15/INSTALL
So, you can configure sieve_max_redirects according to your needs.
Regards,
Stephan.