[Dovecot] Sieve doesnt filter
Robert Tomanek
dovecot at mail.robert.tomanek.org
Tue Mar 11 19:00:18 EET 2008
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 at myhostname"
) {
fileinto "INBOX.Undelivered";
} else {
keep;
}
---------------------------------------------------------------------
--
Best regards,
Robert Tomanek dovecot at mail.robert.tomanek.org
More information about the dovecot
mailing list