You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-08-10 22:31:47 +02:00
Filter spam before forward and auto-reply
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
require ["variables", "fileinto", "envelope", "mailbox", "imap4flags", "regex", "relational", "comparator-i;ascii-numeric", "vnd.dovecot.extdata"];
|
||||
|
||||
|
||||
if string :is "${extdata.spam_enabled}" "1" {
|
||||
if header :matches "X-Spam-Status" "* score=*" {
|
||||
if string :value "ge" :comparator "i;ascii-numeric" "${2}" "${extdata.spam_threshold}" {
|
||||
setflag "\\seen";
|
||||
fileinto :create "Junk";
|
||||
stop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,14 @@
|
||||
require ["variables", "vacation", "vnd.dovecot.extdata"];
|
||||
require ["variables", "vacation", "fileinto", "envelope", "mailbox", "imap4flags", "regex", "relational", "comparator-i;ascii-numeric", "vnd.dovecot.extdata"];
|
||||
|
||||
if string :is "${extdata.spam_enabled}" "1" {
|
||||
if header :matches "X-Spam-Status" "* score=*" {
|
||||
if string :value "ge" :comparator "i;ascii-numeric" "${2}" "${extdata.spam_threshold}" {
|
||||
setflag "\\seen";
|
||||
fileinto :create "Junk";
|
||||
stop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if string :is "${extdata.reply_enabled}" "1" {
|
||||
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
|
||||
|
Reference in New Issue
Block a user