[milters] Archive

Lists Index Date Thread Search

Article: 1664
From: Anthony Howe
Date: 2007-08-29 04:11:29 -0400
Subject: milter-spamc and concise reports...

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

This question has come up from time over the years, but has never been 
posted and archived to the mailing list. So today I'm posting a copy of 
a recent reply concerning how to setup concise spam reports.

 > 1. The spam report that gets generated by default, even though
 > the status is no, the report says yes:
 >
 > X-Spam-Status: NO, hits=0.00 required=5.00

See documentaion for spamd-command, specifically set:

     spamd-command=REPORT_IFSPAM

The REPORT_IFSPAM command instructs spamd to only send a report if the 
message is considered spam. Personally I prefer to always see the report 
so that I can adjust the scores in the event of a false-negative, but 
some people prefer a minimalist view.

 > 2. I'd really prefer the concise reports that look like this:
 >
 > X-Spam-Status: Yes, score=5.0 required=5.0 tests=DNS_FROM_RFC_WHOIS,
 >         INVALID_DATE,MSGID_FROM_MTA_ID,
 >         NO_REAL_NAME,UNDISC_RECIPS,UNPARSEABLE_RELAY
 >         autolearn=no version=3.1.9

This has been requested over the years and I have no plans to support it 
directly. You can achieve a concise report configuring the

	/etc/mail/spamassassin/local.cf

through the "report" template. It will appear in X-Spam-Report header 
instead, as any report output from spamd is placed in this header, not 
the X-Spam-Status header (this is the milter-spamc design choice and not 
likely to change). For example I have in my local.cf file:


clear_report_template
report POINTS TOTAL= _HITS_ / _REQD_
report
report Ceci est le rapport SpamAssassin pour ce message. Il contient
report une ou plusieurs report lignes pour chaque regle. Chaque ligne
report contient le report nom d'une regle, son score, et report sa
report breve description.
report
report _SUMMARY_
report SpamAssassin/_VERSION_


which provides a French intro for my users and gives a full report. The
the SpamAssassin documentation lists assorted other tags to customise 
this report:

http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html#template_tags

For example you could duplicate the concise format header with:


clear_report_template
report _YESNO_, score=_HITS_ required=_REQD_
report tests=_TESTS(,)_


or try


clear_report_template
report _REPORT_


Again remember to check the SpamAssassin documentation concerning 
template tags.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         ICQ: 7116561      Sendmail Milter Solutions
http://www.snert.com/                 
     http://www.snertsoft.com/

Lists Index Date Thread Search