Mailing List Archive

add_header in local.cf ignored?
Hello,

I have added the following line in /etc/mail/spamassassin/local.cf :

add_header all Level _STARS(*)_

and when a message is recieved (either spam or ham) the header isn't
there. I have also noticed that there are missing default headers in
X-Spam-Status. I have only these values :

X-Spam-Status No, hits=-4.9 required=2.5

According to "man Mail::SpamAssassin:Conf" I should see more values in
X-Spam-Status or not?

I'm using SA 2.63, netqmail-1.04, clamav 0.67-1 on RH 7.3.

Thanks for any info and have a nice day.

Greetings from Slovenija,

Andrej.
Re: add_header in local.cf ignored? [ In reply to ]
On Sat, 21 Feb 2004 14:49:19 +0100, Andrej T. wrote:

>Hello,
>
>I have added the following line in /etc/mail/spamassassin/local.cf :
>
>add_header all Level _STARS(*)_
>
>and when a message is recieved (either spam or ham) the header isn't
>there. I have also noticed that there are missing default headers in
>X-Spam-Status. I have only these values :
>
>X-Spam-Status No, hits=-4.9 required=2.5
>
>According to "man Mail::SpamAssassin:Conf" I should see more values in
>X-Spam-Status or not?

Perhaps you have some conflicting directives in your user_prefs, which
is evaluated after local.cf
Re: add_header in local.cf ignored? [ In reply to ]
Jon Etkins wrote:
> On Sat, 21 Feb 2004 14:49:19 +0100, Andrej T. wrote:
>
>
>>Hello,
>>
>>I have added the following line in /etc/mail/spamassassin/local.cf :
>>
>>add_header all Level _STARS(*)_
>>
>>and when a message is recieved (either spam or ham) the header isn't
>>there. I have also noticed that there are missing default headers in
>>X-Spam-Status. I have only these values :
>>
>>X-Spam-Status No, hits=-4.9 required=2.5
>>
>>According to "man Mail::SpamAssassin:Conf" I should see more values in
>>X-Spam-Status or not?
>
>
> Perhaps you have some conflicting directives in your user_prefs, which
> is evaluated after local.cf

Hello Jon,

I have no user_prefs files on my system because I do all system wide.
Any other ideas maybe? How to diagnose these problem further?

Greetings from Slovenija,

Andrej.
Re: add_header in local.cf ignored? [ In reply to ]
Jon Etkins wrote:
> On Sat, 21 Feb 2004 14:49:19 +0100, Andrej T. wrote:
>
>
>>Hello,
>>
>>I have added the following line in /etc/mail/spamassassin/local.cf :
>>
>>add_header all Level _STARS(*)_
>>
>>and when a message is recieved (either spam or ham) the header isn't
>>there. I have also noticed that there are missing default headers in
>>X-Spam-Status. I have only these values :
>>
>>X-Spam-Status No, hits=-4.9 required=2.5
>>
>>According to "man Mail::SpamAssassin:Conf" I should see more values in
>>X-Spam-Status or not?
>
>
> Perhaps you have some conflicting directives in your user_prefs, which
> is evaluated after local.cf

Hello Jon,

I have no user_prefs files on my system because I do all system wide.
Any other ideas maybe? How to diagnose these problem further?

Greetings from Slovenija,

Andrej.
Re: add_header in local.cf ignored? [ In reply to ]
On Sun, 22 Feb 2004 11:17:02 +0100, Andrej T. wrote:

>I have no user_prefs files on my system because I do all system wide.
>Any other ideas maybe? How to diagnose these problem further?

Weird, it certainly seems that something is overwriting your
directives. Or maybe they're not being picked up at all. Try
spamassassin -D --lint
and check that it's getting its configuration directives from the files
that you are expecting:
debug: using "D:\Perl/share/spamassassin" for default rules dir
debug: using "D:\Perl/etc/mail/spamassassin" for site rules dir
debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
state dir
debug: using "C:\Documents and Settings\Jon/.spamassassin/user_prefs"
for user prefs file
debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
state dir

Other than that, I'm fresh out of ideas.

Good luck,
Jon.
Re: add_header in local.cf ignored? [ In reply to ]
Jon Etkins wrote:
>
> Weird, it certainly seems that something is overwriting your
> directives. Or maybe they're not being picked up at all. Try
> spamassassin -D --lint
> and check that it's getting its configuration directives from the files
> that you are expecting:
> debug: using "D:\Perl/share/spamassassin" for default rules dir
> debug: using "D:\Perl/etc/mail/spamassassin" for site rules dir
> debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
> state dir
> debug: using "C:\Documents and Settings\Jon/.spamassassin/user_prefs"
> for user prefs file
> debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
> state dir
>
> Other than that, I'm fresh out of ideas.

tail /var/log/maillog says :

Feb 23 09:41:39 linux spamd[23695]: debug: using
"/usr/share/spamassassin" for default rules dir
Feb 23 09:41:40 linux spamd[23695]: debug: using
"/etc/mail/spamassassin" for site rules dir

I think that /etc/mail/spamassassin/local.cf is getting read because I
have this directive in it and is it's getting read :

required_hits 2.5

I'm out of ideas too. Can someone else help please?

Greetings,

Andrej.
Re: add_header in local.cf ignored? [ In reply to ]
On Mon, 23 Feb 2004, Andrej T. wrote:

> Jon Etkins wrote:
> >
> > Weird, it certainly seems that something is overwriting your
> > directives. Or maybe they're not being picked up at all. Try
> > spamassassin -D --lint
> > and check that it's getting its configuration directives from the files
> > that you are expecting:
> > debug: using "D:\Perl/share/spamassassin" for default rules dir
> > debug: using "D:\Perl/etc/mail/spamassassin" for site rules dir
> > debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
> > state dir
> > debug: using "C:\Documents and Settings\Jon/.spamassassin/user_prefs"
> > for user prefs file
> > debug: using "C:\Documents and Settings\Jon/.spamassassin" for user
> > state dir
> >
> > Other than that, I'm fresh out of ideas.
>
> tail /var/log/maillog says :
>
> Feb 23 09:41:39 linux spamd[23695]: debug: using
> "/usr/share/spamassassin" for default rules dir
> Feb 23 09:41:40 linux spamd[23695]: debug: using
> "/etc/mail/spamassassin" for site rules dir
>
> I think that /etc/mail/spamassassin/local.cf is getting read because I
> have this directive in it and is it's getting read :
>
> required_hits 2.5
>
> I'm out of ideas too. Can someone else help please?

we are using sendmail/miltrassassin/spamd. and add_header wont work here
too, because sendmail, instructed by miltrassassin (depends on options
[C]eck [S]ymbols or [R]eport) is writing the header not spamd itself.
so depending on your configuration the behavior of those local.cf options
might differ from other configs.

regards,
Matthias
Re: add_header in local.cf ignored? [ In reply to ]
Matthias Fuhrmann wrote:
>
> we are using sendmail/miltrassassin/spamd. and add_header wont work here
> too, because sendmail, instructed by miltrassassin (depends on options
> [C]eck [S]ymbols or [R]eport) is writing the header not spamd itself.
> so depending on your configuration the behavior of those local.cf options
> might differ from other configs.

Well I forgot to mentione that I'm also using qmail-scanner-1.20. I run
a spam message throu spamc and I can see the headers :


Received: from localhost by linux.nomadoblak.com
with SpamAssassin (2.63 2004-01-11);
Mon, 23 Feb 2004 14:19:24 +0100
From: Kennedy 18 <Kennedy@electronicmailpromotions.org>
To: undisclosed-recipients: ;
Subject: SPAM *** HIGH * [ADULT] Young Kennedy takes on 2
Date: Sun, 22 Feb 2004 19:25:36 -0500
Message-Id: <20040222.6FC486@electronicmailpromotions.org>
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
linux.nomadoblak.com
X-Spam-Status: Yes, hits=8.6 required=2.5 tests=BAYES_99,HTML_70_80,
HTML_FONT_BIG,HTML_IMAGE_ONLY_06,HTML_IMAGE_RATIO_10,HTML_MESSAGE,

MIME_HTML_NO_CHARSET,MIME_HTML_ONLY,NORMAL_HTTP_TO_IP,UPPERCASE_50_75
autolearn=no version=2.63
X-Spam-Level: ********
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_4039FDDC.8F78D330"

This is a multi-part message in MIME format.

------------=_4039FDDC.8F78D330
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Spam detection software, running on the system "linux.nomadoblak.com", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
root@nomadoblak.com for details.

[...]


So I guess that SA is running correctly and doesn't strip the headers,
or? Maybe someone else here had the same problem? I have posted this
problem to qmail-scannermailinglist and we'll see if I get an answer.

Greetings from Slovenija,

Andrej.
Re: add_header in local.cf ignored? [ In reply to ]
On Mon, 23 Feb 2004, Andrej T. wrote:

> Matthias Fuhrmann wrote:
> >
> > we are using sendmail/miltrassassin/spamd. and add_header wont work here
> > too, because sendmail, instructed by miltrassassin (depends on options
> > [C]eck [S]ymbols or [R]eport) is writing the header not spamd itself.
> > so depending on your configuration the behavior of those local.cf options
> > might differ from other configs.
>
> Well I forgot to mentione that I'm also using qmail-scanner-1.20. I run
> a spam message throu spamc and I can see the headers :
[...]

well, maybe this scanner behaves the same way, as miltrassassin does.

>
> Spam detection software, running on the system "linux.nomadoblak.com", has
> identified this incoming email as possible spam. The original message
> has been attached to this so you can view it (if it isn't spam) or block
> similar future email. If you have any questions, see
> root@nomadoblak.com for details.
>
> [...]
>
>
> So I guess that SA is running correctly and doesn't strip the headers,
> or? Maybe someone else here had the same problem? I have posted this
> problem to qmail-scannermailinglist and we'll see if I get an answer.

worth a try :)

regards,
Matthias
RE: add_header in local.cf ignored? [ In reply to ]
> I have added the following line in /etc/mail/spamassassin/local.cf :
>
> add_header all Level _STARS(*)_
>
> and when a message is recieved (either spam or ham) the
> header isn't there. I have also noticed that there are
> missing default headers in X-Spam-Status. I have only these values :
>
> X-Spam-Status No, hits=-4.9 required=2.5
>
> According to "man Mail::SpamAssassin:Conf" I should see more
> values in X-Spam-Status or not?

It depends. Different information is included for spam and nonspam
messages.

1. Make sure if you have a "report_safe" option that it comes before
anything that modified the header options.

2. You don't need to do the add_header for Lever as it is the default.

I run mine a little differently as I like the scoring separate from the
tests:

clear_headers
add_header all Level _STARS(+)_
add_header all Score _HITS_
add_header all Tests "tests=_TESTSSCORES_;autolearn=_AUTOLEARN_"
remove_header all Report

Then I base my spam rules on X-Spam-Level.

Bret


>
> I'm using SA 2.63, netqmail-1.04, clamav 0.67-1 on RH 7.3.
>
> Thanks for any info and have a nice day.
>
> Greetings from Slovenija,
>
> Andrej.
>
Re: add_header in local.cf ignored? [ In reply to ]
Bret Miller wrote:
>
> It depends. Different information is included for spam and nonspam
> messages.
>
> 1. Make sure if you have a "report_safe" option that it comes before
> anything that modified the header options.
>
> 2. You don't need to do the add_header for Lever as it is the default.
>
> I run mine a little differently as I like the scoring separate from the
> tests:
>
> clear_headers
> add_header all Level _STARS(+)_
> add_header all Score _HITS_
> add_header all Tests "tests=_TESTSSCORES_;autolearn=_AUTOLEARN_"
> remove_header all Report
>
> Then I base my spam rules on X-Spam-Level.

The problem was in my configuration of the qmail-scanner. For a solution
please see the post at
http://sourceforge.net/mailarchive/forum.php?thread_id=3884123&forum_id=4330.

Thanks to all who helped!

Greetings from Slovenija,

Andrej.