• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How to use sa-learn

S

schani@

Guest
How to use sa-learn ?

Hello, is it possible to use sa-learn to learn spam mails to a user bayes database. I have 40000 old Spam mails in a Directory from the past. Now i will learn the signatures fron this mails to my email adress bayes_toks database.

Is there a chance to learn this spam mails to a Global bayes database to use it for all users ?
How is this possible ?

if i use as root
sa-learn --spam --siteconfigpath=/etc/mail/spamassassin/ --showdots --dir /home/oldspammails

it will create the bayes databases in /root/.spamassassin

Plesk and SA use only the bayes Database in the user accounts ! copy dont work.



Thanks for help

Christian
 
sa-learn in plesk, is handled on a per mail user basis in the control panel. If you login either as the mail user, or domain admin, go to the mail settings for that user, go to spam filtering. There is a button there that say train. From that page, you can train SA on any mail in the users inbox.

What this means, is that you'd have to put the messages into each user's inboxes (/var/qmail/mailnames/DOMAINNAME/MAILUSER/Maildir/cur/), and manually train SA.
 
Hello serve-you.net,
thanks for your answer. I think, schani (and me) are searching for a possibility to provide the bayes_toks database (learned by/for a single user) to all users or to take it as global database. We have many users not training (and not interrested in) their mails by the way you describe. I catched 5000+ spammails and bayes filter works fine for my mbox, but other users don't had such a trainig for their bayes db.
I know there is a way to share this db by adding 'bayes_path' and 'bayes_file_mode' to /etc/mail/spamassassin/local.cf (info from /usr/share/doc/packages/spamassassin/README.spamd). But my tries (edited local.cf, made directory /var/qmail/.spamassassin/bayes, chmod it to 0666 and chown to popuser/popuser) were not successfull, there is nothing happening in this folder. spamd and spammng have been restartet several times...
Any ideas?
 
I don't think it's possible to do that with plesk's implementation. Further, I don't see why you would want to. SA does it's job based on the rules built into it, or whatever additional rules you feed it. It does a pretty good job scoring mail, without any training. If your users are complaining about spam, but aren't willing to train, what do you care?
 
Back
Top