The main repository is at fho/rspamd-iscan. This repo provides the Docker image and Helm chart.
rspamd-iscan is a daemon that monitors IMAP mailboxes and sends new mails to Rspamd for spam analysis and training. It decouples spam filtering from mail delivery — allowing the MDA, Rspamd, and rspamd-iscan to run on entirely separate hosts. For example, you can filter mails on the IMAP server of your third-party provider using your self-hosted Rspamd instance. It is similar to isbg but uses Rspamd instead of SpamAssassin.
Build and run locally:
docker build -t rspamd-iscan .
docker run -d \
--name rspamd-iscan \
-v /path/to/config.toml:/etc/rspamd-iscan/config.toml \
rspamd-iscanOr pull the pre-built image:
docker pull guestros/rspamd-iscanThe Helm chart deploys the full stack: Rspamd + rspamd-iscan, with an optional in-cluster Redis.
Copy helm/examplevalues.yaml, fill in your IMAP details and password, then install:
cp helm/examplevalues.yaml myvalues.yaml
# edit myvalues.yaml
helm install rspamd-iscan oci://ghcr.io/justinguese/rspamd-iscan \
-f myvalues.yaml -n spamfilter --create-namespaceNo manual secret creation needed — all credentials go in your values file and are stored in a Kubernetes Secret by Helm. The Rspamd controller password is auto-generated on first install.
All options are documented in helm/rspamd-iscan/values.yaml.
The rspamdIscan.mailboxes section controls which IMAP folders are used:
| Key | Purpose | Default |
|---|---|---|
scan |
Incoming unprocessed mail — rspamd-iscan watches this | INBOX.Unscanned |
inbox |
Clean mail is moved here after scanning | INBOX |
spam |
Detected spam is moved here | INBOX.Junk |
ham |
Drop false positives here to train Rspamd | INBOX |
undetected |
Drop missed spam here to train Rspamd | INBOX.Undetected |
backup |
Archive copy of all processed messages | INBOX.BackupMailbox |
Note:
Undetected,Unscanned, andBackupMailboxare non-standard folders — most providers won't create them automatically. Create them manually in your mail client or provider's webmail before deploying.
Recommended mail provider setup: Configure a server-side rule to deliver all incoming mail into the scan folder instead of INBOX. rspamd-iscan will then sort it automatically.
I am using Hostinger Email (~€1/month) — good, cheap, and works great with this setup. If this saved you some time, feel free to use the referral link and buy me a coffee ☕
- Missed spam in inbox → drag it to
undetected— rspamd-iscan will use it as a spam training example - Legitimate mail in spam → drag it to
ham— rspamd-iscan will use it as a ham training example
The GitHub Actions workflow builds and publishes a new Docker image automatically:
- On every push to
main(e.g. Dockerfile changes) - Weekly, if the upstream repo (fho/rspamd-iscan) has new commits — checked via commit SHA caching, so no unnecessary rebuilds
To publish images from your own fork, configure:
- Settings → Secrets and variables → Actions
- Add variable
DOCKERHUB_USERNAME— your Docker Hub username - Add secret
DOCKERHUB_TOKEN— a Docker Hub access token