Spam filtering is very hit or miss. Some clear spam gets through no problem, while emails sent from an address on the same domain from my printer always go to spam. If I click “mark as not spam” it seems to delete the email. (I can’t find where they go). Marking things as spam never seems to make it learn anything.
Also, while mailinabox keeps a copy of all emails and apparently never deletes them, randomly emails are hiding from the deleted folder. I don’t know why or how it chooses when to randomly remove some.
Am I doing something wrong? I feel this should just work.
It will take some time to train the spamassassin filter. The way it works for Mail-in-a-Box, if you move a mail into the spam folder, that mail is used as input for the spam training. The same goes for the other way around, if you move a mail out of the spam filter, this too is input for the spam training.
Regarding your missing mail, what mail application are you using? Maybe it somehow messes stuff up? Are you using IMAP or POP? And I don’t know what this application does when you press the mark as not spam button.
If you want to learn about the details regarding spam classification, start looking at the headers. Notably the X-Spam-Report has a number of details.
If you’ve got specific domains (like your printer) that are known not spam, include those domains in /etc/mail/spamassassin/99_local.cf, like:
whitelist_from *@mydomain.com
And you might want to include those domains in /etc/postgrey/whitelist_clients.local so they don’t get caught up in greylisting. In this file, the lines are just domain name or IP address, like:
I just want to chime in and say this does not guarantee the mails do not go to spam.
I had a problem where lots of emails were not going to spam and others would not stay out of spam.
This is what I have done that seems to have helped greatly. I changed my cf file. I started to use “match regular expression” in my filters. I also cleared my training and ran manual training on spam and ham emails (saved as .eml files).
The expressions that appear to work are \bSPAMWORD\b for instance \bseo\b
This is my cf file. I needed this to keep these webflow emails from getting flagged as spam:
header LOCAL_WEBFLOW_FROM Received =~ /bnc3.webflow.com/
score LOCAL_WEBFLOW_FROM -20.0
header LOCAL_MAILJET_FROM Received =~ /mailjet.com/
score LOCAL_MAILJET_FROM -20.0