You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David Jones <dj...@ena.com> on 2018/01/19 14:27:10 UTC

Re: Autolearn says it learned but dump magic stays at zero

On 01/19/2018 08:12 AM, Heiler Bemerguy wrote:
> Hi guys,
> 
> I'm new to the list so pardon any stupidity I may say.. lol
> 
> I'm using SpamAssassin 3.4.1 with Postfix 3.1.6 on Debian 9.
> 
>     ii  spamassassin *3.4.1-6+deb9u1 * all          Perl-based spam
>     filter using text analysis
> 
> local.cf:
> 
>     use_bayes 1
>     bayes_auto_learn 1
>     bayes_auto_learn_threshold_nonspam      -1.0
>     bayes_auto_learn_threshold_spam 3.0
>     bayes_auto_expire 1
> 
> I had cleared bayes database with --clear some days ago and had 
> restarted spamassassin service. Today I saw some autolearning on 
> mail.log, but all the "dump magic" values are still 0
> 
> see: *spamd: result: Y 8 - 
> DEAR_FRIEND,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,LOTS_OF_MONEY,MONEY_FRAUD_5,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SUBJ_ALL_CAPS,TRACKER_ID,T_DKIM_INVALID,T_HK_NAME_FM_MR_MRS 
> scantime=7.1,size=4797,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=36112,mid=<CA...@mail.gmail.com>,autolearn=spam 
> autolearn_force=no,shortcircuit=no*
> 
> and: *spamd: result: . -5 - 
> MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL 
> scantime=6.8,size=8775,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=45058,mid=<15...@spamassassin.apache.org>,autolearn=ham 
> autolearn_force=no,shortcircuit=no*
> 
> BUT:
> 
> root@mailer:~# sa-learn --dump magic
> 0.000          0          3          0  non-token data: bayes db version
> 0.000          0          0          0  non-token data: nspam
> 0.000          0          0          0  non-token data: nham
> 0.000          0          0          0  non-token data: ntokens
> 0.000          0          0          0  non-token data: oldest atime
> 0.000          0          0          0  non-token data: newest atime
> 0.000          0          0          0  non-token data: last journal 
> sync atime
> 0.000          0          0          0  non-token data: last expiry atime
> 0.000          0          0          0  non-token data: last expire 
> atime delta
> 0.000          0          0          0  non-token data: last expire 
> reduction count
> 
> I think most numbers should be non-zero, right? Why it seems to be not 
> storing what it learned?
> 
> Any comments will be appreciated.
> 
> 
> -- 
> Atenciosamente / Best Regards,
> 
> Heiler Bemerguy
> Network Manager - CINBESA
> 55 91 98151-4894/3184-1751
> 

What Bill Cole said plus make sure you are running your commands as the 
same user as the spamd "glue" that is calling/launching SpamAssassin. 
Normally this is the best way to make sure you are using the same 
configuration as the "glue" -- spamd in this case so maybe this is the 
postfix user.  I have never used spamd so I don't know for sure.

# ps -elf | grep spamd

-- 
David Jones

Re: Autolearn says it learned but dump magic stays at zero

Posted by David Jones <dj...@ena.com>.
On 01/19/2018 08:56 AM, Heiler Bemerguy wrote:
> 
> Em 19/01/2018 11:27, David Jones escreveu:
>> On 01/19/2018 08:12 AM, Heiler Bemerguy wrote:
>>> Hi guys,
>>>
>>> I'm new to the list so pardon any stupidity I may say.. lol
>>>
>>> I'm using SpamAssassin 3.4.1 with Postfix 3.1.6 on Debian 9.
>>>
>>>     ii  spamassassin *3.4.1-6+deb9u1 * all          Perl-based spam
>>>     filter using text analysis
>>>
>>> local.cf:
>>>
>>>     use_bayes 1
>>>     bayes_auto_learn 1
>>>     bayes_auto_learn_threshold_nonspam      -1.0
>>>     bayes_auto_learn_threshold_spam 3.0
>>>     bayes_auto_expire 1
>>>
>>> I had cleared bayes database with --clear some days ago and had 
>>> restarted spamassassin service. Today I saw some autolearning on 
>>> mail.log, but all the "dump magic" values are still 0
>>>
>>> see: *spamd: result: Y 8 - 
>>> DEAR_FRIEND,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,LOTS_OF_MONEY,MONEY_FRAUD_5,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SUBJ_ALL_CAPS,TRACKER_ID,T_DKIM_INVALID,T_HK_NAME_FM_MR_MRS 
>>> scantime=7.1,size=4797,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=36112,mid=<CA...@mail.gmail.com>,autolearn=spam 
>>> autolearn_force=no,shortcircuit=no*
>>>
>>> and: *spamd: result: . -5 - 
>>> MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL 
>>> scantime=6.8,size=8775,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=45058,mid=<15...@spamassassin.apache.org>,autolearn=ham 
>>> autolearn_force=no,shortcircuit=no*
>>>
>>> BUT:
>>>
>>> root@mailer:~# sa-learn --dump magic
>>> 0.000          0          3          0  non-token data: bayes db version
>>> 0.000          0          0          0  non-token data: nspam
>>> 0.000          0          0          0  non-token data: nham
>>> 0.000          0          0          0  non-token data: ntokens
>>> 0.000          0          0          0  non-token data: oldest atime
>>> 0.000          0          0          0  non-token data: newest atime
>>> 0.000          0          0          0  non-token data: last journal 
>>> sync atime
>>> 0.000          0          0          0  non-token data: last expiry 
>>> atime
>>> 0.000          0          0          0  non-token data: last expire 
>>> atime delta
>>> 0.000          0          0          0  non-token data: last expire 
>>> reduction count
>>>
>> What Bill Cole said plus make sure you are running your commands as 
>> the same user as the spamd "glue" that is calling/launching 
>> SpamAssassin. Normally this is the best way to make sure you are using 
>> the same configuration as the "glue" -- spamd in this case so maybe 
>> this is the postfix user.  I have never used spamd so I don't know for 
>> sure.
>>
>> # ps -elf | grep spamd
>>
> 
> 
> root@mailer:~# ps -elf | grep spamd
> 5 S root      11629 111283  4  80   0 - 44831 core_s 11:47 ? 00:00:20 
> spamd child
> 4 S postfix   12150    930  0  80   0 - 20808 SyS_ep 11:51 ? 00:00:00 
> pipe -n spamassassin -t unix user=debian-spamd argv=/usr/bin/spamc -f -e 
> /usr/sbin/sendmail -oi -f ${sender} ${recipient}
> 
> 

Don't know for sure but try this:

root@mailer# su - debian-spamd -s /bin/sh

debian-spamd@mailer$ sa-learn --dump magic

See if that has better numbers in the output.

-- 
David Jones

Re: Autolearn says it learned but dump magic stays at zero

Posted by Heiler Bemerguy <he...@cinbesa.com.br>.
Em 19/01/2018 11:27, David Jones escreveu:
> On 01/19/2018 08:12 AM, Heiler Bemerguy wrote:
>> Hi guys,
>>
>> I'm new to the list so pardon any stupidity I may say.. lol
>>
>> I'm using SpamAssassin 3.4.1 with Postfix 3.1.6 on Debian 9.
>>
>>     ii  spamassassin *3.4.1-6+deb9u1 * all          Perl-based spam
>>     filter using text analysis
>>
>> local.cf:
>>
>>     use_bayes 1
>>     bayes_auto_learn 1
>>     bayes_auto_learn_threshold_nonspam      -1.0
>>     bayes_auto_learn_threshold_spam 3.0
>>     bayes_auto_expire 1
>>
>> I had cleared bayes database with --clear some days ago and had 
>> restarted spamassassin service. Today I saw some autolearning on 
>> mail.log, but all the "dump magic" values are still 0
>>
>> see: *spamd: result: Y 8 - 
>> DEAR_FRIEND,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,LOTS_OF_MONEY,MONEY_FRAUD_5,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SUBJ_ALL_CAPS,TRACKER_ID,T_DKIM_INVALID,T_HK_NAME_FM_MR_MRS 
>> scantime=7.1,size=4797,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=36112,mid=<CA...@mail.gmail.com>,autolearn=spam 
>> autolearn_force=no,shortcircuit=no*
>>
>> and: *spamd: result: . -5 - 
>> MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL 
>> scantime=6.8,size=8775,user=debian-spamd,uid=110,required_score=2.3,rhost=::1,raddr=::1,rport=45058,mid=<15...@spamassassin.apache.org>,autolearn=ham 
>> autolearn_force=no,shortcircuit=no*
>>
>> BUT:
>>
>> root@mailer:~# sa-learn --dump magic
>> 0.000          0          3          0  non-token data: bayes db version
>> 0.000          0          0          0  non-token data: nspam
>> 0.000          0          0          0  non-token data: nham
>> 0.000          0          0          0  non-token data: ntokens
>> 0.000          0          0          0  non-token data: oldest atime
>> 0.000          0          0          0  non-token data: newest atime
>> 0.000          0          0          0  non-token data: last journal 
>> sync atime
>> 0.000          0          0          0  non-token data: last expiry 
>> atime
>> 0.000          0          0          0  non-token data: last expire 
>> atime delta
>> 0.000          0          0          0  non-token data: last expire 
>> reduction count
>>
> What Bill Cole said plus make sure you are running your commands as 
> the same user as the spamd "glue" that is calling/launching 
> SpamAssassin. Normally this is the best way to make sure you are using 
> the same configuration as the "glue" -- spamd in this case so maybe 
> this is the postfix user.  I have never used spamd so I don't know for 
> sure.
>
> # ps -elf | grep spamd
>


root@mailer:~# ps -elf | grep spamd
5 S root      11629 111283  4  80   0 - 44831 core_s 11:47 ?        
00:00:20 spamd child
4 S postfix   12150    930  0  80   0 - 20808 SyS_ep 11:51 ?        
00:00:00 pipe -n spamassassin -t unix user=debian-spamd 
argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}


-- 
Atenciosamente / Best Regards,

Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751