vacation -- automatically respond to e-mail messages
vacation
vacation -q
vacation -i [-j] [-f file] [-a alias]... [-t time] [-s address] [-m host] [-u] [-l] [-d] [-n string] [--spam pattern]
vacation [-j] [-f file] [-a alias]... [-t time] [-s address] [-m host] [-u] [-l] [-d] [-n string] [--spam pattern] user
vacation -h
vacation -v
(See the OPTIONS section for alternate option syntax with long option names.)
vacation provides two major modes of operation: an interactive mode for set up and reporting and an automatic mode for unattended processing of incoming e-mail messages.
In its interactive mode, vacation will set up appropriate files to enable automatic respones to e-mail messages. To accomplish this task, vacation will interview the user and provide an opportunity to customize the automatic response message along with a few other options.
The automatic response message is a template which may contain tokens.
vacation will replace these tokens with apporpriate values as it
composes and sends the automatic reply. Currently, vacation checks
for the $SUBJECT token which it will replace with the Subject:
line of the original message. In addition, you may use $SENDER
as a token for the original sender of the incoming message (To:
line of the response) and $RECIPIENT for your own From: address.
vacation will not prompt for all the esoteric options it supports during the interview. Instead, it will expect those as command-line arguments. It will learn and set automatic-mode options passed to it on the command line while invoked in its interactive mode.
A subsequent interactive invocation of vacation will prompt to turn off automatic responses and provide a report of autmatic reponses it sent since being activated.
Quiet mode is a variation of the interactive mode designed to emulate
a few bare-bones versions of vacation. In its quiet mode, vacation
will bypass all questions and safeguards of the interactive mode.
It will invoke an external editor to compose the response and will
then configure the .forward file. vacation attempts to learn
the editor from the environment variables VISUAL and EDITOR;
it will default to vi if the environment variables are not set.
In its automatic mode, vacation will respond to incoming e-mail
messages with a response either configured manually or through
the interactive mode. The preferred way to invoke vacation in
its automatic mode is via the .forward file with a line such as:
\user, "| /usr/local/bin/vacation user"
The initial interactive mode interview will set up such a .forward file.
This version of vacation is loosely based on the original by Larry Wall and Tom Christiansen. It is designed to emulate most vacation clones, and specifically, the Sun version from the early Solaris days.
Options
Respond to all incoming messages regardless of whether user is a listed recipient or not.
A file contaning a list of senders to ignore. vacation
will ignore senders listed in the specified file in addition
to the default list consiting of root, daemon,
mailer, postmaster, and mailer-daemon.
Treat the list of senders to ignore as the opposite. That is, only respond to listed senders.
Other names (aliases) to be treated as the recipient (user). This option may be repeated once for each alias.
A custom string to use as the name in the From: line.
The minimum time interval between automatic responses to the
same sender. The time interval may be a string consisting of numbers
and the letters s, m, h, d, and w to designate seconds,
minutes, hours, days, and weeks, respectively. This string may not
contain spaces or any other characters. The default interval is one
week.
An alternate sender e-mail address for automatic replies.
An alternate mail host for automatic replies. If not supplied, vacation will inherit the mailer pre-configured for libnet or will attempt to use the local host.
Support for ignoring messages with matched strings in the subject line. The string may be a regular expression, properly quoted and escaped.
Force the UNIX SYSLOG socket type. Otherwise, vacation
uses the system default which is usually INET.
Keep a journal of all processed messages and decisions in a log.
By default, the log gets written to ~user/.vacation.log.
Provide diagnostic messages during execution. During interactive
mode, vacation writes to STDERR; during automatic mode, vacation
writes to the SYSLOG MAIL facility.
Do everything but send the reply while in automatic mode. Only applies to automatic mode.
Print version information and exit.
Print this terse manual and exit.
To simply get started, invoke vacation as
vacation
without any arguments. This will start the interactive interview.
To enable logging and debugging during automatic execution, invoke vacation interactively as:
vacation -i -d -l
Please note that vacation will also provide debugging information
to STDERR during the interview. To only allow debugging during
automatic execution, modify the .forward file manually after vacation
sets it up:
\user, "/usr/local/bin/vacation --debug --log user"
To specify a custom time interval either add the --time option when invoking vacation interactively:
vacation -i --time 1w2h
or modify the .forward file to include the --time option:
\user, "/usr/local/bin/vacation --time 5d7h user"
For aliases, again either list them during interactive invocation:
vacation -i --alias first_alias --alias another_alias
or subsequently modify the .forward file to include them:
\user, "/usr/local/bin/vacation -a first_alias -a another_alias user"
To ignore messages with certain patters in the subject line:
vacation -i --spam pattern
vacation -i --spam "^\[Spam\]"
or subsequently modify the .forward file to include them:
\user, "/usr/local/bin/vacation --spam pattern"
\user, "/usr/local/bin/vacation --spam \"^\\[Spam\\]\""
To specify a custom name string for the From: line of the automatic reply either add the --name option when invoking vacation interactively:
vacation -i --name 'Richard Mayhew via an auto-responder'
or modify the .forward file to include the --name option:
\user, "/usr/local/bin/vacation --name 'Richard Mayhew via an auto-responder' user"
A text file read by the MTA which contains delivery destinations for a given user.
A backup of the previous .forward file.
A text file containing the auto-reply message template.
A text file where vacation logs its activities.
A database file where vacation tracks previous senders.
Perl 5.6, Getopt::Long, Net::SMTP, Sys::Syslog, Time::Local, DB_File, Fcntl
perl(1), vi(1), sendmail(1)
Send bug reports, questions, and requests to vacation@ayradyss.org.
Igor S. Livshits <mailto:vacation@ayradyss.org>
Copyright (C) 2006 Igor S. Livshits
Use and distribute this tool as per the Artistic License