You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David B Funk <db...@engineering.uiowa.edu> on 2006/03/30 04:45:35 UTC

Re: spamd REPORT

On Thu, 30 Mar 2006, mouss wrote:

> > Use the 'REPORT' or 'REPORT_IFSPAM' spamd command instead of 'SYMBOLS'
> > or 'PROCESS' to get the full score report but not the full message.
> >
>
> This requires parsing the message.
>
>
> I would like getting something like:
>
> ALL_TRUSTED=-1.44,MISSING_SUBJECT=1.345
>
> instead of (REPORT):
>
> blahblah
> ...
> ...
> Content analysis details:   (-0.1 points, 5.0 required)
>
>   pts rule name              description
> ---- ----------------------
> --------------------------------------------------
> -1.4 ALL_TRUSTED            Passed through trusted hosts only via SMTP
>   1.3 MISSING_SUBJECT        Missing Subject: header
>
> or (SYMBOLS):
>
> ALL_TRUSTED,MISSING_SUBJECT
>
> PROCESS seems the answer. It's just unfortunate that it still echoes the
>   whole message. Can I just close the socket once I get my headers?

Picky Picky, Some people want -everything- done for them.

If you read the SA Conf document ("Mail::SpamAssassin::Conf(3)")
you will find that there is a section that talks about all the
options for formatting the REPORT output. Pay particular attention
to the TAGS section (the stuff that looks like _BLAH_) and the report
template options.

Is left as an exercise for the student to find the appropriate
config file options to get an output that looks like:

 localhost$ spamc -R < /tmp/test2
 5.6/6.0
 Content analysis details:   (5.6 points, 6.0 required, autolearn=no)
 BAYES_44=-0.001,COMBINED_FROM=0.318,FVGT_TRIPWIRE_SJ=0.077,FVGT_TRIPWIRE_XF=0.077,FVGT_TRIPWIRE_XX=0.077,L_RCVD_IN_CBL=2.1,L_RCVD_IN_XBL=2.7,L_T_COMBINED=0.216

And if that "Content analysis details" part bothers you, you can even
get it down to:

 localhost$ spamc -R < /tmp/test2
 5.6/6.0
 BAYES_44=-0.001,COMBINED_FROM=0.318,FVGT_TRIPWIRE_SJ=0.077,FVGT_TRIPWIRE_XF=0.077,FV$

Hint: look at clear_report_template and _TESTSSCORES(,)_

Professor Dave.
(I -am- from a University ;)

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{