A German-speaking company with about a dozen domains and several dozen mailboxes, around 600 external messages a day
Challenge
Users reported two problems at once: spam and phishing got past the filter, and part of the legitimate mail from partners was marked as spam. Earlier attempts had added custom rules and raised scores, which made both problems worse.
The environment: Debian 12, Postfix with postscreen, Dovecot with LMTP and Sieve, SpamAssassin 4.0 and amavis with ClamAV.
Solution
Data instead of intuition. The header the filter adds to every message lists the rules that fired. Collected over real mail and several weeks of logs, it shows which detection mechanisms work and which stay silent. No setting was changed without evidence in that data.
The first repair removed the root causes: DNS blacklists that never answered, a poisoned and almost empty Bayes database, auto-learning that taught the filter phishing was fine, whitelists for whole freemail domains and exaggerated custom rules. When spam returned after three months, an hourly analysis of the logs found forgotten cron jobs and a shrunken database, and the database was rebuilt in the background without interrupting the mail.
Results
- Spam before the repair
- Rated as clean, a median of 1.1 points against a threshold of 3.1
- Scored by the Bayes filter
- 100 % of messages after the repair, verified hour by hour
- Rebuilt Bayes database
- 5.3 million tokens, from 47,828 spam and 110,302 legitimate messages
- Example phishing message
- From −2.7 points in the inbox to 9.1 points in the spam folder
- False alarms on partner newsletters
- None after the repair
- Nightly training
- About 2 minutes instead of several hours