Setting up automatic response
From OCF Help
If you want to set up automatic response (either because you are going on a vacation, or you want to let others know that you won't be checking your email for some time) on your account, you can use vacation command. After SSHing into ocf.berkeley.edu, follow the below instructions to enable/disable automatic response:
To Enable
- Run
bash -c "EDITOR=/opt/local/bin/pico vacation"
- Above command will display a sample message, like:
Subject: away from my mail I will not be reading my mail for a while. Your mail regarding "$SUBJECT" will be read when I return.
Edit it to your liking. Note that the first line following Subject: will be the subject header of your reply and $SUBJECT will be automatically be replaced with the content of the subject header of the original email.
- When finished editing, type Control-O and press Enter to save the message and type Control-X to exit.
- You will be asked a few questions. Answer shown as below:
Would you like to see it? n
- If you want to double-check the automatic response, you can answer "y" here. It will display the automatic response and move onto the next question.
Would you like to edit it? n
- Answering "y" will make you go back to step 2. If you want to proceed to the next question, answer "n".
- Depending on whether you already have a .forward file or not (you will have this file, for example, if you set up spam filtering before), you will be asked different questions. The possible questions and responses are as following.
- If you do not have a .forward file, you will be asked:
To enable the vacation feature a ".forward" file is created. Would you like to enable the vacation feature?
Answer "y", and you will see:
Vacation feature ENABLED. Please remember to turn it off when you get back from vacation. Bon voyage.
and automatic response is set up. - If you already have .forward file, you will be asked:
You have a .forward file in your home directory containing: "|procmail #username" Would you like to remove it and disable the vacation feature?Depending on the content of .forward, you might have slightly different message. Unless you know what you are doing, answer "n" here. Your automatic response will not be set up yet. To finalize the set up, run following command:
pico ~/.forward
This will open up your .forward file in an editor. Add "|/usr/bin/vacation username" so it looks like:
"|procmail #username", "|/usr/bin/vacation username"
where username is replaced with your own OCF username and the first part might look slightly different, depending on what was in .forward already. Save and exit by typing Control-O, Enter, and Control-X in that order. That's it, automatic response is set. Try sending a test message to yourself to make sure it's working. Note that vacation program will send the automatic response only once to each unique sender.
- If you do not have a .forward file, you will be asked:
To Disable
How you might disable the automatic response depends on whether you had .forward file already or not. To check, run:
cat .forward
- If you see something like
\username, "|/usr/bin/vacation username"
then you can just runrm ~/.forward
and your automatic response will be disabled. - Instead, if you see something like
"|procmail #username", "|/usr/bin/vacation username"
then you will need to edit the .forward file (this is just reversing what you did in Step 5 above) so it looks like:"|procmail #username"
Now your automatic response is disabled. Try sending a test message to yourself (from an account that you didn't use to test whether it was working before: see the note above) to make sure it's disabled.
See Also
- For more information about vacation command, run
man vacation
on your Unix shell.
