You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Roger WJ Alterskjær <ro...@vm.ntnu.no> on 2005/01/17 15:53:11 UTC

add_header in 3.0.2 not working

Hi!
I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to get 
the add_header option working. Before I start: RH9, SA 3.0.2, spamd -d 
-c -m5 -u qscand, spamc called by qmail-scanner 1.24.

In /etc/mail/spamassassin/local.cf I've got:

add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ 
tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_

And yet I still get the default short report. I've been working on this 
for a few days and can't seem to wrap my head around this...

-- 
Mvh,
Roger WJ Alterskjær
Edb-konsulent
Vitenskapsmuseet, NTNU
73 59 79 78


Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <Ro...@vm.ntnu.no>.
Matt Kettler wrote:

> At 09:53 AM 1/17/2005, Roger WJ Alterskjær wrote:
>
>> I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to 
>> get the add_header option working. Before I start: RH9, SA 3.0.2, 
>> spamd -d -c -m5 -u qscand, spamc called by qmail-scanner 1.24.
>>
>> In /etc/mail/spamassassin/local.cf I've got:
>>
>> add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ 
>> tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
>>
>> And yet I still get the default short report. I've been working on 
>> this for a few days and can't seem to wrap my head around this...
>
>
> Erm, define "default short report"... That setting above matches the 
> defaults EXACTLY. Thus, I would not expect SA's behavior to change at 
> all from this setting.
>
> What, exactly, are you trying to change about messages that SA has 
> touched?

Hehehe... yeah, I should define that a little better. By default we get 
something that translates to:

add_header all Status _YESNO_, score=_SCORE_ required=_REQD_

I'm trying to get the additional info on what tests were 'plinged' when 
run through SA.I was able to get these reports when a message was marked 
as spam.(the old X-Spam-Report which is now disabled in 3.0)
Like this:
X-Spam-Report:
        *  0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is unknown to us
        *  0.1 HTML_MESSAGE BODY: HTML included in message
        *  5.4 BAYES_99 BODY: Bayesian spam probability is 99 to 100%
        *      [score: 1.0000]
        *  0.3 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
        *  0.6 HTML_FONT_INVISIBLE BODY: HTML font color is same as 
background
        *  4.0 OB_URI_RBL URI's domain appears in OB database at 
ob.surbl.org
        *      [www.xxxxxx.xxx is blacklisted in URI RBL at]
        [ob.surbl.org]
        *  4.0 BILLSTEARNS_URI_RBL URI's domain appears in Bill Stearns' 
database at ws.surbl.org
        *      [www.xxxxxx.xxx is blacklisted in URI RBL at]
        [ws.surbl.org]
        *  0.1 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address 
in URL
        *  1.6 MISSING_MIMEOLE Message has X-MSMail-Priority, but no 
X-MimeOLE
        *  0.1 MISSING_OUTLOOK_NAME Message looks like Outlook, but isn't

Re: add_header in 3.0.2 not working

Posted by Jason Haar <Ja...@trimble.co.nz>.
Roger WJ Alterskjær wrote:

> FYI, to anyone who runs into the same problem, there is a patched 
> version of qmail-scanner.pl that allow you to include SA-created 
> headers (plus other cool options not in the original):
> http://xoomer.virgilio.it/j.toribio/qmail-scanner/READMEpatched.html

...or you could try reading the Qmail-Scanner documentation... 
(specifically Q16 in the FAQ "*What's this fast_spamassassin vs 
verbose_spamassassin?*."

Don't go off re-inventing the wheel when what you want is (and always 
was) already supported.

-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1


Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <ro...@vm.ntnu.no>.
FYI, to anyone who runs into the same problem, there is a patched 
version of qmail-scanner.pl that allow you to include SA-created headers 
(plus other cool options not in the original):
http://xoomer.virgilio.it/j.toribio/qmail-scanner/READMEpatched.html

-Roger

Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <ro...@vm.ntnu.no>.
on 18.01.2005 12:30 Roger WJ Alterskjær said the following:

> on 17.01.2005 19:47 Andy Jezierski said the following:
>
>> [snip]
>> I don't use qmail-scanner, but do you have to re-start it for new 
>> config changes to take effect? Does qmail-scanner have it's own 
>> config file that overrides SA like amavisd-new? 
>
> qmail-scanner.pl is called when receiving and email. (Changes to this 
> file are immediate and there are no external config files.) A tmp and 
> working copy of the received message are created. The tmp copy's 
> attachements are extracted and virus-scanned.
> Afterward, spamc is called by qmail-scanner.pl on the working copy 
> like so:
> /usr/bin/spamc  -c  -u "recipient@myserver.domain.no" < 
> /var/spool/qmailscan/working/new/myserver.domain.no110601543848712717
> Then it's scanned for known viruses that fake sender-addresses in 
> order to determine if a bounce message is worth sending.
> Once cleared it's dropped into the qmail-queue.
>
> I imagine that the SA headers are kept when spamc is called. So, when 
> I try to even mod my /etc/mail/spamassassin/local.conf's add_header 
> line with no effect, I get stumped.


[In my best Maxwell Smart imitation] Would you believe it was 
qmail-scanner.pl?!

You got me thinking about what it does. Looking at the Q-S code showed 
that it parses the spamc output, picks only those things deemed 
interesting, then recreated it's own version of the SA X-Spam-Status 
header. So I guess I'll put my perl-programmer hat on and do some modifying.

Thanks very much for the help!! (Sincerely!)

-Roger

Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <ro...@vm.ntnu.no>.
on 17.01.2005 19:47 Andy Jezierski said the following:

> [snip]
> I don't use qmail-scanner, but do you have to re-start it for new 
> config changes to take effect? Does qmail-scanner have it's own config 
> file that overrides SA like amavisd-new? 

qmail-scanner.pl is called when receiving and email. (Changes to this 
file are immediate and there are no external config files.) A tmp and 
working copy of the received message are created. The tmp copy's 
attachements are extracted and virus-scanned.
Afterward, spamc is called by qmail-scanner.pl on the working copy like so:
/usr/bin/spamc  -c  -u "recipient@myserver.domain.no" < 
/var/spool/qmailscan/working/new/myserver.domain.no110601543848712717
Then it's scanned for known viruses that fake sender-addresses in order 
to determine if a bounce message is worth sending.
Once cleared it's dropped into the qmail-queue.

I imagine that the SA headers are kept when spamc is called. So, when I 
try to even mod my /etc/mail/spamassassin/local.conf's add_header line 
with no effect, I get stumped.

-Roger


Re: add_header in 3.0.2 not working

Posted by Andy Jezierski <aj...@stepan.com>.
Roger WJ Alterskjær <ro...@vm.ntnu.no> wrote on 01/17/2005 
11:38:38 AM:
> > >
> > > I'm trying to get the additional info on what tests were 'plinged' 
when
> > > run through SA. With 2.64 I was able to get these reports when a 
> > message
> > > was marked as spam.(the old X-Spam-Report which is now disabled in 
3.0)
> > > Like this:
> > > X-Spam-Report:
> > >         *  0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is 
> > unknown to us
> > >         *  0.1 HTML_MESSAGE BODY: HTML included in message
> > [snip]
> >
> > Try add_header spam Report _REPORT_
> >
> > Or if you want a brief version without the descriptions try 
> >  add_header spam report _TESTS(,)  or for a brief version with scores 
> > added  add_header spam report _TESTSSCORES(,) 
> 
> Hmm.... added "add_header spam Report _REPORT_" to my local.cf, ran 
> spamassassin -d --lint (no prob found), then sent from a Hotmail account 

> the GTUBE string. The only injected headers were:
> 
> X-Spam-Status: Yes, hits=1005.4 required=5.0
> X-Spam-Level: 
> 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> Even my X-Spam-Status header is the default, not the string I specified. 

> Lint'ing my config files as root shows SA is checking these for 
> validity, but is it picking up my local.cf in actuality? 
> (/etc/mail/spamassassin/local.cf is 644).

I don't use qmail-scanner, but do you have to re-start it for new config 
changes to take effect? Does qmail-scanner have it's own config file that 
overrides SA like amavisd-new?

Andy

Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <ro...@vm.ntnu.no>.
Andy Jezierski wrote:

>
> Roger WJ Alterskjær <ro...@vm.ntnu.no> wrote on 01/17/2005 
> 10:27:20 AM:
>
> > Matt Kettler wrote:
> >
> > > At 09:53 AM 1/17/2005, Roger WJ Alterskjær wrote:
> > >
> > >> I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to
> > >> get the add_header option working. Before I start: RH9, SA 3.0.2,
> > >> spamd -d -c -m5 -u qscand, spamc called by qmail-scanner 1.24.
> > >>
> [snip]
> >
> > I'm trying to get the additional info on what tests were 'plinged' when
> > run through SA. With 2.64 I was able to get these reports when a 
> message
> > was marked as spam.(the old X-Spam-Report which is now disabled in 3.0)
> > Like this:
> > X-Spam-Report:
> >         *  0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is 
> unknown to us
> >         *  0.1 HTML_MESSAGE BODY: HTML included in message
> [snip]
>
> Try add_header spam Report _REPORT_
>
> Or if you want a brief version without the descriptions try 
>  add_header spam report _TESTS(,)  or for a brief version with scores 
> added  add_header spam report _TESTSSCORES(,) 

Hmm.... added "add_header spam Report _REPORT_" to my local.cf, ran 
spamassassin -d --lint (no prob found), then sent from a Hotmail account 
the GTUBE string. The only injected headers were:

X-Spam-Status: Yes, hits=1005.4 required=5.0
X-Spam-Level: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Even my X-Spam-Status header is the default, not the string I specified. 
Lint'ing my config files as root shows SA is checking these for 
validity, but is it picking up my local.cf in actuality? 
(/etc/mail/spamassassin/local.cf is 644).

Re: add_header in 3.0.2 not working

Posted by Andy Jezierski <aj...@stepan.com>.
Roger WJ Alterskjær <ro...@vm.ntnu.no> wrote on 01/17/2005 
10:27:20 AM:

> Matt Kettler wrote:
> 
> > At 09:53 AM 1/17/2005, Roger WJ Alterskjær wrote:
> >
> >> I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to 
> >> get the add_header option working. Before I start: RH9, SA 3.0.2, 
> >> spamd -d -c -m5 -u qscand, spamc called by qmail-scanner 1.24.
> >>
[snip]
> 
> I'm trying to get the additional info on what tests were 'plinged' when
> run through SA. With 2.64 I was able to get these reports when a message 

> was marked as spam.(the old X-Spam-Report which is now disabled in 3.0)
> Like this:
> X-Spam-Report:
>         *  0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is unknown 
to us
>         *  0.1 HTML_MESSAGE BODY: HTML included in message
[snip]

Try add_header spam Report _REPORT_

Or if you want a brief version without the descriptions try  add_header 
spam report _TESTS(,)  or for a brief version with scores added add_header 
spam report _TESTSSCORES(,)

Andy

Re: add_header in 3.0.2 not working

Posted by Roger WJ Alterskjær <ro...@vm.ntnu.no>.
Matt Kettler wrote:

> At 09:53 AM 1/17/2005, Roger WJ Alterskjær wrote:
>
>> I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to 
>> get the add_header option working. Before I start: RH9, SA 3.0.2, 
>> spamd -d -c -m5 -u qscand, spamc called by qmail-scanner 1.24.
>>
>> In /etc/mail/spamassassin/local.cf I've got:
>>
>> add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ 
>> tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
>>
>> And yet I still get the default short report. I've been working on 
>> this for a few days and can't seem to wrap my head around this...
>
>
> Erm, define "default short report"... That setting above matches the 
> defaults EXACTLY. Thus, I would not expect SA's behavior to change at 
> all from this setting.
>
> What, exactly, are you trying to change about messages that SA has 
> touched?

Hehehe... yeah, I should define that a little better. By default we get
something that translates to:

add_header all Status _YESNO_, score=_SCORE_ required=_REQD_

I'm trying to get the additional info on what tests were 'plinged' when
run through SA. With 2.64 I was able to get these reports when a message 
was marked as spam.(the old X-Spam-Report which is now disabled in 3.0)
Like this:
X-Spam-Report:
        *  0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is unknown to us
        *  0.1 HTML_MESSAGE BODY: HTML included in message
        *  5.4 BAYES_99 BODY: Bayesian spam probability is 99 to 100%
        *      [score: 1.0000]
        *  0.3 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
        *  0.6 HTML_FONT_INVISIBLE BODY: HTML font color is same as
background
        *  4.0 OB_URI_RBL URI's domain appears in OB database at
ob.surbl.org
        *      [www.xxxxxx.xxx is blacklisted in URI RBL at]
        [ob.surbl.org]
        *  4.0 BILLSTEARNS_URI_RBL URI's domain appears in Bill Stearns'
database at ws.surbl.org
        *      [www.xxxxxx.xxx is blacklisted in URI RBL at]
        [ws.surbl.org]
        *  0.1 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address
in URL
        *  1.6 MISSING_MIMEOLE Message has X-MSMail-Priority, but no
X-MimeOLE
        *  0.1 MISSING_OUTLOOK_NAME Message looks like Outlook, but isn't


Re: add_header in 3.0.2 not working

Posted by Matt Kettler <mk...@comcast.net>.
At 09:53 AM 1/17/2005, Roger WJ Alterskjær wrote:
>I've recently upgraded SA from 2.64 to 3.0.2 and now can't seem to get the 
>add_header option working. Before I start: RH9, SA 3.0.2, spamd -d -c -m5 
>-u qscand, spamc called by qmail-scanner 1.24.
>
>In /etc/mail/spamassassin/local.cf I've got:
>
>add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ 
>autolearn=_AUTOLEARN_ version=_VERSION_
>
>And yet I still get the default short report. I've been working on this 
>for a few days and can't seem to wrap my head around this...

Erm, define "default short report"... That setting above matches the 
defaults EXACTLY. Thus, I would not expect SA's behavior to change at all 
from this setting.

What, exactly, are you trying to change about messages that SA has touched?