You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Christian Gregoire <cg...@yahoo.com> on 2010/04/27 22:38:31 UTC

Re : spamc output

Great, that's it. Thanks you both Bowie and Karsten.




----- Message d'origine ----
De : Bowie Bailey <Bo...@BUC.com>
À : users@spamassassin.apache.org
Envoyé le : Mar 27 avril 2010, 18 h 59 min 07 s
Objet : Re: spamc output

Christian Gregoire wrote:
> Hi,
>
> Using SA v3.3.1 spamc command-line client : the message analyzed being either spam or ham, can I have the message left untouched except for the X-Spam headers ? For example, in case of a spam message, I'd like to have:
>
> From: "Test" <te...@example.com>
> To: <te...@example.com>
> Subject: Test
> Date: Thu, 7 May 2009 01:10:09 -0600
> X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on webmail-2
> X-Spam-Flag: YES
> X-Spam-Level: **************************************************
> X-Spam-Status: Yes, score=50.5 required=7.0 tests=DOS_OE_TO_MX,
>         FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_DHCP,HELO_DYNAMIC_IPADDR,HTML_MESSAGE,
>         KB_RATWARE_OUTLOOK_MID,MIME_QP_LONG_LINE,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,
>         RCVD_IN_SORBS_DUL,RCVD_IN_SORBS_WEB,RDNS_NONE,
>         SANE_7429530a7398f43f1f1b795f9420714e,T_SURBL_MULTI1,T_SURBL_MULTI2,
>         T_SURBL_MULTI3,T_URIBL_BLACK_OVERLAP,URIBL_AB_SURBL,URIBL_BLACK,
>         URIBL_DBL_SPAM,URIBL_GREY,URIBL_JP_SURBL,URIBL_PH_SURBL,URIBL_SC_SURBL,
>         URIBL_WS_SURBL autolearn=spam version=3.3.1
> X-Custom-1: xxxxx
> X-Custom-2: xxxxx
> X-Custom-3: xxxxx
>
>
> and in the case of a ham message :
>
> From: "Test" <te...@example.com>
> To: <te...@example.com>
> Subject: Test
> Date: Thu, 7 May 2009 01:10:09 -0600
> X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on webmail-2
> X-Spam-Level: *
> X-Spam-Status: No, score=1 required=7.0 tests=DOS_OE_TO_MX autolearn=spam version=3.3.1
> X-Custom-1: xxxxx
> X-Custom-2: xxxxx
> X-Custom-3: xxxxx
>
>
> When a spam, since the message is rewritten, my X-Custom headers are removed, which breaks the rest of the processing of the message in my MTA.
>
> I've tried the different options available according to the 'spamc --help' output (-c, -y, -r, ..) but none fits my needs.
>  

The option you want isn't a spamc option, but a general SpamAssassin option.

Add this line to your local.cf file and then restart spamd:

        report_safe 0

Take a look at the man page for Mail::SpamAssassin::Conf for details.

http://spamassassin.apache.org/full/3.3.x/doc/Mail_SpamAssassin_Conf.html

-- 
Bowie