Spamfilter
Spamfilter is a Docker-based Internet Message Access Protocol (IMAP) spam filter for self-hosted mailboxes, scoring each account's mail with a companion…
Platform availability
Available on 1 of 10 platforms
- Unraid
- TrueNAS (not listed)
- Umbrel (not listed)
- ZimaOS (not listed)
- Proxmox (not listed)
- Helm (not listed)
- Mac (not listed)
- Windows (not listed)
- Linux (not listed)
- Any server (not listed)
Health score?A 0-100 score computed nightly from four factors: maintained (40%: recent commits and steady activity), popular (25%: GitHub stars, log scale), easy to install (20%: platforms, install notes, setup guides, Docker image) and light to run (15%: minimum RAM, ARM support). When the source code has been checked, a fifth factor, security check (20%: automated scan for committed secrets, unsafe desktop-app settings, known-vulnerable dependencies and project hygiene; any serious finding caps it at 20), is added. Factors without data are left out and the rest are rescaled.
41/100 Fair
- Maintained
- 69last commit 160 days ago
- Popular
- 2110 GitHub stars
- Easy to install
- 351 install platform, install notes, Docker image
- Light to run
- 108 GB minimum RAM
Availability: platform listings confirmed today, links checked 18 days ago
- GitHub stars
- 10
- Open issues
- 0
- Last commit
- 2026-06-14
- Latest release
- v1.0.0
- License
- MIT
- Activity
- stale
Checked 17 days ago - source: GitHub (marcelverdult/imap-spamfilter)
Resources & Compatibility
Minimum requirements: 8 GB RAM, 2 CPU core(s), 100 GB disk.
Checked 54 days ago - source: Docker Hub image tags and published docs
First-install notes
- Install it with Python's package installer Run pip install spamfilter, or use python3 -m pip install spamfilter if your terminal can't find pip. This puts the spamfilter package where Python can import it, so your scripts won't fail on import. source
- Install the extra you need If you plan to use OpenAI, API, or Transformers features, install the matching extra, such as pip install spamfilter[openai]. Without the right extra, those features may error because their extra dependencies are missing. source
- Confirm the install worked After installing, run import spamfilter and print spamfilter.__version__ in Python. Seeing a version like 'v3.0.0' confirms the install worked, so you don't have to guess later when your code misbehaves. source
- Four-container setup on the spamnet network Run spamfilter alongside three companions on a shared Docker network named spamnet: spamfilter-redis (stores rspamd Bayes data), spamfilter-rspamd (scores mail), and spamfilter-unbound (local DNS). Per-account settings (credentials, modes, threshold) go in /mnt/user/appdata/spamfilter/accounts.yml; edit the file by hand and restart the container to apply changes. source
- Deployment Docker-based; use the included Unraid templates or run on any Linux host with Docker. source
- Unraid deployment The repository includes Unraid templates for the four-container Docker deployment. source
Fetched today - each note links to its source
Variants
Alternatives
No alternatives collected yet.
Common questions
Do I need to run more than the main spamfilter container?
Yes, run four containers on a shared Docker network named spamnet: spamfilter-redis, spamfilter-unbound, spamfilter-rspamd, and spamfilter. Redis persists rspamd data, unbound provides local recursive DNS, and rspamd scores messages.
How do I change account modes, thresholds, or credentials?
Per-account settings go in /mnt/user/appdata/spamfilter/accounts.yml. Edit the file by hand and restart the container to apply changes.
Where is the Bayes training data kept?
The spamfilter-redis container stores rspamd Bayes tokens, fuzzy hashes, and neural weights using AOF and RDB. Backing up that Redis data preserves the learned state.
How does it learn spam and ham?
It learns from explicit user moves: Inbox to Junk as spam and Junk to Inbox as ham after the grace window. It can also learn from Junk/Train-Spam and Junk/Train-Ham, and it does not autolearn.
What happens if rspamd is down or a folder is missing?
It fails closed, so the message stays put. It never deletes mail and only uses IMAP MOVE operations.
Answers sourced from github.com
Community
- Looking for an easy IMAP mail spamfilter : r/selfhosted - Reddit (reddit)
- Any good Spam Filtering solutions for an IMAP account (reddit)
Collected 49 days ago - public community threads