You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Don Levey <sp...@the-leveys.us> on 2006/01/16 17:00:33 UTC

Autolearn: works from command-line, not via milter

I just moved/upgraded my home server this weekend, leading to less hair on
my head and more ulcers elsewhere. While I've worked my way through many
problems in the past few days, this one seems to be eluding me and googling,
archives, etc haven't yet helped me.  Here's the scoop:

Messages coming in and autoscanned via spamass-milter/spamd all fail
autolearn.  To pick one example from this list (full headers available if it
will help):


X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00 autolearn=failed
	version=3.0.4
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
	davinci.the-leveys.us
Status: O
X-UID: 7374
Content-Length: 570
X-Keywords:


Running the same message through "spamassassin -D --mbox < msgfile" result
in the following:


X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
	davinci.the-leveys.us
X-Spam-Level:
X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
	version=3.0.4


So clearly two different things are happening here.  The full text of the
above didn't seem to have any errors, nor do I see any running
"spamassassin --lint -D".  I am getting one interesting line in my maillog
file:


Jan 16 10:49:28 davinci sendmail[29241]: k0GFnSqe029241: SYSERR(sa-milt):
hash map "Alias0": unsafe map file /etc/aliases.db: Permission denied


and this seems to lead to:

Jan 16 10:49:29 davinci spamd[27845]: handle_user: unable to find user
'user'!
Jan 16 10:49:29 davinci spamd[27845]: processing message <msg> for user:515.


I've deleted and recreated my alias database (/etc/aliases ->
/etc/aliases.db) but permissions are the same.  Interestingly, 'user' should
be an alias to an account which is uid 515, and in group gid 515, but I'm
not seeing the match here.

Any suggestions on what to check next?

Thanks in advance,
 -Don

Re: Autolearn: works from command-line, not via milter

Posted by Jim Maul <jm...@elih.org>.
Don Levey wrote:
> Don Levey wrote:
>> Don Levey wrote:
>>> Jim Maul wrote:
>>>> Failed means it didnt work for some reason.  No means it simply
>>>> didnt even try to autolearn (score wasnt high enough, spam/ham
>>>> threshold not reached, etc.)  In short, failed points to a
>>>> potential problem, whereas no doesnt.
>>>>
>>>> -Jim
>>> That I understood; I'm mentioning the "no" because that means the
>>> autolearn is functioning in at least some cases.  The only
>>> differences I'm seeing between the failure and functioning cases are
>>> the actual spam scores.  Those with "autolearn=no" seem to score at
>>> least -3.7 or higher, while the "autolearn=failed" show up as -4.8 or
>>>  -4.9. -Don
>> Whoops, spoke too soon.  I see an "autolearn=no" with -4.8, and
>> "autolearn=failed" with -2.1, so it's not a problem with a certain
>> score cutoff, or (from what I can tell) specific rules hits.  I'm
>> checking logs again...
>>
>> Thanks!
>>  -Don
> 
> I think I may have it, though it's a little too soon to tell.
> The permissions on the Bayes DB files were just fine, and owned by the SA
> ID.  The permissions on the directory housing those files were OK - but the
> owner was not.  I feel a bit stupid for not having checked this when I
> looked at the rest, but it seems to be working now.
>  -Don
> 
> 

Well im glad its working now.  Sometimes all you need to solve the 
problem is to tell someone else about it.  Gets you thinking differently...

-Jim

RE: Autolearn: works from command-line, not via milter

Posted by Don Levey <sp...@the-leveys.us>.
Don Levey wrote:
> Don Levey wrote:
>> Jim Maul wrote:
>>>
>>> Failed means it didnt work for some reason.  No means it simply
>>> didnt even try to autolearn (score wasnt high enough, spam/ham
>>> threshold not reached, etc.)  In short, failed points to a
>>> potential problem, whereas no doesnt.
>>>
>>> -Jim
>>
>> That I understood; I'm mentioning the "no" because that means the
>> autolearn is functioning in at least some cases.  The only
>> differences I'm seeing between the failure and functioning cases are
>> the actual spam scores.  Those with "autolearn=no" seem to score at
>> least -3.7 or higher, while the "autolearn=failed" show up as -4.8 or
>>  -4.9. -Don
>
> Whoops, spoke too soon.  I see an "autolearn=no" with -4.8, and
> "autolearn=failed" with -2.1, so it's not a problem with a certain
> score cutoff, or (from what I can tell) specific rules hits.  I'm
> checking logs again...
>
> Thanks!
>  -Don

I think I may have it, though it's a little too soon to tell.
The permissions on the Bayes DB files were just fine, and owned by the SA
ID.  The permissions on the directory housing those files were OK - but the
owner was not.  I feel a bit stupid for not having checked this when I
looked at the rest, but it seems to be working now.
 -Don

RE: Autolearn: works from command-line, not via milter

Posted by Don Levey <sp...@the-leveys.us>.
Don Levey wrote:
> Jim Maul wrote:
>>
>> Failed means it didnt work for some reason.  No means it simply didnt
>> even try to autolearn (score wasnt high enough, spam/ham threshold
>> not reached, etc.)  In short, failed points to a potential problem,
>> whereas no doesnt.
>>
>> -Jim
>
> That I understood; I'm mentioning the "no" because that means the
> autolearn is functioning in at least some cases.  The only
> differences I'm seeing between the failure and functioning cases are
> the actual spam scores.  Those with "autolearn=no" seem to score at
> least -3.7 or higher, while the "autolearn=failed" show up as -4.8 or
>  -4.9. -Don

Whoops, spoke too soon.  I see an "autolearn=no" with -4.8, and
"autolearn=failed" with -2.1, so it's not a problem with a certain score
cutoff, or (from what I can tell) specific rules hits.  I'm checking logs
again...

Thanks!
 -Don


RE: Autolearn: works from command-line, not via milter

Posted by Don Levey <sp...@the-leveys.us>.
Jim Maul wrote:
> Don Levey wrote:
>> Don Levey wrote:
>>
>>> Messages coming in and autoscanned via spamass-milter/spamd all fail
>>> autolearn.  To pick one example from this list (full headers
>>> available if it will help):
>>>
>>>
>>> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00
>>> 	autolearn=failed version=3.0.4
>>> X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
>>> davinci.the-leveys.us Status: O
>>> X-UID: 7374
>>> Content-Length: 570
>>> X-Keywords:
>>>
>> ...
>>
>> As a followup: I've noticed that at least *some* messages are coming
>> in with "autolearn=no".  I've not yet found the difference.  -Don
>>
>>
>>
>
> Failed means it didnt work for some reason.  No means it simply didnt
> even try to autolearn (score wasnt high enough, spam/ham threshold not
> reached, etc.)  In short, failed points to a potential problem,
> whereas no doesnt.
>
> -Jim

That I understood; I'm mentioning the "no" because that means the autolearn
is functioning in at least some cases.  The only differences I'm seeing
between the failure and functioning cases are the actual spam scores.  Those
with "autolearn=no" seem to score at least -3.7 or higher, while the
"autolearn=failed" show up as -4.8 or -4.9.
 -Don

Re: Autolearn: works from command-line, not via milter

Posted by Jim Maul <jm...@elih.org>.
Don Levey wrote:
> Don Levey wrote:
> 
>> Messages coming in and autoscanned via spamass-milter/spamd all fail
>> autolearn.  To pick one example from this list (full headers
>> available if it will help):
>>
>>
>> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00
>> 	autolearn=failed version=3.0.4
>> X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
>> 	davinci.the-leveys.us
>> Status: O
>> X-UID: 7374
>> Content-Length: 570
>> X-Keywords:
>>
> ...
> 
> As a followup: I've noticed that at least *some* messages are coming in with
> "autolearn=no".  I've not yet found the difference.
>  -Don
> 
> 
> 

Failed means it didnt work for some reason.  No means it simply didnt 
even try to autolearn (score wasnt high enough, spam/ham threshold not 
reached, etc.)  In short, failed points to a potential problem, whereas 
no doesnt.

-Jim

RE: Autolearn: works from command-line, not via milter

Posted by Don Levey <sp...@the-leveys.us>.
Don Levey wrote:

>
> Messages coming in and autoscanned via spamass-milter/spamd all fail
> autolearn.  To pick one example from this list (full headers
> available if it will help):
>
>
> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00
> 	autolearn=failed version=3.0.4
> X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
> 	davinci.the-leveys.us
> Status: O
> X-UID: 7374
> Content-Length: 570
> X-Keywords:
>
...

As a followup: I've noticed that at least *some* messages are coming in with
"autolearn=no".  I've not yet found the difference.
 -Don