On Tue, 2014-01-07 at 07:29 -0600, Mark Chaney wrote:
> I am using spamassassin standalone and I am trying to figure out how to 
> duplicate this format that I would normally get from my servers that 
> user amavis or mailscanner. How can I get a format like so? Ive read the 
> manual, but havent really figured it out. I also have no use for the 
> spam-checker-version
> 
> X-Spam-Flag: YES
> X-Spam-Score: 14.176
> X-Spam-Level: **************
> X-Spam-Status: Yes, score=14.176 tagged_above=-10 required=5
>       tests=[AWL=-1.500, BAYES_95=4.5, DATE_IN_PAST_06_12=1.543,
>       HTML_MESSAGE=0.001, KAM_SOLAR=3.5, MIME_HTML_MOSTLY=0.428,
>       MPART_ALT_DIFF=0.79, NUMERIC_HTTP_ADDR=1.242, RDNS_NONE=0.793,
>       SO_RDNS_UNKNOWN=0.35, SPF_HELO_SOFTFAIL=0.732, SPF_SOFTFAIL=0.665,
>       T_REMOTE_IMAGE=0.01, URI_HEX=1.122] autolearn=no
> 
> Right now I just get:
> 
> X-Spam-Status: No, score=3.3 required=5.0 tests=EMPTY_MESSAGE,SPF_FAIL,
>       T_RP_MATCHES_RCVD autolearn=no
> X-Spam-Level: ***
> X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on 
> mx4.example.com
> 
The X-Spam-Status, X-Spam-Level and X-Spam_Checker-Version headers are
output by SA. The X-Spam-Flag and X-Spam-Score headers came from amavis
or mailscanner and simply repackage the first two information fields in
X-Spam-Status.

I assume you're writing your own filter program. If so, it can use the
values in X-Spam-Status to quarantine spam rather than passing it on. My
own filter does this. However, if something further downstream needs the
X-Spam-Flag and/or X-Spam-Score headers, just create them using the data
in X-Spam-Status and add them to the message.

I wrote my filter in C, but if all you want to do is add those two
headers, then you can do that by writing a filter script. That should
take about 10 minutes using awk or a bit longer if you prefer Perl.

Martin





Reply via email to