Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Jared Hall

On 2/17/2023 8:24 PM, joe a wrote:

On 2/17/2023 3:25 PM, joe a wrote:

Did a simple test today sending an email from a gmail account to two 
email accounts on my system.   The only difference was the email 
address, both were on the same "To:" line in the composed messages.


They receive wildly different BAYES scores.

Try rattling off another Gmail message, but this time switch the two 
Email addresses on the "To:" line around. Maybe a case where only the 
first Email address is looked at by SA?


Thanks,

Jared Hall



Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Bill Cole

On 2023-02-17 at 22:41:05 UTC-0500 (Fri, 17 Feb 2023 19:41:05 -0800)
Loren Wilton 
is rumored to have said:


They receive wildly different BAYES scores.
* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
*  [score: 0.0002]
*  2.2 BAYES_20 BODY: Bayes spam probability is 5 to 20%
*  [score: 0.0881]


This looks like you have per-user Bayes databases, and the messaage 
type has been trained differently in each.


Also, it looks like there are per-user rules, since BAYES_50 has a 
normal score of 0.2, and there is no reason BAYES_20 (indicating much 
less spammy) should have a score of 2.2.


Absolutely correct.

However, that does not prove definitively that there are per-user Bayes 
DBs & rules, just that the BAYES_20 score is insane. The difference 
between 8.81% and 00.02% isn't very meaningful. It isn't accidental that 
SA doesn't have finer categories of Bayes scores.



--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Loren Wilton

They receive wildly different BAYES scores.
* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
*  [score: 0.0002]
*  2.2 BAYES_20 BODY: Bayes spam probability is 5 to 20%
*  [score: 0.0881]


This looks like you have per-user Bayes databases, and the messaage type has 
been trained differently in each.


Also, it looks like there are per-user rules, since BAYES_50 has a normal 
score of 0.2, and there is no reason BAYES_20 (indicating much less spammy) 
should have a score of 2.2.




Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread joe a

On 2/17/2023 3:25 PM, joe a wrote:

Did a simple test today sending an email from a gmail account to two 
email accounts on my system.   The only difference was the email 
address, both were on the same "To:" line in the composed messages.


They receive wildly different BAYES scores.
--
X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on myserver
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=4.9 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,
IXHASH_X1,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL
autolearn=disabled version=3.4.5
X-Spam-Report:
* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
*  [score: 0.0002]
--

X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on myserver
X-Spam-Flag: YES
X-Spam-Level: *
X-Spam-Status: Yes, score=5.2 required=4.9 tests=BAYES_20,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,
IXHASH_X1,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL
autolearn=disabled version=3.4.5
X-Spam-Report:
*  2.2 BAYES_20 BODY: Bayes spam probability is 5 to 20%
*  [score: 0.0881]
--

Just another sign of BAYES wackiness? More evidence of need for rebuild?





Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread joe a

On 2/17/2023 11:44 AM, Martin Gregorie wrote:

On Fri, 2023-02-17 at 10:54 -0500, joe a wrote:


Could it have been that simple?


If, like myself, you find reference books useful, you may want to get a
copy of "Linux in a Nutshell" - an O'Reilly book.

It tends to assume you know at least one other OS fairly well, is well
organised and concise. I've also found "Debian Reference"

  http://www.debian.org/doc/manuals/debian-reference/

useful for most flavours of Linux (I use Fedora and Raspbian)

Martin



There was also a "Unix in a Nutshell".  I found it amusing, in my 
NetWare days, to have a copy on my desk and offer it to the Unix-oids 
that meanered in from time to time,  that liked to scoff at "security by 
obscurity" and those "Puny PC's you call Servers".  (That from folks 
that swore sendmail was forever king and operated the email server as an 
open relay).


A bit of an issue when I offered that the book should be called "Nuts, 
in a Unix Shell". . . Ah, the memories . . .





Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Matus UHLAR - fantomas

On Fri, 2023-02-17 at 10:54 -0500, joe a wrote:

Could it have been that simple?


On 17.02.23 16:44, Martin Gregorie wrote:

If, like myself, you find reference books useful, you may want to get a
copy of "Linux in a Nutshell" - an O'Reilly book.

It tends to assume you know at least one other OS fairly well, is well
organised and concise. I've also found "Debian Reference"

 http://www.debian.org/doc/manuals/debian-reference/

useful for most flavours of Linux (I use Fedora and Raspbian)


reading such book is a good idea, but I think this is more a SA bug, @INC 
containing something that references "." or "..", which it should not, and 
which causes perl fail when it can't open directory in @INC.

(and perl has documented this feature iirc).

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #98652: Operation completed successfully.


Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Martin Gregorie
On Fri, 2023-02-17 at 10:54 -0500, joe a wrote:

> Could it have been that simple?
> 
If, like myself, you find reference books useful, you may want to get a
copy of "Linux in a Nutshell" - an O'Reilly book.

It tends to assume you know at least one other OS fairly well, is well
organised and concise. I've also found "Debian Reference"

 http://www.debian.org/doc/manuals/debian-reference/

useful for most flavours of Linux (I use Fedora and Raspbian)

Martin



Re: Disable reporting to Razor while still reporting to Pyzor

2023-02-17 Thread Matus UHLAR - fantomas

On 31.01.23 18:03, spamassassin.us...@ml.karotte.org wrote:

I use spamc -C report to report spam mails. I only want to report them
to Pyzor. How do I disable reporting the mails to Razor (which fails
anyways as I'm not registered)?


looks like it's not configurable.
You can submit a (wishlist) bugreport, and you can also setup razor config.
I recomment doing the latter, if possible.


Also as I see it using spamc -C report also marks the mail as spam in
the bayes database, is this correct? There is no documentation about
this but the code implies that's what happens.


spamc manpage describes -C needs to run spamd with --allow-tell option and 
spamd manpage says it trains bayes DB as long.


note that spamd needs proper permissions to write the database.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Posli tento mail 100 svojim znamim - nech vidia aky si idiot
Send this email to 100 your friends - let them see what an idiot you are


Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread joe a

On 2/17/2023 4:42 AM, Matus UHLAR - fantomas wrote:

On 16.02.23 15:57, joe a wrote:
Re-energized having recently heroically wrestled an elusive issue (to 
me) into surrender . . . we now turn to another issue.


Probably I need to retrain BAYES "From scratch".  I have a mess 
(years?) of stored sample emails that and be relearned.


I understand that sa-learn should be run as the same user as spamd, 
however I find it has always been run as root and when running as the 
spamassassin user results in errors, such as:


~su -c "sa-learn --spam /var/mail/spamd/Cabinet.Missed-SPAM" spamfilter

results in errors, starting with:

plugin: failed to parse plugin (from @INC): Can't locate 
Mail/SpamAssassin/Plugin/SpamCop.pm: 
lib/Mail/SpamAssassin/Plugin/SpamCop.pm: Permission denied at (eval 
44) line 1.


plugin: failed to parse plugin (from @INC): Can't locate 
Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: 
lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: Permission denied 
at (eval 45) line 1.


try first changing current working directory into one readable by user 
"spamfilter", perhaps root (/).




Could it have been that simple?

Yes, apparently it was.

Many thanks.

joe a.


Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread joe a

On 2/17/2023 7:37 AM, Reindl Harald wrote:



Am 16.02.23 um 23:34 schrieb joe a:
I have no idea what you refer to when you state "don't user proper 
packages".  "Proper" in what sense? A rhetorical question.


i have no idea how you installed SA but rpm packages or debs usually 
have correct permissions


Oh, of course.  I installed as root initially, being foolish perhaps


you *must* install software as root because the service *must not* have 
write permissions to it's own binary files


but did create a specific user "later" and adjusted permissions as 
needed.  Or, so I thought


the real question was HOW DID YOU INSTALL it

from the first day i maintained production servers i learnt to build my 
own rpm packages - no matter if it's software written in C, PHP or Perl


why?

* because you get rid of leftover files over the years
* permissions are part of te package
* the package manager dectects many conflicts


One of the first things I learned when assembling things or attempting 
to learn something new, is to follow the instructions and only attempt 
to vary from them once you absolutely understood what your were doing. 
Or, suffer the consequences along with the (rare) accolades for 
improving a process.


That said, I would never "build my own rpm package" in this context.

This is almost entirely a "home/office" system that seems low traffic.

So, I installed postfix and spamassassin initially from the OS vendor 
supplied packages. Over the years I applied updates from outside the OS 
vendor channel, from packages from "authors" sites, as the versions 
diverged enough to be a concern.  There have been some OS updates as 
well and at least one transfer from one VM to another.


All this appears to be digression, to me, the issue, to me, seems to be 
why root sees the stuff in this @INC entity differently from how the SA 
user sees it.


With the insights and pointers gained in this thread, I hope to solve 
that sometime soon.





Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Martin Gregorie
On Thu, 2023-02-16 at 23:32 +0100, hg user wrote:
> root can do anything. a restricted user can't: it's only allowed to do
> what
> others allowed it.
> 
> it also runs with another environment, so it may miss PATHes or @INC
> directories.
> 
You can check this by running 

env | less

from a command line under the appropriate user and making sure that all
the environment variables you expect to see defined are, and have the
values you expect.

Martin




Re: BAYES_00 BODY. Negative score?

2023-02-17 Thread Matus UHLAR - fantomas

On 16.02.23 15:57, joe a wrote:
Re-energized having recently heroically wrestled an elusive issue (to 
me) into surrender . . . we now turn to another issue.


Probably I need to retrain BAYES "From scratch".  I have a mess 
(years?) of stored sample emails that and be relearned.


I understand that sa-learn should be run as the same user as spamd, 
however I find it has always been run as root and when running as the 
spamassassin user results in errors, such as:


~su -c "sa-learn --spam /var/mail/spamd/Cabinet.Missed-SPAM" spamfilter

results in errors, starting with:

plugin: failed to parse plugin (from @INC): Can't locate 
Mail/SpamAssassin/Plugin/SpamCop.pm: 
lib/Mail/SpamAssassin/Plugin/SpamCop.pm: Permission denied at (eval 
44) line 1.


plugin: failed to parse plugin (from @INC): Can't locate 
Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: 
lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: Permission denied 
at (eval 45) line 1.


try first changing current working directory into one readable by user 
"spamfilter", perhaps root (/).


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Despite the cost of living, have you noticed how popular it remains?