mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-28 03:56:43 +02:00
Send a vacation response only until the end date, fixes #218
This commit is contained in:
parent
011e1fa52d
commit
28eff398d1
@ -34,3 +34,10 @@ map {
|
||||
username_field = email
|
||||
value_field = reply_body
|
||||
}
|
||||
|
||||
map {
|
||||
pattern = priv/reply_enddate
|
||||
table = user
|
||||
username_field = email
|
||||
value_field = reply_enddate
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ require "mailbox";
|
||||
require "imap4flags";
|
||||
require "regex";
|
||||
require "relational";
|
||||
require "date";
|
||||
require "comparator-i;ascii-numeric";
|
||||
require "vnd.dovecot.extdata";
|
||||
require "vnd.dovecot.execute";
|
||||
@ -24,6 +25,8 @@ if exists "X-Virus" {
|
||||
stop;
|
||||
}
|
||||
|
||||
if string :is "${extdata.reply_enabled}" "1" {
|
||||
if allof (string :is "${extdata.reply_enabled}" "1",
|
||||
currentdate :value "le" "date" "${extdata.reply_enddate}")
|
||||
{
|
||||
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user