Files
rspamd-learn/dovecot/report-spam.sieve
2022-08-11 10:14:16 +02:00

13 lines
470 B
Sieve

require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "imap4flags"];
if environment :is "imap.cause" "COPY" {
pipe :copy "sa-learn-spam.sh";
}
# Catch replied or forwarded spam
elsif anyof (allof (hasflag "\\Answered",
environment :contains "imap.changedflags" "\\Answered"),
allof (hasflag "$Forwarded",
environment :contains "imap.changedflags" "$Forwarded")) {
pipe :copy "sa-learn-spam.sh";
}