Uberspace / manual

This manual documents how to use the basic features of Uberspace 7.
https://manual.uberspace.de/
Other
51 stars 108 forks source link

Sieve script: vacation auto reply is incomplete #560

Closed ybc37 closed 2 months ago

ybc37 commented 2 months ago

The vacation sieve script documented here (https://github.com/Uberspace/manual/blob/main/source/mail-filters.rst) is missing the definition of the variable subjwas. Should be something like this:

require ["variables", "vacation"];

if header :matches "Subject" "*" {
  set "subjwas" "${1}";
}

vacation
  # Reply at most once a week to a same sender
  :days 7
  :subject "Out of office: ${subjwas}"
"I'm not in the office from 20 May until 31 May.

Best regards
Jane Doe";
# The command "keep" is executed automatically, if no other action is taken.

Diff:

-require ["vacation"];
+require ["variables", "vacation"];
+
+if header :matches "Subject" "*" {
+  set "subjwas" "${1}";
+}

 vacation
   # Reply at most once a week to a same sender

(See also https://doc.dovecot.org/configuration_manual/sieve/examples/#vacation-auto-reply)