Commit 402bb36d authored by marknl's avatar marknl
Browse files

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

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