2016-08-18 20:17:04 +02:00
|
|
|
require "variables";
|
|
|
|
require "vacation";
|
|
|
|
require "fileinto";
|
|
|
|
require "envelope";
|
|
|
|
require "mailbox";
|
|
|
|
require "imap4flags";
|
|
|
|
require "regex";
|
|
|
|
require "relational";
|
|
|
|
require "comparator-i;ascii-numeric";
|
|
|
|
require "vnd.dovecot.extdata";
|
2016-12-11 20:40:42 +02:00
|
|
|
require "vnd.dovecot.execute";
|
2016-09-29 15:34:43 +02:00
|
|
|
require "spamtestplus";
|
2016-08-18 20:14:03 +02:00
|
|
|
|
2016-08-19 21:58:40 +02:00
|
|
|
if allof (string :is "${extdata.spam_enabled}" "1",
|
2016-09-29 15:34:43 +02:00
|
|
|
spamtest :percent :value "gt" :comparator "i;ascii-numeric" "${extdata.spam_threshold}")
|
2016-08-19 21:58:40 +02:00
|
|
|
{
|
2016-09-29 15:34:43 +02:00
|
|
|
setflag "\\seen";
|
|
|
|
fileinto :create "Junk";
|
|
|
|
stop;
|
2016-08-18 20:14:03 +02:00
|
|
|
}
|
2016-04-20 21:20:02 +02:00
|
|
|
|
2017-11-05 17:54:23 +02:00
|
|
|
if exists "X-Virus" {
|
|
|
|
discard;
|
|
|
|
stop;
|
|
|
|
}
|
|
|
|
|
2016-05-29 15:54:53 +02:00
|
|
|
if string :is "${extdata.reply_enabled}" "1" {
|
2016-04-20 21:20:02 +02:00
|
|
|
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
|
|
|
|
}
|