John Goggan <[EMAIL PROTECTED]> writes: > X-MailScanner-SpamCheck: SpamAssassin (score=9.9, required 7, > FROM_ENDS_IN_NUMS (0.382), CLICK_BELOW (1.531), EXCUSE_7 (1.305), EXCUSE_3 > (1.080), DOUBLE_CAPSWORD (1.050), CLICK_HERE_LINK (0.847), MAILTO_LINK > (0.782), NO_MX_FOR_FROM (1.8), MSG_ID_ADDED_BY_MTA_3 (1.107))
Yup, I wanted something like that too. Posters here helped me write some perl scripting to do it in conjunction with procmail. The script misses some scores every once in a while, not sure why. Maybe the read needs to be rewound or something but I couldn't really see where. Its not really as simple as you'd probably like, but mainly due to my clumsiness. My set up works like this: `spama_list_scores' (a perl script) first trawls thru the spamassassin installed `*scores.cf' then any system wide scores in /etc/mail/spamassassin/local.cf (It doesn't check at the user level (~/.spamassassin) just system level as noted. Since on my setup there is but one user. A full list of scores is compiled into one file for further sourcing at: /etc/mail/spamassassin/spama_all_scores.tmp. This was done so the main script wouldn't have to do that same work everytime procmail invokes it. So one drawback is that if you change or override a score, you'll need to rerun spama_list_scores so it will be in the source file. `spama_list_scores' assumes all distro scores will appear in /usr/share/spamassassin/*scores.cf (They do, I believe) And in my case /etc/mail/spamassassin/local.cf So if you have others you'd need to edit the script The main script, `scores' depends on that source file /etc/mail/spamassassin/spama_all_scores.tmp to be accurate. spamassassin docs: cat .procmailrc [...] snipped head SCRIPT=/etc/mail/spamassassin/scores BIN=/usr/bin ## Below standard procmail invocation of spamc :0fw | $BIN/spamc ## And an additional section to pass the headers ## Thru my script :0 ## This grabs the Status line Rules section, unfolds it if folded ## and retains it as $MATCH. Passing $MATCH into my perl script ## as ENV{"MATCH"} (Thanks Bart) * ^X-Spam-Status:[ ]*\/.* { ## The script looks up the individual scores and reassembles the line. ## then reassigns the value of $MATCH to be that output. MATCH=`$SCRIPT` :0 fh ## Procmail then inserts a new header `X-Spama-Scores' with the new ## value of match. Which now is a list of the rules and there ## individual scores | formail -I "X-Spama-Scores: $MATCH" } An example of what it does looks like: [...] Other headers Header inserted by spamassasin: X-Spam-Status: No, hits=-4.5 required=5.0 tests=IN_REP_TO,X_LOOP,SUBJ_ENDS_IN_Q_MARK version=2.21 Header inserted by my `scores' script and procmail (Very similar to your example) X-Spama-Scores: D:IN_REP_TO:-3.382 D:SUBJ_ENDS_IN_Q_MARK:-0.135 D:X_LOOP:-1.000 T:-4.517 (RULE:SCORE and at the end T(total):SCORE) But, as I mentioned, it misses some scores occassionally. Maybe you can see why if you look at the script. Both scripts are posted here: (The only documentation is that they are heavily commented) http://www.jtan.com/~reader/exp/scripts ------------------------------------------------------- This sf.net email is sponsored by: Jabber Inc. Don't miss the IM event of the season | Special offer for OSDN members! JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk