A simple Python script that monitors multiple mailboxes (or one) via IMAP and sends you instant Discord notifications for new incoming emails.
Each email notification includes:
- 📧 Sender address
- 📨 Subject
- 🧾 Body text (plain or extracted from HTML)
- 📎 Attachment filenames
- Supports multiple email accounts
- Separate Discord webhook or bot channel per account
- Uses SQLite to remember seen emails (no duplicates)
- Automatically polls every few seconds (configurable)
- Lightweight & runs 24/7 in Docker
- All configuration is handled via the
ACCOUNTSJSON insidedocker-compose.yml.
Use a Discord Webhook for each channel.
- In Discord Server → Channel Settings → Integrations → Webhooks
- Click New Webhook → Copy Webhook URL
- Paste that URL in your account configuration under discord_webhook.
Alternatively, you can use a bot token + channel ID if you prefer.
Honestly, webhook is easier and faster, but you can use a bot token + channel ID if you prefer.
- Clone the repo and edit
docker-compose.ymlfor credential and webhook link. - Run
sudo docker compose up -d --buildand it should start looking for incoming emails.
