Announcing an absence with vacation

Cal-i-forn-ya here you come! If you're planning a vacation and will be away from your e-mail for a while, let UNIX announce your absence for you (Figure 11.15). Using the vacation program, you can have UNIX send a reply saying that you're out of the office to everyone who sends you e-mail.

Figure 11.15. Using a template, you can customize the vacation message—even extensively, as we've done.


Keep in mind that vacation is quite variable among different UNIX systems and ISPs. What you have might be quite different from the "standard" form used here. Be sure to check with your system administrator for specific instructions if you have any problems.

To send "I'm on vacation" messages using vacation:

1.
vacation

At the shell prompt, type vacation. You'll see a short template for the response that people should receive when they e-mail you, as shown in Figure 11.15.

2.
Subject: Not here now, sorry!
Thanks for e-mailing me about
$SUBJECT. Fortunately for me,
I'm taking a fabulous vacation
mowing my lawn, doing laundry, and
catching up on other things I
can't do because I usually work
so much. If you would like me to
stay on vacation, please e-mail
my boss ([email protected])
and let her know. Thanks!

Edit the text to say what you want.

The $SUBJECT term in the text will be replaced with the actual subject of the e-mail sent to you.

3.
Save your text and exit the editor.

Chapter 4 has the gory details about saving and exiting in pico and vi.

Code Listing 11.6. Your .forward file should reference the vacation file.
[ejr@hobbes ejr]$ cat .forward
ejr, "|vacation ejr"
[ejr@hobbes ejr]$

4.
vacation -I

Type vacation -I at the shell prompt to start vacation and tell it to respond to all incoming messages. You'll still get the incoming messages in your inbox. In fact, they'll pile up in your mailbox and wait for you to return.

5.
cat ~/.forward

Look at the .forward file in your home directory to verify that it contains a reference to the vacation program. Your .forward file specifies what should happen to your mail upon receipt, and in this example, it should be processed by vacation. The reference to vacation is usually automatically inserted by the vacation program, but if it's not there, you'll need to edit the .forward file and add text like yourid, "|vacation -> yourid. Of course, substitute your real userid for the placeholder above, and possibly include the full path to vacation (/usr/bin/vacation on our system). (See Code Listing 11.6.)

Stopping vacation e-mails:

  • mv .forward vacation-forward

    At the shell prompt, move the .forward file that references the vacation program to a different name (in this case, vacation-forward). You could just delete it or remove the reference to vacation, but it's easier to save it so you can reuse it for your next vacation.

Tip

Remember to unsubscribe to all mailing lists before you start vacation. If you don't, you'll send a vacation announcement to a whole list of people who likely don't care (not to mention that you'll really irritate the list administrator!). Or, worse, you might cause a mail loop (in which your messages to the list are acknowledged by the server, and the acknowledgements are in turn sent vacation announcements), causing hundreds or thousands of messages to accumulate in your account.


Tip

Your EDITOR environment variable determines which editor will be used to edit the vacation message in step 1. If you'd rather manually choose the editor, just save and close the message, then specify the editor you want to use to edit the text in the .vacation.msg file, as in pico.vacation.msg. Learn more about environment variables in Chapter 8.


Tip

Start vacation with vacation -j to automatically respond to all messages. Without the -j flag, vacation responds only to one message each week from any specific sender.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.14.63