VACATION(1)

NAME
vacation - reply to incoming e-mail with an “I am not here” message

SYNOPSIS
vacation -i [-d] [-f db] [-r interval] [-x]
vacation -x [-d] [-f db] [-r interval]
vacation -l [-d] [-f db]
vacation [ [-a alias] ...] [-d] [-f db] [-m msg] [-r interval] [login]

DESCRIPTION
vacation processes RFC-2822 compliant messages fed to its standard input and may reply with a message telling the originator of the incoming message that you are currently not reading your mail. The intended use is as a pipe command in a ~/.forward file.

  Options
Available options:

-a  Treat alias as an alias for the user running vacation. There can be multiple instances of “-a alias” given on the command line and each alias will be added to an internal list of names. These should only be given as mailboxes as they are only compared with the mailbox portion of any recipient addresses.

-d  Turn on debugging. This flag causes informtaional and error messages to be printed to stderr as well as logged. Never use this option on the invocation in your ~/.forward file!

-f db
    Use db as the recent correspondents database file instead of the default ~/.vacation.db.

-i  (Re-)Initialize the recent correspondents database file. It should be used before you modify your ~/.forward file, and it must never be used on the invocation in your ~/.forward file. Except when listing the contents the database will always be created if it does not exist so this option is only necessary if you want to clear an existing database.

-l  List the current contents of recent correspondents database file.

-m msg
    Use msg as the reply message contents file instead of the default ~/.vacation.msg.

-r interval
    Set the reply interval to interval days. This value is stored in the ~/.vacation.db file and is usually used with the -i option. The default reply interval is one week. An interval of zero (“0”) is not allowed as that would mean a reply would be sent to each message, which could accidentally cause a mail loop between another less carefully programmed autoresponder. An interval of “infinite” will never send more than one reply.

-x  Reads a list of addresses from standard input, one per line (ignoring blank lines and lines that begin with a “#” character), and adds them to the recent correspondents database. Mail coming from these excluded addresses will not ever get a reply. Whole domains can be excluded using the syntax “@domain”.

    Note it is critical to pre-load the injection addresses of any mailing lists you subscribe to which are handled by broken mailing list software (e.g. Lsoft's LISTSERV as of the last inspection) which doesn't include a proper “precedence:” header as described below. This is necessary prevent replies from being sent to mailing lists when the “reply-to:” header points to that injection address and the recipient is (also) in either the “to:” or “cc:” header.

  Theory of Operation
No message will be sent unless login (or the invoking user's name), or an alias supplied using the -a option, is part of either the “to:” or “cc:” headers of the mail.

No messages from “-OUTGOING”, “-RELAY”, “LISTSERV”, “-REQUEST”, “MAILER”, or “MAILER-DAEMON” will be replied to (where these strings are case insensitive suffixes of the base mailbox name for the sender or originator address).

Finally, and most importantly, no notification is sent if a “precedence:” header is found that contains the value “bulk”, “list”, or “junk”.

vacation expects to find a file called .vacation.msg, in your home directory (or whatever file was specified with -m), containing an RFC-2822 compliant message to be sent back in response to an incoming message. It must be an entire message, including headers, but without recipient headers, and especially without the UNIX mailbox “From_” header). The recipient address(es) will be supplied in a “to:” header that will be automatically prepended to the message. Any occurrence of the string “$SUBJECT” in the template message's headers will be replaced by the content of the “subject:” header from the message being read on the standard input. A “precedence: bulk” header is also automatically inserted in the outgoing message headers.

The reply is sent to the address(es) given in the “reply-to:” header if one is found, and if not then to the address(es) given in the “from:” header (as per the RFC-2822 rules for any agent replying to a message).

The addresses to which replies have been sent are recorded, along with the time the latest reply was sent to them, in a db(3) database in the file .vacation.db in your home directory. No reply will be sent to any address which has been logged in this file unless the last reply was sent more than interval (see -r above) days ago.

Fatal errors, such as calling vacation with incorrect arguments, or with a non-existent logins, and any errors accessing files or errors sending messages are logged in the system log file, using syslog(3), and if -d is given they are also printed to the standard error descriptor.

EXIT STATUS
The vacation utility exits with a value of zero (0) on success, and greater than zero (>0) if an error occurs. The non-zero exit values are defined in <sysexits.h>.

FILES
~/.vacation.db
    default correspondents database file name in the user's home directory
~/.vacation.msg
    default name of the file containing the message to send

EXAMPLES
An example ~/.forward file might contain:

    \eric, "|/usr/bin/vacation -a postmaster eric"

which would save messages sent to you in your system mailbox (assuming your login name was eric) and would also reply with copies of your ~/.vacation.msg message (modulo the constraints outlined above).

An example ~/.vacation.msg file might contain a message similar to the following:

    From: eric@CS.Berkeley.EDU (Eric Allman)
    Subject: I am on vacation
    Summary: Re: $SUBJECT
    Delivered-By-The-Graces-Of: The Vacation program
    I am on vacation until July 22.  If you have something urgent,
    please contact Keith Bostic <bostic@CS.Berkeley.EDU>.
    --
    eric

SEE ALSO
syslog(3), sendmail(8)

HISTORY
The vacation command first appeared in 4.3BSD.

vacation was rewritten by Greg A. Woods <woods@planix.com> to obey RFC-2822.

BUGS
The value of “infinity” for the reply interval is actually stored as LONG_MAX.

There's no facility for folding and/or filling text or headers in the outgoing message.

Multiple login parameters should be treated as if they were given as -a options.

Failure to create the ~/.vacation.msg file causes a runtime error.