Re: Managing "out of the office" twits
2004-06-03 02:07:50
Believe it or not, I received an out of office to the post I'm
replying to :) So as I indicated, I wrote an autoresponder to deal
with this crap. But first, I must apologize in advance, in case this
thing backfires in an infinate loop and replies to the list. Here is
the latest script:
PRC_LIBRARY_DIR=$HOME/procmail
SENDER_ML=(owner-(\
amanda-users@amanda\.org\
|cryptography@metzdowd\.com\
|cypherpunks@[a-z0-9.-]*(lne|ssz).com\
|mixminion-dev@freehaven\.net))
# Sender is owner mailing lists
#
:0
*$ ^Sender:.*$SENDER_ML
* ^Sender:.*owner-\/[a-z0-9.-]+@
* MATCH ?? ()\/[^@]+
{
LISTNAME=$MATCH
LOG="+_+_+_+[ Anti-OOO ]+_+_+_+$EOL"
INCLUDERC=$PRC_LIBRARY_DIR/ooo_responder.prc
:0 E:
mailing_lists/${LISTNAME}
}
[ooo_responder.prc file]
# Anti-Out-of-Office Autoresponder
# by Justin Gombos (6/2/04)
#
SPC="[ ]"
FROM_="(From${SPC}|(Old-|X-)?(Resent-)?\
(From|Reply-To|Sender):)(.*\<)?"
MYSELF=mindfuq AT zianet DOT com
TEMPDIR=$HOME/tmp
MAILDIR=$HOME/Mail
ORIG_MSG ="$TEMPDIR/preserved_orginal.msg"
OOO_NOTICE ="$PRC_LIBRARY_DIR/anti_ooo.msg"
AUTORESP_OUTBOX ="$MAILDIR/sent-mail/autoresp"
OOO_SENDERS ="$MAILDIR/ooo_twits.cache"
:0 c: captureorigmsg.lock
* -100^0
*$ 30^0 ^${FROM_}.*$OOO_TWITS
* 50^0 HB ?? out.of.the.office
* 30^0 B ?? (will return|until|back on)
*$ 0^0 ^TO_.*\/$MYSELF
*$ 30^0 !^X-Loop: $MATCH
#* 70^0 !^FROM_DAEMON
| (echo "---Original Message---"; \
formail -X "From:" \
-X "To:" \
-X "Subject:"; \
echo) > $ORIG_MSG
OOO_SCORE=$=
:0 c: captureorig.lock
*$ $OOO_SCORE^0
| sed -e 's/^/> /' >> $ORIG_MSG
:0 Whc: oooresp.lock
*$ $OOO_SCORE^0
| formail -rD 8192 $OOO_SENDERS
:0 Ahc # Change A to e for single replies
| (formail -rtI"Precedence: junk" \
-A"X-Loop: $MATCH" \
-I"From: $MATCH" ; \
cat $OOO_NOTICE ; \
echo; \
cat $ORIG_MSG ; rm $ORIG_MSG \
) | tee $AUTORESP_OUTBOX | $SENDMAIL -oi -t -f $MATCH
:0 A:
/in/ooo_list_replies
OOO_SCORE=-1
[anti_ooo.msg file]
My scripts have detected that you posted an out of office reply to a
public forum. Please control your auto-responder.
If you are receiving this in error, I apologize; please disregard it.
|
|
|