How to set up vacation messages
The
vacation command is used to set up an automated response to e-mail messages sent to you. Normally the command is used when you go away on vacation and can't check your mail. Unfortunately, the Unix man page on vacation is a little opaque, hence this step-by-step guide.
The simple way
This section is intended for Nevis users who have mail accounts, but don't login to the UNIX systems here.
You can set your vacation message using
Nevis webmail:
- Enter the same user name and password that you use to read your mail.
- Click on
Options (near the top of the page).
- Click on the link labeled
Autoresponder / Mail Forwarding. It's usually near the bottom right-hand side of the options page.
- Follow the directions on that page.
If you need more help:
- The checkbox at the top,
Send auto-reply to sender, is what turns on the vacation message.
- A typical mail subject would be "I am on vacation" or something similar. If you've never used this page before, it will offer an example subject.
- The message can be equally simple: "I am on vacation until 02-Feb-2006. If you need something in the meantime, please contact John Smith." If you've never used this page before, it will display some example text that you'll want to edit.
- If you want someone else to receive your e-mail while you are away, click on the checkbox next to "Forward incoming messages...", and fill in their e-mail address in the text area beneath the checkbox.
- The checkbox labeled "Keep copies of incoming messages" means that you will receive a copy of the messages sent to you; it's probably not a good idea to un-check that box unless you have a good reason.
- Don't forget to hit the "Submit" button at the bottom of the page, or your changes will not be saved.
- You may see an error message. Don't panic! Test out the vacation setup by sending an e-mail to yourself. The web page sometimes reports an error even though it has set up everything properly.
- Most important of all: Don't forget to turn this off when you get back from vacation! Just uncheck the "Send auto-reply..." button at the top of the page, and hit "Submit" at the bottom.
The login method
If you can login to the Nevis
Linux cluster, this method offers finer control over the process.
Overview
Before the instructions, here's just a quick reminder of how
vacation works.
When
vacation has been set up, then when your mail account receives a message, an automated response is sent back to the sender. The contents of the automated response are normally contained in the file
~/.vacation.msg in your home directory.
If the sender is sending you e-mail on a regular basis (e.g., a mailing list), there's no point in flooding them with copies your automated message. Therefore,
vacation maintains a list of everyone who's sent you e-mail in a database, normally the file
~/.vacation.db in your home directory. The
vacation program will only send another automated response to the same sender after a certain number of days have passed, normally 7.
When you've set up everything properly,
vacation works
in addition to (not instead of) delivering your e-mail to you.
Step-by-step directions
Login
You can use any machine in the
Linux cluster to which you can login.
Database
Initialize your
vacation database with the command:
vacation -I
Note that if you are testing
vacation and you want to send multiple e-mail messages to yourself to see the automated reponse, you'll have to type in this command before each test.
Vacation message
Edit the file
~/.vacation.msg and include the automated response. If you need a starting point, you can take a look at
~seligman/.vacation.msg. Note that you will almost certainly want a "From:" and "Subject:" line in your response, even if you include no other headers.
Tip:
Don't use "your e-mail" or similiar lines for "Subject:". Such message titles are often used in
spam, and may cause your reply to trigger a spam
filter. I use "Subject: Out until DD-MMM-YYY" which won't trigger most spam filters.
Forward file
Edit your
forwarding file,
/a/mail/forward/$user (where
$user is the name of your login account). If your account name is
jsmith, then the following line is almost certainly what you want:
\jsmith, "| /usr/bin/vacation jsmith"
If you forget the blackslash (\) or mis-type the first occurrence of your account name, then you won't receive any mail (though
vacation may appear to work perfectly). If you forget the login name at the end, then
vacation won't send any automated responses.
Note that
vacation has to see the login name in the "To:" field of a message in order to send back an automated response. If the message just has something like "To: physics-mailing-list" in its header, then an automated reply will
not be sent.
Procmail file (optional)
If you have a
procmailrc file, then you probably don't want to edit your forwarding file. Instead, you can add the following lines at the end of your
procmailrc file:
:0 c
| /usr/bin/vacation $LOGNAME
Return
When you get back from your trip, remember to remove your forwarding file (or
procmailrc file); e.g.,
mv /a/mail/forward/$user ~/forward-save
Otherwise you'll continue to send out automated responses.