The vacation Program

The vacation program provides an easy means to let people know that you are not reading your mail, such as when you are on vacation. It is intended to be run from your ~/.forward file (The User’s ~/.forward File on page 500) with entries in that file that look something like this:

\you
|"/usr/ucb/vacation you"

Here, the first line ensures that you will receive a copy of any incoming message. The second line causes the vacation program to run, which sends a message back to the sender announcing that you are on vacation.

The first step in setting up the vacation program is to initialize its database, usually called ~/.vacation.db. You do this with the -i command-line switch (-I also works):

% /usr/ucb/vacation -i

The ~/.vacation.db database records each sender to whom a vacation reply has been sent, and ensures that no sender will receive more than one such message per week.

The second step in setting up the vacation program is to create a reply message file. That file should be called ~/.vacation.msg, and should minimally contain the following information:

From: Your Full Name <you@your.domain>
Subject: I am on vacation
Precedence: bulk

I am on vacation until July 5 and will reply to your email
when I return.

The first three lines show the minimum headers required. The From: shows to whom the recipient of a vacation message should reply. The Subject: header is a courtesy to the recipient and usually says you are on vacation or are away. The Precedence: header is set ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.