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.

Using webmail

Even if you know how to login to the to the Nevis Linux cluster and edit files, I recommend you use the following procedure.

Login to Nevis webmail:

  • Enter the same user name and password that you use to read your mail.
  • Click on Settings (top right of the page).
  • Click on Vacation (left panel, bottom line).
  • Enter the subject and body of the message you want sent.
  • Set the time you want the vacation messages to start and stop. You can even set the time of day by clicking in the boxes to the right of the date.
  • Make sure the Status pop-up menu is set to "On".
  • Click on the Save button.

The login method

If you can login to the Nevis Linux cluster, this method might offer more control over the process, though I still recommend using the Filters section within Roundcube.

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:
rm -f ~/.vacation.db
Note that if you are testing vacation and you want to send multiple e-mail messages to yourself to see the automated response, you'll have to type in this command before each test.

It used to be that that command vacation -I would be used to initialize the vacation database. Due to problems with different versions of the the vacation program on different computer systems, this method is no longer reliable.

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.
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2019-09-25 - WilliamSeligman
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback