You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by sa...@hamla.org on 2004/10/07 22:35:07 UTC

score changes in local.cf not recognized.

I am running Postfix 2.1 with a content_filter (latest amavisd-new) which sends
all mail through SA 2.64.  I understand *some* variables that are defined
explicitly in amavisd-new are "special", and thus have no effect when defined
(differently) in local.cf.  AFAIK, scores are not included in this restriction.
 I will ask on the amavis list, but in case I'm experiencing another pitfall or
screwing up the syntax, here goes:

I set "score RCVD_IN_BL_SPAMCOP_NET 5.000" in local.cf and noticed incoming spam
still tags such emails with a score of 2.2.  Is there anything else I should
check before assuming this is an external, non-SA issue?

--
Sahil Tandon


Re: score changes in local.cf not recognized.

Posted by snowjack <sn...@fastmail.fm>.
Sahil Tandon wrote:
 >
> snowjack wrote:
>> Is there any evidence that local.cf is getting read at all?
> 
> Good question.  Where do I look for such evidence?  Logs are hardly 
> revealing.

If you first log in, or su to be the user amavis is running as, then run 
"spamassassin -D --lint" you should see something like this:
debug: using "/etc/spamassassin" for site rules dir
debug: using "/home/amavis/.spamassassin" for user state dir
debug: using "/home/amavis/.spamassassin/user_prefs" for user prefs file
debug: using "/home/amavis/.spamassassin" for user state dir
One of those directories should contain your local.cf, and make sure 
there isn't a rule in one of those user directories that can override 
what's in the system local.cf.

Try setting up a rule of your own in local.cf, restart amavis, and then 
send yourself a test message containing that exact text to see if it 
hits (from Hotmail or somewhere else if necessary):
full      TEST_RULE /Testing if local.cf is being read/i
describe  TEST_RULE Test message for local.cf
score     TEST_RULE .01



Re: score changes in local.cf not recognized.

Posted by sa...@hamla.org.
Quoting Volker Kindermann <ml...@ps102.de>:

> if you are running postfix,amavisd-new and spamassassin chrooted be sure to
> not only change /etc/mail/spamassassin/local.cf but also
> <chroot>/etc/mail/spamassassin/local.cf

I'm not running within a chroot; the cf is in /usr/local/etc/mail/spamassassin.

--
Sahil Tandon



Re: score changes in local.cf not recognized.

Posted by Volker Kindermann <ml...@ps102.de>.
> > Is there any evidence that local.cf is getting read at all?
> 
> Good question.  Where do I look for such evidence?  Logs are hardly 
> revealing.

if you are running postfix,amavisd-new and spamassassin chrooted be sure to not only change /etc/mail/spamassassin/local.cf but also <chroot>/etc/mail/spamassassin/local.cf

 -volker

Re: score changes in local.cf not recognized.

Posted by Sahil Tandon <sa...@hamla.org>.
snowjack wrote:

> Is there any evidence that local.cf is getting read at all?

Good question.  Where do I look for such evidence?  Logs are hardly 
revealing.

--
Sahil Tandon

Re: score changes in local.cf not recognized.

Posted by snowjack <sn...@fastmail.fm>.
sahil@hamla.org wrote:
> Quoting snowjack <sn...@fastmail.fm>:
> 
>>...Did you restart amavisd-new after making the change?
> 
> Yes. :-)

Is there any evidence that local.cf is getting read at all?

Re: score changes in local.cf not recognized.

Posted by sa...@hamla.org.
Quoting snowjack <sn...@fastmail.fm>:

> ...Did you restart amavisd-new after making the change?

Yes. :-)

--
Sahil Tandon




Re: score changes in local.cf not recognized.

Posted by Sahil Tandon <sa...@hamla.org>.
Keith Hackworth wrote:

> I have the same configuration and I had the same problem with 2.64.  I did
> a spamassassin --lint and it showed me all sorts of problems in my
> local.cf.  It was so bad, it just ignored anything beyond x lines in the
> file.

spamassassin --lint created a "sample" user_prefs file in 
/root/.spamassassin/.  I added my rules (making sure to follow the 
space/tab guidelines) which, to be sure, were already in 
/usr/local/etc/mail/spamassassin/local.cf; and after restarting 
amavisd-new, all is well.

Although everything is working, I'm still a little confused.  Why didn't 
--lint complain at all?  Why weren't the extra score changes not adopted 
when listed in local.cf, but are now adopted when listed in user_prefs?

--
Sahil Tandon

Re: score changes in local.cf not recognized.

Posted by sa...@hamla.org.
Quoting Keith Hackworth <ke...@rpemail.com>:

> I have the same configuration and I had the same problem with 2.64.  I did
> a spamassassin --lint and it showed me all sorts of problems in my
> local.cf.  It was so bad, it just ignored anything beyond x lines in the
> file.

Very plausible - I'll try lint tonight.

> If this IS your problem and you want a copy of my script, let me know -
> you're welcome to use it.

Thanks.  I'll get back after confirming I have the same problem.

--
Sahil Tandon

Re: score changes in local.cf not recognized.

Posted by Keith Hackworth <ke...@rpemail.com>.
I have the same configuration and I had the same problem with 2.64.  I did
a spamassassin --lint and it showed me all sorts of problems in my
local.cf.  It was so bad, it just ignored anything beyond x lines in the
file.

I'm not sure why, but my install of sa was VERY picky about spacing in the
file.  I HAD to use this format:
score<single space>RULE<TAB>score

If I use multiple spaces, no tab or anything other than that, it ingores
that rule.  I had so many problems, I eventually wrote a script that
cleans the local.cf for me automatically - I just run it after modifying
my file and it does all the restarts necessary.

If this IS your problem and you want a copy of my script, let me know -
you're welcome to use it.

Keith


> sahil@hamla.org wrote:
>> I am running Postfix 2.1 with a content_filter (latest amavisd-new)
>> which sends
>> all mail through SA 2.64.  I understand *some* variables that are
>> defined
>> explicitly in amavisd-new are "special", and thus have no effect when
>> defined
>> (differently) in local.cf.  AFAIK, scores are not included in this
>> restriction.
>>  I will ask on the amavis list, but in case I'm experiencing another
>> pitfall or
>> screwing up the syntax, here goes:
>>
>> I set "score RCVD_IN_BL_SPAMCOP_NET 5.000" in local.cf and noticed
>> incoming spam
>> still tags such emails with a score of 2.2.  Is there anything else I
>> should
>> check before assuming this is an external, non-SA issue?
>
> ...Did you restart amavisd-new after making the change?
>
>



Re: score changes in local.cf not recognized.

Posted by snowjack <sn...@fastmail.fm>.
sahil@hamla.org wrote:
> I am running Postfix 2.1 with a content_filter (latest amavisd-new) which sends
> all mail through SA 2.64.  I understand *some* variables that are defined
> explicitly in amavisd-new are "special", and thus have no effect when defined
> (differently) in local.cf.  AFAIK, scores are not included in this restriction.
>  I will ask on the amavis list, but in case I'm experiencing another pitfall or
> screwing up the syntax, here goes:
> 
> I set "score RCVD_IN_BL_SPAMCOP_NET 5.000" in local.cf and noticed incoming spam
> still tags such emails with a score of 2.2.  Is there anything else I should
> check before assuming this is an external, non-SA issue?

...Did you restart amavisd-new after making the change?


Re: score changes in local.cf not recognized.

Posted by Andy Jezierski <aj...@stepan.com>.



sahil@hamla.org wrote on 10/07/2004 03:35:07 PM:

> I am running Postfix 2.1 with a content_filter (latest amavisd-new) which
sends
> all mail through SA 2.64.  I understand *some* variables that are defined
> explicitly in amavisd-new are "special", and thus have no effect when
defined
> (differently) in local.cf.  AFAIK, scores are not included in this
restriction.
>  I will ask on the amavis list, but in case I'm experiencing another
pitfall or
> screwing up the syntax, here goes:
>
> I set "score RCVD_IN_BL_SPAMCOP_NET 5.000" in local.cf and noticed
incoming spam
> still tags such emails with a score of 2.2.  Is there anything else I
should
> check before assuming this is an external, non-SA issue?
>
> --
> Sahil Tandon
>

Did you restart amavisd-new after making the score change?

Andy