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 probably be given as fully qualified addresses. This silly trick is necessary if you subscribe to any mailing lists handled by broken mailing list software (eg. Lsoft's LISTSERV as of the last inspection) that doesn't include a proper “Precedence:” header as described below.

-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 recipients database file instead of the default ~/.vacation.db.

-i  (Re-)Initialize the recent recipients 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 and perhaps set a new reply interval.

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

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

-r  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 recipients database. Mail coming from these excluded addresses will not ever get a reply. “@domain”.

  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” 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 prepended to the message.

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 replying to a message).

The addresses to which replies have been sent are recorded, along with the time a 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 recipient 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"

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 or filling text or headers in the outgoing message.

The entire recipient address of a sent reply, comments, multiple addresses, and all, is stored in the recent recipients database.