ARCHIVED: On Unix systems, how do I use the email vacation program?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

The vacation program is installed on almost all Unix computers. You can use this utility to automatically answer your incoming mail with a message that you are away. If you have several computing accounts, you need to use vacation only on the Unix system(s) where you actually read your mail.

Note: Be sure to unsubscribe from any mailing lists, or inform the list owner(s) that you are away. If you do not do this, your vacation program will send its message to all list subscribers, including many who do not care that you are away. Also, the auto-reply function can have the unintended effect of notifying spammers that your email address is a live address.

To use the vacation utility, from the Unix shell prompt, follow the steps below:

  1. Using a text editor (e.g., Pico, Emacs, or vi), create a text file called .vacation.msg.
  2. For the first line of the file, enter:

    Then enter the subject for your automatic response.

  3. Leave one blank line, and then enter the body of your message. Here is an example of a .vacation.msg file:
      Subject: Sorry. I'm on vacation.
      I cannot respond to your message right away because I am on vacation.
      If this cannot wait until January 4, when I return, please contact
      Darth Vader ( ) for assistance.
      Otherwise, I will respond to your message upon my return.  I
      apologize for any inconvenience caused by my absence.
  4. You will need to create a .forward file to direct your mail to the vacation program. To do so, you need to know where .vacation.msg is installed on your mail system. At the command prompt, enter:
      which vacation

    The system should respond with the path to the vacation file. It will look something like this:

  5. Now you are ready to create the .forward file. At the command prompt, enter:
      echo '\username, "|/usr/bin/vacation username"' > ~/.forward

    Replace both instances of username with your user ID, and replace /usr/bin/vacation with the path the system gave you in response to the which vacation command.

    If you already have set a forward for the account on which you are using the vacation message, edit the .forward file in a text editor (e.g., Pico, Emacs, or vi), and make it look like the following:

      \username, forwarded@address, "|/usr/bin/vacation username"

    Replace username with your user ID, forwarded@address with the email address to which you wish to forward your mail, and /usr/bin/vacation with the path the system gave you in response to the which vacation command.

  6. The system will now send your vacation message to anyone sending you mail, while also keeping a copy of the incoming message in your Inbox.
  7. To stop the vacation program from processing your mail, remove the .forward file. To do so, at the command prompt, enter:
      rm /~.forward

For more information on using this program, at the Unix prompt, enter:

  man vacation

This is document abbr in the Knowledge Base.
Last modified on 2018-01-18 08:57:01.

Contact us

For help or to comment, email the UITS Support Center.