vacation Command
Purpose
Returns a message to the sender that the mail recipient is on vacation.
Syntax
vacation [ { -I | User } ] | [ { -f Number [ Unit ] | User } ]
Description
- The .forward file has group or world writeable permissions
- Any of .forward file's parent directories have group or world writable permissions
The vacation command expects a $HOME/.vacation.msg file containing a message to be sent back to each sender. If this file does not exist, the vacation command looks for /usr/share/lib/vacation.def, a systemwide default vacation message file. It should be an entire message, including any desired headers, such as From or Subject. By default, this message is sent only once a week to each person who sends mail to you. Use the -f flag to change the frequency intervals at which the message is sent. The names of the people who send messages are kept in the files $HOME/.vacation.pag and $HOME/.vacation.dir. These files are created when the vacation command is initialized for your user ID using the -I (uppercase i) flag.
If the -I flag is not specified, the vacation command reads the first line from the standard input for a From line to determine the sender. If no text is available from standard input, the command returns an error message. All properly formatted incoming mail should have a From line. No message is sent if the From header line indicates that the message is from Postmaster, MAILER-DAEMON, or if the initial From line includes the string-REQUEST@ or if a Precedence: bulk or Precedence: junk line is included in the header.
Flags
Item | Description |
---|---|
-I | Initializes the $HOME/.vacation.pag and $HOME/.vacation.dir files. Execute the vacation command using this flag before you modify your $HOME/.forward file. |
-fNumber [Unit ] | Specifies the frequency interval at which the vacation message
is sent. The Number parameter is an integer value and the Unit parameter
specifies a time unit. The Unit parameter can be one of the
following:
|
Examples
- Before you use the vacation command to return a message
to the sender saying that you are on vacation, you must initialize
the $HOME/.vacation.pag and $HOME/.vacation.dir files.
To initialize these files, type: vacation -I
- Modify the .forward file. For example, Mark types the following
statement in the .forward file:
The sender receives the message that is in the $HOME/.vacation.msg file, or if the file does not exist, the default message found in the /usr/share/lib/vacation.def file. If neither of these files exist, no automatic replies are sent to the sender of the mail message and no error message is generated. If either of these files exist, the sender receives one vacation message from mark per week, regardless of how many messages are sent to mark from the sender.mark,|"/usr/bin/vacation mark"
- If the following entry is
contained in your .forward file,
The sender receives one vacation message from mark every ten days, regardless of how many messages are sent to mark from the sender.mark, |"/usr/bin/vacation -f10d mark"
- To create a vacation message that is different
from the default
vacation message, create the file $HOME/.vacation.msg and add
your message to this file. The following is an example of a vacation
message:
From: mark@odin.valhalla (Mark Smith) Subject: I am on vacation. Delivered-By-The-Graces-Of: the Vacation program I am on vacation until October 1. If you have something urgent, please contact Jim Terry <terry@zeus.valhalla>. --mark
- To cancel the vacation message, remove
the .forward file, .vacation.dir file, .vacation.pag file,
and .vacation.msg file from your $HOME (login) directory:
rm .forward .vacation.dir .vacation.pag .vacation.msg
Files
Item | Description |
---|---|
$HOME/.forward | Contains the names of people who you want your mail to be forwarded to. |
/usr/share/lib/vacation.def | Contains the systemwide default vacation message. |
$HOME/.vacation.dir | Contains the names of people who have sent mail to you while the vacation command was being used. |
$HOME/.vacation.msg | Contains your personalized vacation message. |
$HOME/.vacation.pag | Contains the names of people who have sent mail to you while the vacation command was being used. |
/usr/bin/vacation | Contains the vacation command. |