vacation with procmail

vacation mail
Everyone's seen that annoying, "I'm out of town" email. Well, now you can do the same thing yourself with procmail!

You simply put your message in .vacation.message and procmail takes care of the rest.

# This is actually two recipies. This is meant to go at the END of your .procmailrc
# so it doesn't trigger on mailing lists that you're filtering above.

# Will add the sender to the vacation cache if not already in the vacation cache
# FROM_DAEMON is a macro for a lot of "system" addresses. see the
# procmailrc man page fordetails

:0 Whc: vacation.lock
* !^FROM_DAEMON
* !^X-Loop: jgross@stimpy.net
| formail -rD 8192 vacation.cache

# Only run this rule if the last rule didn't match, meaning it will only mail each
# user once.

:0 ehc         # if the name was not in the cache
| (formail -rA"Precedence: junk" \
   -A"X-Loop: jgross@stimpy.net" ; \
cat $HOME/.vacation.message; \
echo ""; \
echo "-- "; cat $HOME/.signature \
) | $SENDMAIL -oi -t

Back: More complex filtering Top Next: Dealing with unwanted mail

j g r o s s @ s t i m p y . n e t