Sieve Vacation support in Archiveopteryx

The Vacation extension provides the ability to send an automatic response to (some) incoming mail, and avoid unnecessarily repeating the response. Archiveopteryx supports it fully.

In its simplest form, the vacation command checks that an inbound message is addressed to the vacation user (to exclude mailing list mail and similar), that it's safe and sensible to respond automatically to it, and that the same vacation message hasn't been sent to that address recently. If all those checks pass, then a message is sent.

require "vacation"; vacation "This is an automatic reply. I am away on vacation and will read your message (and respond if necessary) when I return.";

This isn't the best possible response. The next example uses a helpful subject field on the reply, and stops sending the response when vacation is over:

require ["date", "relational", "vacation"]; if currentdate :value "lt" "date" "2008-08-15" { vacation :subject "Away until August 15" "This is an automatic reply. I am away on vacation and will read your message (and respond if necessary) after I return."; }

More complex invocations are possible. In the following example, Alice sends one vacation response to directly addressed mail and another for mail addressed to sales@example.com. The latter response is sent with a special From address, and there will be at most one response per address per three days.

require ["date", "relational", "vacation"]; if allof( address :is :all "To" "alice@example.com", currentdate :value "lt" "date" "2008-08-15" ) { vacation "I'm away with my colleagues at some boring meeting."; } elsif allof( address :is :all [ "To", "Cc" ] "sales@example.com", currentdate :value "le" "date" "2008-08-15" ) { vacation :days 3 :addresses "sales@example.com" :from "Exemplaric Gadgets Pvt Ltd <sales@example.com>" "The sales team is currently having a kickoff motivational meeting at the Ananda Spa. When we return we will respond to your message with such motivation that we will surely sell you the entire Taj Mahal. We're looking forward to serving you!"; }

In case of questions, please write to info@aox.org.

Relevant links

About this page

Last modified: 2010-11-19
Location: aox.org/sieve/vacation