Is there a program that I can use to tell others that I am away from e-mail, but still save the e-mail received during my time away? Of course! vacation is a program which can automatically respond to e-mail while you're away for an extended time. All e-mail sent to your account is saved in your~/Maildir directory. vacation also keeps track of the messages it sends out, so that it will only send a response if the original sender has not yet received one.
There are three easy steps needed to set up the vacation program. A more detailed explanation can be found in the vacation man page (however please be aware that you need to run a command customized to the SoC environment in order to get your files set up)`. In order to get vacationworking, you will need to do the following:
- Create a Message File.
Create a file in your home directory called .vacation.msg. This file will be sent to users who send you mail while the vacation program is running. Following is a sample file:
From: Chad "Superfly" Lake <
Subject: I am out of the office.
I have received your message about $SUBJECT.
I'm off on a 33-year sabbatical to go rock climbing around the
world. My employer, the School of Computing at the University of
Utah, was kind enough to foot the bill. I will be back just in
time to collect my retirement benefits, so I will get back to your
See you at the crags!
You can write any type of message you would like. If you use the variable "$SUBJECT" in your .vacation.msg file, it will replace the variable with the subject of the sent message.
- Initialize Vacation
Once you have written your .vacation.msg file, run '/usr/bin/vacation -i' on shell.cs.utah.edu to initialize the database vacation will use to track who has sent mail during your absence.
- Prepare Your .forward File
The last step involves adding a recipe to your .procmailrc or modifying your .forward file.
Setting up your .procmailrc is done much like your .forward except that instead of creating a.forward file, you add a recipe to your .procmailrc. The advantage is that you can apply your anti-spam and/or refiling rules first and only auto-respond to those messages you wish. An example recipe would be:
# Send Mail Message through the vacation program
| /usr/bin/vacation <username>
You should modify it so that it contains a line that looks like this:
\<username>, "| /usr/bin/vacation <username>"
For example, if my username is "clake", then I would set up my .forward file to contain the line:
\clake, "| /usr/bin/vacation clake"
If you would like to only send messages every X number of days, you can set up your.forward like (7 days is the default, this example sets it for 10):
\clake, "| /usr/bin/vacation -r10d clake"
Any of the varations of the options given above in the .forward examples are valid for your.procmailrc however you must use the recipe syntax which .procmail uses per the provided example. You may place the recipe anywhere in your file, but probably want to place it after your SpamAssassin rule.
Once that is done, vacation is set up and you are ready to go. Having a friend send you e-mail can be used to verify that vacation is working properly.
Make sure that your .forward file uses /usr/bin/vacation, and not /usr/sbin/vacation or/usr/local/bin/vacation.