On 13.02.23 17:42, joe a wrote:
Have some annoying SPAM that consistently shows a negative score
on BAYES. Is the default scoring or influenced by BAYES in some
way?
*-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
* [score: 0.0000]
On 2/14/2023 2:56 AM, Matus UHLAR - fantomas wrote:
This indicates a mistrained database, which means you have trained
too many spams or spam-like messages (commercial messages) as ham.
Proper training of spams should help. Just keep your spam (and
optionally ham) corpora for retraining in case you would drop the
database.
I also recommend to abstain from training commercial mail (notices
from e-shops, companies you done business with etc) as ham, unless
they generate BAYES_999 score and you want it lower. I often train
them as spam so those give uncertain BAYES_50 result.
Those mails resemble spam too much to be used for training.
On 14.02.23 17:37, joe a wrote:
The term "proper training" has always seemed a bit problematic to me.
That aside, experiencing an error trying attempting:
sa-learn -D --spam /var/mail/spamd/Cabinet.saved-spam
just FYI, there are multiple ways to train:
spamassassin -r < mail
- will train single message as spam.
spamc -C spam < mail
- will tell spamd to train message as spam. spamd must run with -l
(--allow-tell) option to do that
sa-learn --spam mail
- will train single message as
sa-learn --mbox --spam mbox
- will train multiple messages in single file in mbox format.
spamd must run as root with -H option in order to train your own database,
unless you use sql/redis for bayes storage.
when using amavis, spamd is not used and the database is stored under amavis
users' home directory (unless you changed DB to sql/redis).
you can still use spamassassin or sa-learn, but either run it under su/sudo:
su amavisd -c "spamassassin -r" < message
sa-learn --dbpath /var/lib/amavis/.spamassassin/ --mbox --spam mbox
when you scan messages sized over standard 500K, you must also increase size
of trained messages too.
The last line shows:
***************
Learned tokens from 0 message(s) (1 message(s) examined)
ERROR: the Bayes learn function returned an error, please re-run with
-D for more information at /usr/bin/sa-learn line 500.
***************
Which may be permissions related. However, there seem to be some
errors/warning at the beginning, starting with:
***************
Feb 14 17:26:14.956 [2855] dbg: plugin: loading
Mail::SpamAssassin::Plugin::Razo r2
from @INC
Feb 14 17:26:14.959 [2855] dbg: razor2: razor2 is not available
Feb 14 17:26:14.959 [2855] dbg: plugin: loading
Mail::SpamAssassin::Plugin::SpamCop from @INC
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.
there have nothing to do with training, although spamcop.pm can be used to
report mail to spamcop.
--
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?