# $Id$
#
# The author disclaims all copyright and releases this script into the
# public domain.
#
# A sample ~/.procmailrc configuration file showing how to setup:
#
# 1. Vacation message reply (autoresponse).
#
# Put the text for the body of the stock reply message into the file
# pointed at by $REPLYFILE.
#
# 2. Forwarding:
#
# Not enabled by default, see comments near the end of this file.
#
# 3. Archiving:
#
# Messages by default end up in user's typical mailbox.
#
# See the procmailrc(1) and procmailex(5) man pages for more
# information.
#
# Assumes the user's ~/.forward file invokes procmail, or that procmail
# is the system's local mailer. For Sendmail, search for Mlocal in
# sendmail.cf to determine the default local mailer.
SHELL=/bin/sh
# set domain to keep this rc file generic, DOMAIN is used in the
# X-Loop header to prevent mail loops, among other things.
DOMAIN=example.org
# path to file containing generic reply message to be sent back.
#
# by default, the contents of the user's ~/.signature file will be
# appended to the REPLYFILE message.
REPLYFILE=$HOME/.vacation.msg
# path to file where seen e-mails are logged
# should clear out this file when disabling vacation services
CACHEFILE=$HOME/.pm-vacation.cache
# generic path for finding programs; one must contain formail(1)
PATH=/bin:/usr/bin:/usr/local/bin
# Where to base operations out of, e.g. where the vacation.lock file
# gets written to, etc.
MAILDIR=$HOME
LOCKFILE=$MAILDIR/.lockmail
# will grow unbounded unless other scripts trim it down
LOGFILE=$MAILDIR/.pm_logfile
# set to 'on' to aid in troubleshooting the logfile
VERBOSE=off
# Rule to write sender to vacation.cache file, and send a vacation
# note back to the sender unless they're already in the cache file.
#
# Manual formail limit of 8192 bytes on the cache file, which may need
# to be set higher depending on diversity of e-mail recieved.
# Note: To avoid sending vacation notices to addresses that spammers
# have forged, consider adding a "* !^X-Spam-Status: Yes"
# qualification if using SpamAssassin to tag potential spam.
:0 Whc:
* !^FROM_DAEMON
* !^X-Loop: ${LOGNAME}@${DOMAIN}
| formail -rD 8192 ${CACHEFILE}
:0 ehc # if the name was not in the cache
| (formail -rI"Precedence: junk" \
-A"X-Loop: ${LOGNAME}@${DOMAIN}" ; \
cat ${REPLYFILE} ; \
echo ""; \
cat ${HOME}/.signature \
) | $SENDMAIL -oi -t
# Rule to forward the messages on to someone else, continue processing
# message (via the 'c' flag)
#
# By default, we don't forward and store messages in DEFAULT mailbox
# file (/var/mail/$USER on *BSD systems, typically).
#
# To both forward & store locally, uncomment the forwarding recipe.
#
# To just forward, uncomment the forwarding rule, and remove the ' c'
# bit from the rule header.
#:0 c
#*
#! nobody@${DOMAIN}