===== Setting up the vacation(1) email auto-responder on SDF: =====
==== What: ====
The vacation(1) tool allows users to schedule automated email replies, useful for letting people know when you're away for a while.
==== Prerequisites: ====
* SDF ARPA membership or higher
* public key authentication (only for Meta Array users)
==== How vacation(1) works: ====
The tool uses two files - "$HOME/.vacation.msg" and "$HOME/.vacation.db" by default - to a) issue an auto-reply message, and b) track who and when a sender was replied to. vacation(1) is usually called via a user's "$HOME/.forward" file, but as the tool can read from stdin(4) there are other possibilities, ie. in conjunction with procmail(1).
=== Basic setup procedure: ===
* initialize the DB file; initialization creates the DB file if it doesn't exist and sets/resets the vacation interval timer - the period it waits to resend an auto-reply. The default interval is one (1) week; to specify an different interval use "'-t nu'", where "n" is an integer and "u" is "s", "m", "h", "d", or "w" (seconds, minutes, hours, days, weeks; week is default). If "n" = 0 and "u" is omitted, a notice is sent for every message. If "n" is set to a very large number, say 9999, no sender will ever receive more than one notice.
* create the auto-reply message. The message needs to be a routable email file with a header and body section. A "$SUBJECT" variable is supported for a more customized response.
* edit the "$HOME/.forward" file to pipe mail through vacation(1); it's good idea to test the configuration beforehand using the vacation(1) "'-d'" debug option.
==== Some examples: ====
=== ex.1) minimal setup using defaults: ===
% vacation -I # initialize DB; defaults to 30 days
SDF users who have their mail sent to the Meta Array (host //ma.sdf.org//) will need to use ssh(1) with public key authentication to the SDF Cluster (host //tty//) as vacation(1) is not available natively on the Meta Array.
Basic setup:
- setup vacation(1) on the SDF cluster as previously shown
- setup ssh(1) [[http://sdf.org/?tutorials/SSH-SDF#public_key|public key authentication]] to host //tty//
- on //ma.sdf.org// create a test.msg and test things before committing:
Users of the procmail(1) program probably won't want to disable it just to make use of vacation(1). The following illustrates how to integrate vacation(1) into a typical user's "$HOME/.procmailrc" file; it should be inserted above any "delivery" recipes so all messages are passed through:
## uncomment next line to do selective notifications
#* ? egrep $VACATION_SENDER $VACATION_LIST
| /usr/bin/vacation -F R -f $VACATION_DB -m $VACATION_MSG sdf_user
The "$HOME/.vacation.list" is just a simple text file listing those email addresses you want to send notifications to, one per line. If you don't need the functionality just leave the "'egrep'" line commented out.
Note that "$HOME/.vacation.db" still needs to be initialized since this filter is just a pipe to vacation(1) which does the real processing.
==== Misc: ====
* There is a "pure procmail" filter option that implements much of the vacation(1) functionality; see the procmailex(5) manpage for code.
* Passing the "'-F R'" option to vacation(1) forces checking of the Return-Path: field which can help in some cases. See the vacation(1) manpage for details as well as other options.
* The "$HOME/.vacation.db" file is a hashed Burkeley DB binary file. It can be read somewhat using strings(1); useful for determining who has been auto-replied to: