#INITLOGLEVELS.RC # File Created 9/13/2004 -GE # Last updated 11/19/2004 -GE # Synopsis: # Recipe to initialize variables needed to activate the SBLOGLEVEL # features in the SpamBouncer # Initialize variables needed by the SBLOGLEVEL scripts # "functions/loglevel.rc" # "functions/loghandler.rc" # "functions/logfile.rc" # Sanity check # Note: If there isn't a procmail logfile defined by the user # then don't do any advanced logging at all. # any log information recored by procmail will be mailed # back to the sender if that is the case # so minimal logging is prudent. # no procmail logfile was defined, so turn off SBLOGLEVEL :0 * LOGFILE ?? ^^^^ { SBLOGLEVEL=0 } :0 E { :0 * ? ${TEST} -f ${LOGFILE} { :0 * SBLOGLEVEL ?? ^^^^ { SBLOGLEVEL=3 } :0 E * SBLOGLEVEL ?? ^.*\/[0-9] { SBLOGLEVEL=${MATCH} } SBMESSAGEID=`${FORMAIL} -x"Message-ID:"` } :0 E { SBLOGLEVEL=0 } } # Second sanity check # # Check to see if the file designated as the SBLOGFILE is # different from the Procmail logfile. If it is, check to # see if it exists. If it does not, touch it to create it. :0 * ! LOGFILE ?? ^^^^ * ! SBLOGFILE ?? INTERNAL * $ ! SBLOGFILE ?? ${LOGFILE} { :0 * ? ${TEST} -f ${SBLOGFILE} { SBLOGFILE=${SBLOGFILE} } :0 ciE | ${TOUCH} ${SBLOGFILE} }