Implement auto-forward and auto-reply
parent
d2e6bf01e2
commit
3a4703b764
@ -0,0 +1,22 @@
|
||||
connect = /data/freeposte.db
|
||||
|
||||
map {
|
||||
pattern = priv/reply_subject
|
||||
table = user
|
||||
username_field = address
|
||||
value_field = reply_subject
|
||||
}
|
||||
|
||||
map {
|
||||
pattern = priv/reply_body
|
||||
table = user
|
||||
username_field = address
|
||||
value_field = reply_body
|
||||
}
|
||||
|
||||
map {
|
||||
pattern = priv/forward
|
||||
table = user
|
||||
username_field = address
|
||||
value_field = forward
|
||||
}
|
Binary file not shown.
@ -0,0 +1,14 @@
|
||||
require ["variables", "vacation", "vnd.dovecot.extdata"];
|
||||
|
||||
if string :is "${extdata.reply_subject}" "" {
|
||||
|
||||
} else {
|
||||
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
|
||||
}
|
||||
|
||||
if string :is "${extdata.forward}" "" {
|
||||
|
||||
} else {
|
||||
redirect "${extdata.forward}";
|
||||
keep;
|
||||
}
|
Loading…
Reference in New Issue