Sincere thanks for this Greg. You might have gathered I was on the right lines, just didn't have the details you provided. I actually just ran that sa-learn commadn manually and was told 2604 messages were examined in the .spam folder, so all those times I filed as spam from K-9 seems to have been useful, just all in one go.
On Thursday, June 27, 2019 at 8:03:06 PM UTC+1, Greg Troxel wrote: > > [more or less OT answer, but a fair question about what k-9 does. This > turned into advice about SA, mostly] > > Carl Whalley <[email protected] <javascript:>> writes: > > > All year I've been getting tons of spam. The backend is Posttfix with > > spamassassin on Ubuntu. I get lots of obvious spam which I am sure > > spamassassin would block after having seen it reported, so it stuck me > that > > I'm not certain that the training is working, if indeed it does work the > > way I think it is. > > > > Am I missing something here , please? Otherwise, refile as spam seems to > be > > doing nothing here, at that's after me doing it all year. > > The refile as spam button moves the message to the configured "spam > folder" That's basically all an MUA can do. So nothing automatically > happens. > > spamassassin maintains a database mapping words to spam/non-spam > probabilities, more or less, in ~/.spamassasin/bayes* > > The easiest way I know to learn from spam marked by k-9 is to run a cron > job that runs "sa-learn --spam" on the spam mailbox periodically; daily > seems adequate. You can also sa-learn --ham on your non-spam mailboxes. > Probably some systems have a way to notice the refile into spam and > trigger the sa-learn on it right away, but that's not about k-9. > > Even if you just do > > sa-learn --spam --dir $HOME/IMAP/.spam > > or whatever your IMAP maildir is (sa-learn can read lots of kinds of > mail) once, that should help a lot. And also sa-learn on your inbox > and others once, after you have purged spam. Don't worry about learning > with --ham an odd spam message; once you find and refile it, it can get > learned as spam. > > There is also an SA auto-whitelist database. I'm fuzzy on the details, > but generally messages with very non-spammy or very spammy scores cause > a reputation of the sender to be adjusted, and this is applied to future > messages from that sender. > > Another point is that SA is tuned to declare spam at 5, and aims to have > a very low false positive rate at the expense of spam getting through. > If that's not what you want, you could have the server sort into spam.1 > through spam.5 for messages with >= 1 (and so on) points. That will put > a lot of legit mail into spam.N, and less spam in INBOX. You can then > refine spam.N legit to INBOX, and have the daily cron job learn from > your sorting. This approach is probably only sensible if you are > reading INBOX only on your phone and using a desktop MUA elsewhere. It > also leads to adding a lot of whitelist_from_dkim (these days) for legit > mail that smells a bit spammy. > > Make sure your SA install is up to date, and run "sa-update" to fetch > new rules. > > Look at the headers and see which rules hit, when you get spam. > Consider bumping up scores, if you like a rule. Use spamassassin -t on > the raw message to see more detail about rules, and what the BAYES score > is after learning. > -- You received this message because you are subscribed to the Google Groups "K-9 Mail" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/k-9-mail/aa4f461d-ecec-4b61-b553-b5ce2df7b451%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
