You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Andrej T." <an...@linux.nomadoblak.com> on 2004/02/21 14:49:19 UTC

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: Permitting email only from designated domain server

Posted by Dan Bullock <da...@aspitel.com>.
For example, I can whitelist any email from ebay this way:
whitelist_from_rcvd *@ebay.com            ebay.com

But I also want to prevent emails claiming to be from ebay that are not 
from their email servers.  So something like this would be desired:
blacklist_from_rcvd *@ebay.com            ebay.com

So that anything with a from address of *@ebay.com and not from an ebay 
server would get flagged.

The problem is I see no reference that a blacklist_from_rcvd type of tag 
exists in SA and I don't know of another way to accomplish what I want.

Dan



Re: Permitting email only from designated domain server

Posted by Dan Bullock <da...@aspitel.com>.
My explanation wasn't very well.  My intent is to be able to score those 
phishing emails that pretend to be ebay emails and ask for their ebay 
login etc.

All ebay emails should come from an ebay email server. So I want to 
score any email that claims to be from ebay and does not originate from 
an ebay email server.
Does that explain my intent a bit better?

Thanks,
Dan



Matthias Fuhrmann wrote:

> On Sat, 21 Feb 2004, Dan Bullock wrote:
>
>  
>
>> I'd like to prevent or give a high score to any email that has a from
>> address of  *@ebay.com which does not come from an ebay.com email 
>> server.
>>
>> I to do the opposite of what "whitelist_from_rcvd" does.
>>
>> Is this possible in SA?  Does a "blacklist_from_rcvd" function exist?
>>   
>
>
> we here at my domain have many users, using ebay. and i personaly cant
> remember of any spam from ebay so far. so why do you want them to get
> blacklisted anyway?
>
> regards,
> Matthias
>
>
>  
>




Re: Permitting email only from designated domain server

Posted by Matthias Fuhrmann <Ma...@stud.uni-hannover.de>.
On Sat, 21 Feb 2004, Dan Bullock wrote:

>
> I'd like to prevent or give a high score to any email that has a from
> address of  *@ebay.com which does not come from an ebay.com email server.
>
> I to do the opposite of what "whitelist_from_rcvd" does.
>
> Is this possible in SA?  Does a "blacklist_from_rcvd" function exist?

we here at my domain have many users, using ebay. and i personaly cant
remember of any spam from ebay so far. so why do you want them to get
blacklisted anyway?

regards,
Matthias

Permitting email only from designated domain server

Posted by Dan Bullock <da...@aspitel.com>.
I'd like to prevent or give a high score to any email that has a from 
address of  *@ebay.com which does not come from an ebay.com email server.

I to do the opposite of what "whitelist_from_rcvd" does.

Is this possible in SA?  Does a "blacklist_from_rcvd" function exist?

Thanks,
Dan



Re: add_header in local.cf ignored?

Posted by "Andrej T." <an...@linux.nomadoblak.com>.
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?

Posted by Matthias Fuhrmann <Ma...@stud.uni-hannover.de>.
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?

Posted by "Andrej T." <an...@linux.nomadoblak.com>.
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 <Ke...@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: <20...@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?

Posted by Matthias Fuhrmann <Ma...@stud.uni-hannover.de>.
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?

Posted by "Andrej T." <an...@linux.nomadoblak.com>.
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?

Posted by Jon Etkins <ec...@mira.net>.
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?

Posted by "Andrej T." <an...@linux.nomadoblak.com>.
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?

Posted by Jon Etkins <ec...@mira.net>.
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?

Posted by "Andrej T." <an...@linux.nomadoblak.com>.
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.



RE: add_header in local.cf ignored?

Posted by Bret Miller <br...@wcg.org>.
> 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.
>