Skip to main content

Spam-Digest deployment

Docker Compose: single mailbox​

services:
spam-digest:
image: ghcr.io/gioxx/spam-digest:latest
container_name: spam-digest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- spam_digest_data:/data
environment:
TZ: Europe/Rome
IMAP_SERVER: imap.example.com
EMAIL_USER: you@example.com
EMAIL_PASS: your-imap-password
SPAM_FOLDER: Junk
SMTP_HOST: smtp.example.com
SMTP_PORT: "587"
SMTP_USER: you@example.com
SMTP_PASS: your-smtp-password
# Optional: AI triage
AI_PROVIDER: anthropic
AI_API_KEY: sk-ant-...
# Optional: review, filters and delete links in the digest
WEB_BASE_URL: https://spamdigest.example.com
SCHEDULE_HOUR: "8"
SCHEDULE_MIN: "0"

volumes:
spam_digest_data:
docker compose up -d

The digest runs every day at 08:00 (TZ timezone). It does not run at container start unless RUN_ON_START=true. The dashboard is at http://localhost:8080.

The repository also ships a docker-compose.yml and an .env.example to start from.

Docker Compose: multi-mailbox​

Set MAILBOX_CONFIGS to a JSON array. It replaces the single-mailbox IMAP variables; delivery, AI and schedule variables stay global.

environment:
MAILBOX_CONFIGS: |
[
{"imap_server":"imap.contoso.com","email_user":"alex@contoso.com","email_pass":"app-password","spam_folder":"Junk"},
{"imap_server":"imap.example.com","email_user":"team@example.com","email_pass":"secret","spam_folder":"Spam","digest_to":"it@example.com"},
{"imap_server":"mail.example.org","email_user":"info@example.org","email_pass":"secret","imap_use_ssl":false,"imap_port":143}
]
SMTP_HOST: smtp.example.com
SMTP_USER: alerts@example.com
SMTP_PASS: your-smtp-password

Fields of each entry:

FieldDefaultDescription
imap_servernoneIMAP hostname. Required.
imap_port993IMAP port.
imap_use_ssltruefalse for a plain connection (e.g. port 143).
email_usernoneIMAP username. Required.
email_passnoneIMAP password. Required.
email_addressemail_userMailbox identifier used in the digest, the dashboard and the links.
spam_folderJunkSpam folder name.
max_emails100Newest emails read per run.
digest_toemail_addressDigest recipient for this mailbox.

Building locally​

git clone https://github.com/gioxx/spam-digest.git
cd spam-digest
cp .env.example .env # then edit .env
docker build -t spam-digest .
docker run -d --env-file .env -p 8080:8080 -v spam_digest_data:/data spam-digest