
require ["fileinto", "regex", "vacation"];

<tmpl_if name="move_junk" op="==" value="y">
# Move spam to spam folder
if header :contains "X-Spam-Flag" "YES" {
  fileinto "Junk";
  # Stop here so that we do not reply on spams
  stop;
}
</tmpl_if>

<tmpl_var name='custom_mailfilter'>

<tmpl_if name="autoresponder" op="==" value="y">
#################################################################
# Autoreply
#################################################################

# Move spam to spam folder
if header :contains "X-Spam-Flag" "YES" {
  fileinto "Junk";
  # Stop here so that we do not reply on spams
  stop;
}
vacation  :days 1
  :subject "Out of office reply"
  # :addresses ["test@test.int", "till@test.int"]
  "<tmpl_var name='autoresponder_text'>";
</tmpl_if>
