Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:nomagic:client_software:thunderbird:sieve [2021/11/10 18:08] – [Sieve management in Thunderbird] hostmasteren:nomagic:client_software:thunderbird:sieve [2021/11/12 23:35] (current) – [Configuration] hostmaster
Line 33: Line 33:
  
 <WRAP center round info 95%> <WRAP center round info 95%>
-If it's your first script, you <del>must fight</del> should follow the guides which will as you to name your new script. +If it's your first script, you <del>must fight</del> should follow the guides which will ask you to name your new script. 
 </WRAP> </WRAP>
  
Line 118: Line 118:
 </WRAP> </WRAP>
  
 +==== Vacation management ====
 +Vacation is plain Sieve syntax, using the right requirements you can set up vacation via your Sieve script.
  
 +I would suggest several ways to do that though. 
 +
 +  * Manual activation / deactivation 
 +<code>
 +require ["fileinto","envelope","subaddress","vacation", "reject"];
 +
 +# rule:[vacation]
 +if false # change to true and Save to activate the auto-reply.
 +{
 + vacation :days 1 :addresses "tux@nomagic.uk" :subject "out of office: auto reply" text:
 +I am currently away from keyboard for some days.
 +I will reply when I get back.
 +
 +  Cheers,
 +
 +Tux
 +.
 +;
 +}
 +</code>
 +
 +  * Automatic activation / deactivation of the auto-reply
 +
 +<code>
 +require ["fileinto", "imap4flags", "mailbox", "copy", "body", "date", "vacation", "relational"];
 +
 +# Vacation, update the date whenever needed
 +if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*", currentdate :value "ge" "date" "2021-11-10", currentdate :value "le" "date" "2021-11-17" ) {
 +  vacation :days 2 :addresses ["testing@nomagic.uk", "tux@nomagic.uk"] text:
 +Hello,
 +I am currently away from keyboard for some days.
 +I will reply when I get back.
 +
 +  Cheers,
 +
 +Tux
 +.
 +;
 +}
 +</code>
 +→ ''days 2'' here means that, for a single email address sending us several emails over the days, an auto-reply email should be sent only every 2 days.
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
 The Sieve Thunderbird extension comes with automatic syntax check, and will prevent you from saving until your file is 'clean'. Thus, troubleshooting is made fairly easy. The Sieve Thunderbird extension comes with automatic syntax check, and will prevent you from saving until your file is 'clean'. Thus, troubleshooting is made fairly easy.
 +
 +===== Additional resources =====
 +
 +  * http://sieve.info/
 +