11 Mar
2008
11 Mar
'08
6 p.m.
Hello Sven,
Monday, March 10, 2008, 5:17:58 PM, you wrote:
require "fileinto"; if address :domain :is "to" "domain.de" { if header :matches "X-Spam-Level" "\\*\\*\\*\\*\\*\\*\\*\\*" { #discard; fileinto "spamdir"; } }
I vaguely remembers having problems with using regular expressions; how about using ":contains" instead of ":matches"?
For the record, here's a .dovecot.sieve for one of my accounts:
require ["fileinto", "imapflags"]; if header :contains "X-Spam-Checked-By" "myhostid" { if header :contains "X-Spam-Level" "******" { if header :contains "X-Spam-Level" "********" { setflag "\\Seen"; } fileinto "Junk"; stop; } } elsif allof ( header :contains "Subject" "Undelivered Mail Returned To Sender", address :is "From" "MAILER-DAEMON@myhostname" ) { fileinto "INBOX.Undelivered"; } else { keep; }
-- Best regards, Robert Tomanek dovecot@mail.robert.tomanek.org