Planning to be away from your e-mail for a few weeks this summer? You may want to arrange to have an automatic reply sent to anyone who sends you mail. The precise program to use depends on what system you use for your inbox (i.e. the host part of your e-mail address). In general, it's fairly easy at UO to set up such an automatic reply on darkwing/gladstone/uoregon.edu.
Notice that some mail reading software such as Mac Mail.app allows you to set up automatic email responders. They are good for some purposes, but not for handling email while you're away -- they only generate replies when you actually download/read your mail i.e. when you come back from vacation. If you want to generate replies at the time the mail is received in your mailbox, the replies must be generated by a program running on the mail server.
Beware! If you receive lots of mail each week, you could easily exceed your disk quota while on vacation; if you do, any e-mail to you will be returned to sender. Use the VMS "show quota" or the Unix "quota -v" command to see what your disk usage and quota is. If you're planning to be away for an extended period, it's a very good idea to unsubscribe to any active listservs or mailing lists you're on.
If you get your mail on uoregon.edu (or darkwing.uoregon.edu or gladstone.uoregon.edu), you can easily set up an automatic reply by using the "vacation" program to process your incoming mail. We'll discuss "vacation" in more detail below.
"vacation" is a smart program. It tries not to send automatic replies to mailing lists, and sends no more than one reply a week to the same sender. For more information, see <http://darkwing.uoregon.edu/cgi-bin/man2html.pl?vacation>.
Log in to darkwing using ssh and give the following commands:
darkwing% vacation -I darkwing% pico .vacation.msg
(If you are familiar with a different darkwing text editor, e.g., vi or emacs, substitute it for "pico"). This command creates (or changes) the file .vacation.msg (notice the leading dot, which makes this a "hidden" file). It's a template for the replies the program will send for you. Design your reply template, then exit from pico by pressing Control-X.
As shown in the example below, the template file should start with mail headers (including at least From: and Subject: lines), then have a blank line followed by the text of the reply you will be sending. If you include "$SUBJECT" in the template, then autoreplies will fill in the subject line of your correspondent's message at that point. A typical template might be:
UW PICO(tm) 2.9 File: .vacation.msg Modified
From: jqj@uoregon.edu (via the vacation program)
Subject: away from my mail
I will be away from my mail through January 3, 2010. I will read your
message, $SUBJECT,
when I return.
JQ Johnson office: 115F Knight Library
Director, CET email: jqj@darkwing.uoregon.edu
1299 University of Oregon voice: 1-541-346-1746, -3485 fax
Eugene, OR 97403-1299 http://darkwing.uoregon.edu/~jqj/
^G Get Help ^O WriteOut ^R Read File^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Txt^T To Spell
|
After you have a template, you need to enable the vacation program. Do this by editing a mail configuration file, either ".forward" or ".procmailrc".
Most people who have simple mail processing needs can invoke vacation through .forward. To do so, first check to make sure that you do not have a .procmailrc (if you do, see below) file. Then create or edit the file .forward in your home directory. The file will contain exactly one line.
darkwing% pico .forward
UW PICO(tm) 2.9 File: .forward Modified
\jqj, "|/usr/bin/vacation jqj"
^G Get Help ^O WriteOut ^R Read File^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Txt^T To Spell
|
Substitute your user name for "jqj". Punctuation on this line, including the leading backslash, is important. Check before continuing.
You may already be using a .forward file to forward email from uoregon.edu to some other location. If so, the "\jqj" should be replaced with your forwarding address, so the resulting line might instead be
jqj@comcast.net, "|/usr/bin/vacation jqj"
However, in that case maybe it would be better not to set up vacation processing on darkwing at all, but instead to just forward all your mail to the remote address, and have a vacation processor set up to run there instead.
Some people with uoregon.edu accounts use a more complex system, procmail, to manage and filter their email. If you do, then instead of a .forward file you need to edit your .procmailrc file to add 2 lines (normally at the end of the file).
darkwing% rm .forward darkwing% pico .procmailrc
UW PICO(tm) 2.9 File: .procmailrc Modified
:0 c
| /usr/bin/vacation jqj
^G Get Help ^O WriteOut ^R Read File^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Txt^T To Spell
|
Substitute your user name for "jqj".
You can combine the vacation program with other features of procmail. Perhaps you want to simply trash all messages containing the string "paypal.com", send an automatic vacation reply to your students, but forward e-mail from your department head to your RA. You could even use procmail by itself to generate automatic replies instead of using vacation (though that's tricky; e.g., it would be a bad thing to send an automatic reply to a large mailing list every time you received e-mail from it).
For help setting up procmail, see <http://cc.uoregon.edu/usingprocmail.html>
You can turn off automatic responses by deleting your .forward file or editing your .procmailrc file to remove the 2 lines you added.