Configuring Vacation Mail With Procmail
If you use procmail to filter messages, you need to setup vacation email
response via your
.procmailrc file in your homedir rather than the vacation
This is because email responses will not then be sent to senders whose emails are to be filtered, which is desirable because the sender doesn’t get to know that the email address was successful. Spammers use such replies to build databases of live email addresses.
Configure procmail as follows:
:0 Whc: vacation.lock
# Reply if mail is addressed to me.
# Don't reply to daemons or mailing lists.
# Avoid mail loops (don't reply to mail I might send myself).
* !^X-Loop: $LOGNAME@cs.technion.ac.il
# Store sender's address in vacation.cache if not there already.
| /usr/bin/formail -rD 8192 $HOME/.vacation.cache
# If sender's address not in cache (e=previous recipe failed), send
# mail containing vacation message. Note: Trailing backslashes (\)
# required to denote continuation of single action line.
| (/usr/bin/formail -rA"Precedence: junk" \
-A"X-Loop: $LOGNAME@cs.technion.ac.il" ; \
cat $HOME/.vacation.msg \
) | /usr/lib/sendmail -oi -t
You are now ready.
In order to setup a vacation email response each time you go away, do the following:
Check it by sending mail to your cs mail and see that you get it and also the vacation message is sent back.
To stop the vacation response do:
So it will look like this:
Check it by sending mail to your cs mail and see that you get it and also the vacation message is NOT sent back.
Please notice that you must not use vacation command at any time because it will override .forward file and will disable procmail utility.