Begging the moderators' forbearance, as this post has nothing to do with bicycles. But it does have something to do with reading mail/posts from this group, which is at least bicycle-adjacent.
Mail filtering in Apple Mail blows, and it always has blown. The training phase for the Bayesian email filter works for a while, but once you move from the training phase to the "segregate my junk mail out" phase, it seems to stop learning anything new. You keep IDing new junk mail and correcting false positives, but it doesn't seem to adapt.
For almost 20 years, ever since my Eudora days, I've been using an aftermarket email filtration application: SpamSieve from C-Command Software.
https://c-command.com/spamsieve/
The filters are far more adaptable, you can add new filters at will, and Michael Tsai (the programmer operating the one-man shop) provides outstanding technical support. Years ago, I had a G5 tower that crashed from overheating several times a day; one Saturday night, it crashed while I had Apple Mail open. I restarted the computer as usual, and five minutes later, I got a personal email from Michael Tsai, saying that he'd just received a report that SpamSieve had crashed, and I should download a new copy. Quizzically (I've never received unsolicited direct contact from a developer, unless he was trying to sell me something), I told him about my crash-prone computer, and said that SS was obviously working, as I had Apple Mail open (SpamSieve launches and quits with the mail program it's filtering). He sent me back an email saying "no, I can see that the application's been corrupted, and here's the place in the log file the app automatically sent me that shows it". All of this happened between 9:30 and 9:45 on a Saturday night. WOW!
That is such amazing support that I've bought (and failed to use) several other of C-Command's utilities, just to keep Michael in business. In a followup exchange with Michael ("hey, how did you get this information without my contacting you?"), Michael told me that the same reporting system that Apple uses to analyze OS/application crashes (the display that appears after something crashes, which tells you something's crashed and delivers a bunch of user-incomprehensible programmer information about the reason for the crash) was also capable of sending the same information to third-party developers. He said that most developers didn't use the option of receiving those messages, but he wanted to know when his applications failed and why.
Personally, I am a little twitchy about sending third parties information in the background. But here I am, using a Google service; they're spying on me all the time, and I have no idea what benefit I get in return. At least I know what Michael's doing with his surveillance data.
SpamSieve works with a number of standalone email applications (Apple Mail, Thunderbird, Outlook, Entourage, Postbox), but it doesn't work with webmail such as Gmail, unless you're directing your Gmail feed into a traditional email client. For Gmail viewed through a browser, you're forced to rely on Google's filtering system, which (as my inner paranoiac tells me) is being operated with intentions I do not share.
If your ISP is one of the remaining smaller, traditional local companies, they may well provide spam filtration at their end. LMi, a local ISP in Berkeley (not the one I use, but one that I've done contract work for and to whom I regularly clients that need a lot of hand-holding) offers three different levels of filtration, based on blacklists of bad actors. If you use one of their filters, mail from those bad actors never hits your inbox on the server, so you never see it at all. The advantage to a small ISP is that mail they reject before it gets to their users' inboxes is mail that isn't taking up valuable space on their hard drives, saving them money on storage/electricity. Obviously, this requires a fair amount of trust in your ISP's judgement.
Like most webmail providers, Google doesn't care much about wasted disk space; they can afford the storage. Unfortunately, this also means they're less concerned about collecting crap and dumping it in your lap. If you're relying exclusively on Gmail's filtering system, expect to be disappointed.
A secondary complication with using anything other than browser-based mail is that local filtering systems are specific to the filtering tool on each device. As an example, if you're viewing email in Apple Mail on your Mac, on your iPhone and on your iPad, each Apple Mail client will filter depending on how the individual client is set. Like Gmail, Apple Mail stores all your email in one database file; it then displays the mail based on the settings in the local client. If mail you think is good shows up in your spam folder on one device and your inbox on a second device, you have to specify that the message is "good" on the offending device.
C-Command does not do a separate iOS/iPadOS version of SpamSieve, but he does have a tutorial on integrating iOS-ish devices with a macOS/SpamSieve system. The steps he outlines are useful for multi-device synchronization of any mail filtering system, regardless of OS or filtering application/s:
Peter Adler
Mac/networking consultant since the pre-Jobs 2.0 days in
Berkeley, CA/USA