Find every newsletter in all your mailboxes and unsubscribe in one click.
Self-hosted, works with any IMAP or POP3 account, and your mail never leaves your server.
- All your mailboxes in one place. Add as many IMAP or POP3 accounts as you like. Presets cover Gmail, Outlook/Hotmail, Yahoo, iCloud, AOL, Zoho, Yandex, GMX, Mail.com, Fastmail and Proton Mail Bridge, and any other server works with custom settings.
- One dashboard. See totals and a single newsletter list across every mailbox. Filter it by mailbox, status or search text.
- Scan everything, or one mailbox deeply. Scan all mailboxes together or one at a time, the inbox or every folder, reading the newest 100–5,000 messages per folder. Scans run in the background with live progress.
- Smart detection. Any message with a
List-Unsubscribeheader counts as a newsletter. Messages are grouped by sender, and a message found in several folders (Gmail labels, for example) is counted once. Only headers are downloaded, so scans are fast. - One-click unsubscribe. Byeletter tries the most automatic method first:
- One-click (RFC 8058): a request to the sender's unsubscribe endpoint.
- Email: an unsubscribe email sent from your own account.
- Manual: a link to finish on the sender's site, then Mark done.
- Bulk actions and history. Select many senders and unsubscribe from them together. Results are saved, so you can come back later or undo.
- Private by design. A password protects the whole app. Mailbox passwords are stored encrypted, and there's no telemetry and no third-party service.
You need Docker with Compose.
curl -O https://raw.githubusercontent.com/m4ary/byeletter/main/docker-compose.yml
curl -o .env https://raw.githubusercontent.com/m4ary/byeletter/main/.env.example
# edit .env: set ADMIN_PASSWORD, and SESSION_SECRET (openssl rand -hex 32)
docker compose up -dOpen http://localhost:3000.
- Unlock the app with your
ADMIN_PASSWORD. - Add a mailbox: enter your email address and the provider is picked for you. Most providers need an app password. Byeletter checks the login, saves it encrypted and scans your inbox straight away.
- Scan: use Scan all mailboxes on the dashboard, or scan one mailbox from the Mailboxes page. Choose All folders to include folders like Promotions or Spam.
- Unsubscribe: click Unsubscribe on a sender, or select several and use Unsubscribe selected.
Most big providers don't accept your normal password for IMAP or POP. Create an app password and use it instead. The add-mailbox form links to instructions where the provider has them.
| Provider | How |
|---|---|
| Gmail | Turn on 2-Step Verification, create an App Password, and enable IMAP in Gmail settings |
| Yahoo / AOL | Account Security → Generate app password |
| iCloud | IMAP only. Create an app-specific password at appleid.apple.com |
| Outlook / Microsoft 365 | Microsoft is removing password logins, so this only works where your account still allows them |
| Proton Mail | Run Proton Mail Bridge and use the password it generates (see Docker notes) |
Email unsubscribes are sent through your provider's SMTP server. For custom servers you can add SMTP settings; without them, Byeletter opens the unsubscribe email in your own mail app instead.
Set these in .env (Compose) or as container environment variables.
| Variable | Required | Description |
|---|---|---|
ADMIN_PASSWORD |
yes | Password for the app's login page. If it's not set, nobody can unlock the app |
SESSION_SECRET |
recommended | 32+ random characters (openssl rand -hex 32). Encrypts the login cookie and the saved mailbox passwords. If unset, a key is derived from ADMIN_PASSWORD. Keep it stable: if it changes, saved mailboxes must be added again |
COOKIE_SECURE |
no | true makes the login cookie HTTPS-only. Compose sets false so plain http:// works on your network; set true behind HTTPS |
API_KEY |
no | Enables the API for scripts and other tools. At least 32 random characters (openssl rand -hex 32) |
PORT |
no | Host port in Compose (default 3000) |
BYELETTER_VERSION |
no | Image version in Compose (default latest) |
DATA_DIR |
no | Where the SQLite database is stored. Defaults to ./data; the Docker image uses /app/data |
Set API_KEY and you can add mailboxes, start scans and unsubscribe from scripts or other tools:
curl -X POST http://localhost:3000/api/accounts \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"email": "me@gmail.com", "password": "your-app-password", "label": "Personal"}'For known providers the email address and app password are enough. See docs/API.md for custom servers and every endpoint.
docker compose pull && docker compose up -dTo stay on a specific release, set BYELETTER_VERSION in .env: an exact version like 1.2.0, 1.2 for its latest patch, or 1 for the latest 1.x. The releases page and CHANGELOG.md list what changed.
Your mailboxes and scan results live in the byeletter-data volume (/app/data in the container). Back it up together with your SESSION_SECRET, since you need both to read the saved mailboxes.
- Images are published at
ghcr.io/m4ary/byeletterforlinux/amd64andlinux/arm64. They run as a non-root user. - Without Compose:
docker run -d -p 3000:3000 -v byeletter-data:/app/data \ -e ADMIN_PASSWORD=change-me -e SESSION_SECRET=$(openssl rand -hex 32) -e COOKIE_SECURE=false \ ghcr.io/m4ary/byeletter:latest - Build from source instead of pulling:
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build - Proton Mail Bridge on the same machine: inside a container,
127.0.0.1is the container itself. Pick the Other provider and usehost.docker.internalas the server; Compose already maps it to your host. - Behind a reverse proxy with HTTPS: set
COOKIE_SECURE=true.
- Your data stays with you. Byeletter only talks to your mail servers and, when you unsubscribe, to the sender's unsubscribe link or address. There's no telemetry, account or cloud service.
- Mailbox passwords are checked with a real login, then stored in the local database encrypted with AES-256-GCM. They're never sent back to the browser.
- The whole app is behind
ADMIN_PASSWORD(and the API behindAPI_KEY, if you set one), with an encrypted,httpOnly,SameSite=Strictsession cookie that expires after 8 hours. Wrong guesses are limited to 10 per IP every 15 minutes. - Unsubscribe links come from untrusted emails, so one-click requests refuse private and local network addresses and don't follow redirects. Links are always read from the saved scan, never from the browser.
- Once unlocked, the app can connect to any mail server you enter. Use a strong
ADMIN_PASSWORD, and put the app behind HTTPS if you expose it to the internet.
Found a vulnerability? Please report it privately (best effort, no guarantees); see SECURITY.md.
Bug reports, ideas and pull requests are welcome. CONTRIBUTING.md explains how to run Byeletter locally (Node.js 22.13 or newer), the project layout, and how releases work.
Byeletter is provided as is, without warranty of any kind, and the authors accept no liability for how it's used (see LICENSE). You use it at your own risk and are responsible for your installation, the mailboxes you connect, the credentials you store, and following your email providers' terms. There's no guaranteed support or security maintenance.
Byeletter isn't affiliated with or endorsed by any email provider. Provider names are used only to describe compatibility.
MIT. Free to use, change and share, with no warranty.
