Spamassassin marks incoming email as spam but mail still hits inbox reddit / selfhosted ---------------------------------------------------------------------- SinclairZXSpectrum · 2023-11-30 08:58 My setup is Dovecot + Postfix + Spamassassin + Roundcube, on CentOS. Works great. Using this setup since a long time. Incoming spam gets flagged by Spamassassin too, but I don't know how to stop these emails from hitting my inbox. Can anyone tell me how to or point me to a link with instructions? ---------------------------------------------------------------------- adamshand · 2023-11-30 09:17 Spamassassin just adds headers to each email (and I think rejects them over a certain score but I haven’t used it in a very long time). You can filter them to spam by using Sieve in Dovecot or a filter in your Mail client. ---------------------------------------------------------------------- upofadown · 2023-11-30 13:11 I use FDM for this. Appropriate parts of my ".fdm.conf": # Where the bad stuff goes. action "spam" mbox "%h/Mail/spam" # Some attachments indicate spam just by existing. $bad_ext = "*.xlsm" match attachment any-name "*.xlsm" action "spam" # Run through spamassassin if not too large. match size < 500K action rewrite "/usr/local/bin/spamc" continue # If spamassassin thinks it's spam then good enough for me. match "^X-Spam-Status: Yes" in headers action "spam"