# CHECK-HEADER-DOMAINS.RC # # Function to analyze the domains from non-Received: headers # of a spam to see if they come from a specific spammer. LOCALTAG=no # Check From: domain (FROMDOMAIN). # LOCALBUFFER=`${GREP} -i -x "${FROMDOMAIN}" ${TESTDOMAINS}` # Check for exempt source domains # :0 * ! FROMDOMAIN ?? ^example\.com$ * ! LOCALBUFFER ?? ^^^^ { TESTNAME2=${TESTNAME} LT2=no TESTHOSTS=`${LS} ${SBDIR}/white/exempt-hosts.txt` TESTHOST=${FROMDOMAIN} TESTNAME='Exempt Domain' LOCALBUFFER2=`${GREP} -i -x "${TESTHOST}" ${TESTHOSTS}` :0 * ! LOCALBUFFER2 ?? ^^^^ { LT2=yes SBLOG="L3-${TESTNAME} (FROMDOMAIN: ${FROMDOMAIN})" INCLUDERC=${SBDIR}/functions/loglevel.rc } TESTNAME=${TESTNAME2} } # If matched, and not exempt, score and tag. # :0 * LT2 ?? no * ! FROMDOMAIN ?? ^example\.com$ * ! LOCALBUFFER ?? ^^^^ { LOCALTAG=yes HD1=yes SBLOG="C3R-${TESTNAME} (From Domain: ${FROMDOMAIN})" INCLUDERC=${SBDIR}/functions/loglevel.rc } # Check Reply-To: domain (REPLYTODOMAIN). # LOCALBUFFER=`${GREP} -i -x "${REPLYTODOMAIN}" ${TESTDOMAINS}` # Check for exempt source domains # :0 * ! REPLYTODOMAIN ?? ^example\.com$ * ! LOCALBUFFER ?? ^^^^ { TESTNAME2=${TESTNAME} LT2=no TESTHOSTS=`${LS} ${SBDIR}/white/exempt-hosts.txt` TESTHOST=${REPLYTODOMAIN} TESTNAME='Exempt Domain' LOCALBUFFER2=`${GREP} -i -x "${TESTHOST}" ${TESTHOSTS}` :0 * ! LOCALBUFFER2 ?? ^^^^ { LT2=yes SBLOG="L3-${TESTNAME} (REPLYTODOMAIN: ${REPLYTODOMAIN})" INCLUDERC=${SBDIR}/functions/loglevel.rc } TESTNAME=${TESTNAME2} } # If matched, and not exempt, score and tag. # :0 * LT2 ?? no * ! REPLYTODOMAIN ?? ^example\.com$ * ! LOCALBUFFER ?? ^^^^ { LOCALTAG=yes HD1=yes SBLOG="C3R-${TESTNAME} (Reply-To Domain: ${REPLYTODOMAIN})" INCLUDERC=${SBDIR}/functions/loglevel.rc }