Am Samstag, 23. Juli 2005 17:05 schrieb Sven Riedel: > Hi, > I've thrown together a perl script to show me where SA rules hit a mail by > highlighting and colorizing the given areas, after looking for and not > finding a similar tool. I originally did this to see where false positives > come from with the more convoluted regular expressions. But I hope other > people will find this useful as well - especially when you're still a > beginner with regular expressions :). The colorizing is done using ANSI > codes, so this is a pure terminal output thing - no HTML output. > > It's also possible to give rule definitions on the command line to see how > they match against a given mail. > > You can get it here: http://opensource.baghus.net/sahits/ > (screenshots at the bottom of the page). > > Feedback, bug reports, suggestions and patches are always welcome.
Hello, tried the frist obvious test with: cat <spamfile> | sa_hits which results in a Usage message. Next try with: [EMAIL PROTECTED]:~/spam> sa_hits 00005742 Use of uninitialized value in pattern match (m//) at /home/thomas/bin/sa_hits line 50. Use of uninitialized value in pattern match (m//) at /home/thomas/bin/sa_hits line 56. Use of uninitialized value in pattern match (m//) at /home/thomas/bin/sa_hits line 62. Skipping the following rules, since I don't know how to handle them: Another try gives: [EMAIL PROTECTED]:~/spam> sa_hits 00000058 /etc/mail/spamassassin/99_TA_Price.cf Skipping the following rules, since I don't know how to handle them: -- BODY -- Mail got hit by the following rules: TA_Price_01 (Score: 5.0): (?i-xsm:\bRetail Price: \$[0-9]+\.[0-9][0-9].*Our Price: \$[0-9]+\.[0-9][0-9]) TA_Price_02 (Score: 5.0): (?i-xsm:You Save.*\$[0-9]+\.[0-9][0-9]) *** SPAM (_SCORE_) *** *SPAM* vfr-YOUR SPEARM IS TASTY World famous brands which keep men happy all over the world! er:Rock hard manhood, multiple explosions and several times more semen volume! bronchi Order now and benefit from lowest costs and convenient shipment!. Most trusted brands of the world, join the thousands of happy customers!. benzedrine http://rwtzro.ito-adventures.com/spur/?code=ftaslvd Delete: http://deflect.su.ito-adventures.com/rm.php?bookbind=gvqft axon character belgian applicable ------ But the mail was not hit by the Rules. There is a lot of work to be done :-) Heads up. Thomas > > Regs, > Sven -- icq:133073900 http://www.t-arend.de
pgp4xAcSeXq8G.pgp
Description: PGP signature