[Dovecot] Sieve: Vacation, handle and variable
René Neumann
lists at necoro.eu
Tue Sep 20 23:38:21 EEST 2011
Hi *,
I am adding a generic way for vacation-replies in my sieve setup. There
I set the handle and the reason using variables (see end of mail). My
simple question now is: Though variable expansion is not done for
subject and reason, is it done for the handle? Because else there seems
no way in configuring the vacation action via variables.
I tried to read the code for this extension, but ... well ... the whole
sieve implementation is way more complicated then I figured ^^. Thus I
take the question to the list.
Thanks,
René
----- default.sieve -----
require [..., "include", "variables"];
# set this to the text you want to get included in the vacation-mail
global ["vacation", "vhandle"];
set "vhandle" "";
set "vacation" "";
[...]
include :personal "vacation";
----- vacation.sieve -----
require ["variables", "include", "vacation"];
# this is set in the including script
global ["vacation", "vhandle"];
if string :is "${vacation}" "" {
return;
}
# ensure we have a handle
if string :is "${vhandle}" "" {
set "vhandle" "${vacation}";
}
if header :matches "subject" "*" {
set "sbj" "Out of office [was: ${1}]";
vacation :addresses [...]
:from "..." :days 7 :handle "${vhandle}"
:subject "${sbj}" "${vacation}";
}
-------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20110920/3f4d9e03/attachment.bin>
More information about the dovecot
mailing list