2010/1/29 Steffen Kaiser skdovecot@smail.inf.fh-brs.de:
My script:
if header :contains "from" ["user@domain1.tld", "user2@domain2.tld", "user3@domain3.tld"] { redirect "foo1@bar.tld"; redirect "foo2@bar.tld"; .... redirect "foo20@bar.tld"; } else { keep; }
either add "stop;" after redirects or remove the else branch, because after the redirects you'll have the implict "keep", as far as I know.
Ok, thank you.
require ["fileinto","regex","envelope","vacation"];
if envelope :comparator "i;octet" :contains "From.*(user@domain1.tld|user2@domain2.tld|user3@domain3.tld)" "" {
I would expect: "From" "(user ....)" {
That is why can't be compiled.
redirect "foo1@bar.tld foo2@bar.tld .... foo20@bar.tld";
The RFC uses singular with the "redirect" argument, hence, I suppose, it is implementor-defined, whether or not the space-delimited recipients will work.
No it's not working:
.dovecot: line 3: error: specified redirect address foo1@bar.tld foo2@bar.tld foo20@bar.tld' is invalid: address ends in invalid characters. .dovecot: error: validation failed.
if true { fileinto "$DEFAULT";
There is no $DEFAULT, IMHO.
Converter script is cannot be compiled. But it used other style envelope.
What's the error?
line 5: error: specified envelope part 'From.*(user@domain1.tld|user2@domain2.tld|user3@domain3.tld...' is not supported by the envelope test.
Syntax problem.
So what is difference between envelope and header ?
"header" compares the values in the mail itself, e.g. "From", "To", but "Subject", "X-Scanned", too. "envelope" compares values of the SMTP-phase commands, "From" corresponds to the "MAIL FROM" SMTP command and "To" to the "Rcpt to" command. The availability of those envelope information differs among the MTAs, some do not provide "MAIL FROM" at all, some do provide all "RCPT TO"s, some only the "RCPT TO" of the particular recipient, some only if there is exactly one recipient.
Therefore the RFC states that implemenations SHOULD have "envelope". It is no requirement.
Thank you.
-- Lampa