# HPCM Email Contest Contestant .procmailrc Additions # # File: procmailrc # Author: Bob Walton # Date: Fri May 5 15:32:45 EDT 2006 # # The authors have placed this file in the public # domain; they make no warranty and accept no liability # for this file. # # RCS Info (may not be true date or author): # # $Author: hc3 $ # $Date: 2006/05/05 19:33:04 $ # $RCSfile: procmailrc,v $ # $Revision: 1.12 $ # You should edit this file by first setting the # following parameters properly, and then editing # the `:0 B' entries below the place where it says # `CONTINUE EDITING:'. # Additions to your path that you need to run: # # The files in ONE of your contest home directory's # `help/sh' subdirectories. # # The `bash' program, if necessary. # # Include a `:' after EACH added path directory. # # Note: If you get this PATH wrong, hpcm_extract will # fail without any any error messages. # # Note: Don't assume the example values given below # will work for you. # HPCM_PATH="$HOME/bospre-facility/help/sh:" # End of editable parameters. Proceed to `CONTINUE # EDITING' below. # # Be sure we are using a valid shell. # SHELL=/bin/sh # Select replies from hpcm_get messages, # and avoid selecting output of hpcm_extract. # :0 * ^Subject:[ ]+RE:[ ]+get * ! ^X-HPCM-Subject: { # Set the default value of HPCM_HOME to a non- # existent directory. This causes email that # arrives here to vanish if HPCM_HOME does not # get reset in what immediately follows. HPCM_HOME=$HOME/hpcm/this_does_not_exist # Constants used just below. # BEFORE='This message replies to:^To:[ ]+' AFTER='[ ]*<' # CONTINUE EDITING: # # For each contest for which you have a home direc- # tory, provide a `:0 B' entry to set HPCM_HOME to the # contest home directory. The word between ${BEFORE} # and ${AFTER} is the password for the contest; that # is, it is the `fee' in the contest email address # `fee'. The HPCM_HOME value is the home # directory of the contest. # # Note: if HPCM_HOME is set to a non-existant direc- # tory, email replies from hpcm_get will vanish with- # out a trace. # # Note: don't assume the example values given below # will work for you. :0 B * $${BEFORE}bospre-facility${AFTER} { HPCM_HOME=$HOME/bospre-facility } # End of CONTINUE EDITING. You are now done editing # this file. # Pipe the reply through hpcm_extract and send the # output of that as mail to ourselves. If you # have troubles, try temporarily replacing # `hpcm_extract $HPCM_HOME' by things like # `which hpcm_extract' and `which bash'. # :0 c: $HPCM_HOME/get_mbox$LOCKEXT | PATH="$HPCM_PATH$PATH" \ hpcm_extract $HPCM_HOME 2>&1 \ | $SENDMAIL $SENDMAILFLAGS -t `id -un` # Save the same reply in $HPCM_HOME/get_mbox. Its # rare to want to see the reply itself, but this saves # it in case hpcm_extract fails oddly. # :0: $HPCM_HOME/get_mbox } # End of HPCM .procmailrc Additions.