Does anything "speak" against just fetching the message from said folder
(ex getmail or fetchmail) and feed them to sa-learn? At least for
getmail one can define a filter section which then calls sa-learn and
give it the message for learning. I use a getmail config like this
[retriever]
type = SimpleIMAPRetriever
server = MyServer
port = 143
username = u...@example.com
password = TopSecret
timeout = 180
mailboxes = ("INBOX.Spam",)
[filter-salearn]
type = Filter_classifier
path = /usr/bin/sa-learn
arguments = ("--spam",)
user = spamassassin
group = spamassassin
ignore_stderr = True
[destination]
type = Maildir
path = /sa-learn/spam/
user = spamassassin
Have a good one
tobi
On 04/12/2023 18:23, Kris Deugau wrote:
Emmanuel Seyman wrote:
Hello all.
I've set up SA at $WORK and now want to train the bayesian classifier.
To that end, a public folder has been setup on our Exchange server and
I want to run sa-learn on any email that is transferred to it.
I'm guessing this is a popular thing to do and that there would already
be a wrapper around sa-learn on github but my Google-foo seems to be
off today.
Is there such a wrapper or do I have to write my own script?
Have a look at http://deepnet.cx/~kdeugau/spamtools/imap-learn. It
looks like the link for the original script I mangled to create that
has moved to https://dmzs.com/tools/files/spam.php.
Fair warning, I gave up on using IMAP for feeding Bayes locally
because it started to glitch out and fail for no reason I could see.
But the mailboxes I'm learning from are maildir on a *nix platform,
not whatever black box Exchange hides things in.
-kgd