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.
| | |
| | | |
| | | require ["fileinto", "regex", "vacation"]; |
| | | require ["fileinto", "regex", "date", "relational", "vacation"]; |
| | | |
| | | <tmpl_if name="cc"> |
| | | # Send a copy of email to |
| | |
| | | # 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> |
| | |
| | | |
| | | // 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"]); |
| | | |