Skip to content
Snippets Groups Projects
Commit 402bb36d authored by marknl's avatar marknl
Browse files

FS#1681 - Out-of-Office too early - UNTESTED!

http://bugtracker.ispconfig.org/index.php?do=details&task_id=1681

I've NOT tested this fix, but i think it should be fine.
Someone with Dovecot, please test.
parent cf03c664
No related branches found
No related tags found
2 merge requests!46Master,!21Master
require ["fileinto", "regex", "vacation"];
require ["fileinto", "regex", "date", "relational", "vacation"];
<tmpl_if name="cc">
# Send a copy of email to
......@@ -29,8 +29,11 @@ if header :contains "X-Spam-Flag" "YES" {
# Stop here so that we do not reply on spams
stop;
}
if allof(currentdate :value "ge" "date" "<tmpl_var name='start_date'>", currentdate :value "le" "date" "<tmpl_var name='end_date'>") {
vacation :days 1
:subject "Out of office reply"
<tmpl_var name='addresses'>
"<tmpl_var name='autoresponder_text'>";
}
</tmpl_if>
......@@ -112,7 +112,13 @@ class maildeliver_plugin {
// Move junk
$tpl->setVar('move_junk',$data["new"]["move_junk"]);
// Set autoresponder start date
$tpl->setVar('start_date',$data["new"]["autoresponder_start_date"]);
// Set autoresponder end date
$tpl->setVar('end_date',$data["new"]["autoresponder_end_date"]);
// Autoresponder
$tpl->setVar('autoresponder',$data["new"]["autoresponder"]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment