Sign inSign up

guestros/k8s-docker-spamprotection-rspamd-isbg

By guestros

β€’Updated about 1 year ago

Image
0

618

guestros/k8s-docker-spamprotection-rspamd-isbg repository overview

⁠k8s-docker-spamprotection-rspamd-isbg

Selfhosted setup to filter an IMAP inbox using common rspamd rules and smart bayesian learning using isbg

Build and Push Multi-Arch Docker Images

Github: https://github.com/JustinGuese/k8s-docker-spamprotection-rspamd-isbg⁠ Dockerhub: https://hub.docker.com/repository/docker/guestros/k8s-docker-spamprotection-rspamd-isbg/general⁠

⁠install

manually create the secret

kubectl create secret generic isbg-credentials \
  --namespace=spamprotect \
  --from-literal=IMAP_HOST="your-imap-host" \
  --from-literal=IMAP_USER="your-imap-user" \
  --from-literal=IMAP_PASSWD="your-imap-password" \
  --from-literal=LEARN_SPAMBOX="your-spam-box" \
  --from-literal=LEARN_HAMBOX="your-ham-box"

after that

kubectl apply -f kubernetes/

β πŸ›‘οΈ Rspamd + ISBG Kubernetes Spam Filter Trainer

This Kubernetes setup automates spam filter training using Rspamd and ISBG (IMAP Spam Begone). It connects to a remote IMAP mailbox (e.g. from Outlook), reads user-classified emails (Spam / Good), and teaches Rspamd to improve future spam detection.

πŸ“¦ What It Does β€’ βœ… Connects to your IMAP account securely (e.g. Hostinger) β€’ βœ… Trains Rspamd using: β€’ Emails in the Spam folder β†’ learn as spam β€’ Emails in the Good (or Inbox/Good) folder β†’ learn as ham β€’ βœ… Runs as a Kubernetes CronJob (default: every 30 minutes) β€’ βœ… Stores persistent config and logs at: /mnt/hdd/spamprotect/ (via hostPath)

πŸ”§ Components

Component Description rspamd Deployment Optional internal Rspamd instance rspamd Service Exposes Rspamd at rspamd.spamprotect.svc.cluster.local isbg-train CronJob Connects to IMAP and teaches Rspamd every X minutes hostPath Volume Mounted persistent storage at /mnt/hdd/spamprotect/

πŸ“¨ Folder Actions (How Training Works)

Folder (in Outlook or IMAP) Meaning Action Spam You marked spam Learn as spam -> e.g. Junk Good You rescued mail Learn as ham -> e.g. Inbox

Simply move emails to these folders to β€œteach” your spam filter.

πŸ“ File Structure on Host

Make sure this exists:

/mnt/hdd/spamprotect/ β”œβ”€β”€ config/ # Optional rspamd config β”œβ”€β”€ logs/ # Logs from ISBG training

Tag summary

Content type

Image

Digest

sha256:517c01f02…

Size

46.8 MB

Last updated

about 1 year ago

docker pull guestros/k8s-docker-spamprotection-rspamd-isbg