Subject: vacation

From: Adam Shostack <[email-masked]>
Date: Mon, 20 Mar 1995 17:16:19 -0500 (EST)

My boss had a minor problem a few days ago, when he removed his
.vacation.msg, thinking that would turn off the vacation program.  I
extened the example vacation to the following, which gives people the
ability to turn vacation on & off by creating a .vacation file.
Taking out the .vacationlist is left to the user; you could probably
write something to clean that up-- something like this might work..

:0 h:  # untested
* ?  [ -e $HOME/.vacationlist ]
* !? [ -e $HOME/.vacation ]
| rm -f $HOME/.vacationlist

Anyway, I wanted to pass this on to Stephan for possible inclusion in
next versions procmailex, and anyone else who wanted it.  Don't
respond to me; I'm going on vacation. :)

Adam

# This handles vacation messages.  Make sure .vacation and
# .vacationlist exist

:0
* ? [ -s $HOME/.vacation ] 
* !^Precedence:(junk|bulk)
* !^FROM_DAEMON
{
 FROM=`formail -rx To:`
 ALREADYSENT=$HOME/.vacationlist
   :0 hc:
   * !? fgrep -e "$FROM" $ALREADYSENT
   | echo "$FROM" >> $ALREADYSENT;\
 	(formail -rA"Precedence: junk";\
	cat $MAILDIR/.vacation ;\
   ) | $SENDMAIL -t
}