# Vacation procmailrc 1.8 2000-04-23 Bennett Todd # http://people.oven.com/bet/vacation/index.html # # 1.8: Volker Kuhlmann pointed out I had a version number inconsistency # and had me add $SENDMAILFLAGS to the sendmail cmd, and use $LOCKEXT. # # 1.7: Added From pattern to end of list, thanks to Volker Kuhlmann, # for catching nattering from cron and lpd and so on. Also # accepted his collapsing of X-(Auth...|List...|Mailman...):. # Even carried it on a bit, gathering a couple more patterns. # And collapsed a couple of other patterns as well. # # 1.6: Tightened up ^X-.*-List: to ^X-[^:]*-List:, at the suggestion # of David Tamkin and Dallman Ross. # # 1.5: Re-ordered patterns to move some of the most effective up near # the top, where they'll bite earlier; replaced List-Id with List- # to cover more headers; and added Mailing-List. All these at the # recommendation of David Tamkin. # # 1.4: Added (1) to instructions; I hadn't documented reply file before. # # 1.3: Simplified that to X-.*-List, thanks to Mark Scarborough --- procmail # pattern matching is by default case-insensitive. # # 1.2: Collapsed X-.*-list and X-Mailing-List into X-.*-[Ll]ist, thanks to # Ruud H.G. van Tol # # 1.1: At the prodding of David Tamkin removed some patterns that were # actually covered by FROM_DAEMON, the regexp from hell. Added this # big block comment to the top. # # 1.0: Inspired by helpful examples from procmailex(5). Added patterns to # match every mailing list I know of. # # To use: # # (1) Create ~user/reply, containing the body of the message to return; # (2) Edit the bottom if you want to do anything besides default into a local # delivery; # (3) If you aren't postmaster, edit the Bcc in the formail invocation to # point at you; # (4) Install in ~user/.procmailrc; if they already have one, insert this just # above the final delivery (after all their mailing list filing and spam # filtering is done); # (5) If needed, add "|procmail" with however much punctuation noise seems # yummy to their .forward file; # (6) Test by sending them a message and eyeball the returned result; # (7) Send them a second test and make sure you don't get a second reply; # (8) Eyeball the resulting .procmail-log, and if all looks beautiful then # #-out the VERBOSE line; # (9) Keep an eye on those blind copies of the vacation announcements, rogue # vacation spammers make your whole site look like a pack of idiots. LOGFILE=$HOME/.procmail-log VERBOSE=on :0 Whc: vacation$LOCKEXT * $^To:.*$LOGNAME * !^FROM_DAEMON * !^List- * !^(Mailing-List|Approved-By|BestServHost|Resent-(Message-ID|Sender)): * !^Sender: (.*-errors@|owner-) * !^TOnev@bostic.com * !^X-[^:]*-List: * !^X-(Authentication-Warning|Loop|Sent-To|(Listprocessor|Mailman)-Version): * !$^From +$LOGNAME(@| |$) | formail -rD 8192 vacation.cache :0 ehc | (formail -rI"Precedence: junk" \ -A"Bcc: postmaster" \ -A"X-Loop: $LOGNAME@$HOST" \ ; \ cat $HOME/reply \ ) | $SENDMAIL $SENDMAILFLAGS -t # Do whatever you want with the # message here