|
|
@ -8,8 +8,6 @@ require "regex";
|
|
|
|
require "relational";
|
|
|
|
require "relational";
|
|
|
|
require "date";
|
|
|
|
require "date";
|
|
|
|
require "comparator-i;ascii-numeric";
|
|
|
|
require "comparator-i;ascii-numeric";
|
|
|
|
require "vnd.dovecot.extdata";
|
|
|
|
|
|
|
|
require "vnd.dovecot.execute";
|
|
|
|
|
|
|
|
require "spamtestplus";
|
|
|
|
require "spamtestplus";
|
|
|
|
require "editheader";
|
|
|
|
require "editheader";
|
|
|
|
require "index";
|
|
|
|
require "index";
|
|
|
@ -20,21 +18,23 @@ if header :index 2 :matches "Received" "from * by * for <*>; *"
|
|
|
|
addheader "Delivered-To" "<${3}>";
|
|
|
|
addheader "Delivered-To" "<${3}>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if allof (string :is "${extdata.spam_enabled}" "1",
|
|
|
|
{% if user.spam_enabled %}
|
|
|
|
spamtest :percent :value "gt" :comparator "i;ascii-numeric" "${extdata.spam_threshold}")
|
|
|
|
if spamtest :percent :value "gt" :comparator "i;ascii-numeric" "{{ user.spam_threshold }}"
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setflag "\\seen";
|
|
|
|
setflag "\\seen";
|
|
|
|
fileinto :create "Junk";
|
|
|
|
fileinto :create "Junk";
|
|
|
|
stop;
|
|
|
|
stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
if exists "X-Virus" {
|
|
|
|
if exists "X-Virus" {
|
|
|
|
discard;
|
|
|
|
discard;
|
|
|
|
stop;
|
|
|
|
stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if allof (string :is "${extdata.reply_enabled}" "1",
|
|
|
|
{% if user.reply_enabled %}
|
|
|
|
currentdate :value "le" "date" "${extdata.reply_enddate}")
|
|
|
|
if currentdate :value "le" "date" "{{ user.reply_enddate }}"
|
|
|
|
{
|
|
|
|
{
|
|
|
|
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
|
|
|
|
vacation :days 1 :subject "{{ user.reply_subject }}" "{{ user.reply_body }}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{% endif %}
|