Temporary email that burns after reading
Project description
burnbox
Temporary email that burns after reading.
burnbox creates a disposable email address, watches for incoming messages, auto-detects OTP codes, copies them to your clipboard — then burns the account when you're done.
Requires Python >= 3.10.
Install
pip install burnbox
Or with pipx (recommended for CLI tools):
pipx install burnbox
How it works
- Register — burnbox creates a temporary email account
- Poll — watches for incoming messages every few seconds
- Detect — finds OTP codes, verification links, and copies them to clipboard
- Burn — deletes the account and session on exit (Ctrl+C)
The --keep flag preserves the account for later use with burnbox resume.
Quick start
$ burnbox
That's it. You'll get a temp address, it auto-copies to clipboard, and burnbox watches for messages. When a verification code arrives, it's detected and copied. Press Ctrl+C to exit — the account is deleted automatically.
╭─────────── burnbox ───────────╮
│ Temp email that burns after │
│ reading │
╰───────────────────────────────╯
Provider: mailtm
Address: k7x9m2@example.com
Address copied to clipboard
Ctrl+C to exit and burn · --keep to preserve · burnbox resume
CLI usage
| Command | Description |
|---|---|
burnbox |
Create temp email, watch for messages, burn on exit |
burnbox address |
Generate a temp email address and exit (account is burned immediately) |
burnbox resume |
Reconnect to the last saved session |
Options
--provider Provider: mailtm, guerrillamail
--poll, -p Polling interval in seconds (default: 5)
--timeout, -t HTTP request timeout (default: 10)
--keep, -k Keep account alive after exit
--no-clipboard Do not copy to clipboard
--no-notify Disable desktop notifications
--version, -v Show version
--help, -h Show help
Examples
# Use a specific provider
burnbox --provider guerrillamail
# Keep account alive for later resume
burnbox --keep
# Resume a kept session
burnbox resume
# One-shot: just get a temp address (burned immediately)
burnbox address
# Headless mode: no clipboard, no notifications
burnbox --no-clipboard --no-notify
Programmatic API
Use burnbox as a Python library:
import asyncio
import burnbox
async def main():
box = await burnbox.create()
async with box:
print(f"Address: {box.address}")
msg = await box.wait_for_message(timeout=60)
if msg:
print(f"Code: {msg.best_code}")
print(f"From: {msg.sender}")
# Account auto-burns on exit
asyncio.run(main())
API reference
burnbox.create(provider=None, config=None)— Create aBurnBoxinstance (await it first, then use as context manager)box.address— The temp email addressbox.fetch_new()— Fetch new messagesbox.wait_for_message(timeout=60)— Wait for the first message (returnsNoneon timeout)box.messages()— Async iterator yielding messages as they arrivebox.burn()— Delete the account manuallymsg.id,msg.sender,msg.subject— Message metadatamsg.content— Message body as plain textmsg.best_code— Highest-confidence OTP code detected (string orNone)msg.codes— All detected codes asCodeMatchobjects (.value,.confidence,.kind)msg.links— All detected links
Configuration
Config file: ~/.config/burnbox.toml
[provider]
default = "mailtm" # Preferred provider
custom_url = "https://..." # Custom API URL for mailtm
[polling]
interval = 5.0 # Seconds between polls
timeout = 10.0 # HTTP timeout
[output]
copy_address = true # Copy address to clipboard
copy_code = true # Copy OTP codes to clipboard
notifications = true # Desktop notifications on OTP
Environment variables override the config:
BURNBOX_PROVIDER=guerrillamail
BURNBOX_POLL_INTERVAL=3
BURNBOX_TIMEOUT=15
BURNBOX_CUSTOM_URL=https://...
Providers
| Provider | Auth | Delete account | Domains | Custom URL |
|---|---|---|---|---|
| mail.tm | Register + token | Yes | Multiple | Yes |
| guerrillamail | Session-based | Best-effort (forget_me) | sharklasers.com, grr.la, etc | No |
burnbox automatically selects the first available provider with a health check. If one is down, it falls back to the next. You can also add custom providers via the plugin system.
OTP Detection
burnbox detects verification codes from incoming emails using a multi-parser engine:
- Labeled OTP — "code: 1234", "Your verification code: 8472", "Ваш код: 5531", etc.
- Alphanumeric codes — Recovery codes, backup keys (e.g.,
A1B2-C3D4-E5F6) - URL-embedded codes —
?code=,?token=,?otp=in links - Reset/verify links — Password reset, account verification URLs
- Numeric OTP — Standalone digit clusters with context-aware confidence boosting
Supports 12 languages for label detection: English, Russian, German, French, Spanish, Portuguese, Chinese, Japanese, Korean, Hindi, Arabic, Turkish. Context-aware confidence boosting is available for all 12 languages.
Each match has a confidence score (0–1). The highest-confidence code is auto-copied to your clipboard and auto-cleared after 30 seconds.
Plugin system
Add custom providers via Python entry points:
# my_provider.py
from burnbox import Provider
from burnbox.models import Session, InboxMessage
class MyProvider:
name = "myprovider"
supports_custom_url = False
async def is_alive(self) -> bool:
# Check if the provider API is reachable
async def register(self) -> Session:
# Create a new temp email account, return Session
async def restore(self, session: Session) -> None:
# Restore auth state from a saved session
async def fetch_messages(self, seen_ids: set[str]) -> list[InboxMessage]:
# Fetch new (unseen) messages
async def delete_account(self, account_id: str) -> bool:
# Delete the account, return True on success
async def aclose(self) -> None:
# Close the HTTP client
# pyproject.toml
[project.entry-points."burnbox.providers"]
myprovider = "my_provider:MyProvider"
After pip install, burnbox discovers your provider automatically.
Security considerations
- OTP codes transit through third-party email providers. Only use burnbox for non-sensitive verifications.
- Session files are stored with 0600 permissions at
~/.config/burnbox/session.json. Files are created with restrictive permissions from the start (no exposure window). - The account is deleted before the session file is removed, so a failed burn can be retried.
- OTP codes are auto-cleared from the clipboard after 30 seconds. An atexit handler also clears the clipboard on process termination. Clipboard managers may retain copied text.
- Notifications show only "Verification code received" — OTP values are never sent to the notification system.
- Accounts are deleted ("burned") on exit by default. Use
--keeponly if you need persistence. - GuerrillaMail does not support true account deletion;
forget_meabandons the session but emails may persist on the server for up to 1 hour.
Troubleshooting
- Clipboard not working on Linux: Install
xcliporxsel(X11) orwl-clipboard(Wayland). burnbox detects Wayland automatically and useswl-copyfirst. - All providers down: burnbox falls back to trying providers even if health checks fail. Check your network.
- "Session expired" on resume: The temp email account has expired. Start a new one with
burnbox. - "Guerrilla Mail forget_me failed": The GuerrillaMail API may be temporarily unavailable. The session is still abandoned locally.
Development
uv sync --extra dev
uv run ruff check .
uv run mypy burnbox/
uv run pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file burnbox-1.2.1.tar.gz.
File metadata
- Download URL: burnbox-1.2.1.tar.gz
- Upload date:
- Size: 65.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b966df9d76e3407813aca6ffad8ebc8c3444b79a6b994f605e56493da9ff114
|
|
| MD5 |
60d04f490c1e8983131479e46111b277
|
|
| BLAKE2b-256 |
1a2c51c2d831374d6c7cfca737e0fc2c36af8019b2e91462c63a0a8742cb86b6
|
Provenance
The following attestation bundles were made for burnbox-1.2.1.tar.gz:
Publisher:
ci.yml on 4bstr4ct/burnbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
burnbox-1.2.1.tar.gz -
Subject digest:
4b966df9d76e3407813aca6ffad8ebc8c3444b79a6b994f605e56493da9ff114 - Sigstore transparency entry: 1676426711
- Sigstore integration time:
-
Permalink:
4bstr4ct/burnbox@c0b6be8502401c00bdb4f65fddc3428ea413f799 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/4bstr4ct
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c0b6be8502401c00bdb4f65fddc3428ea413f799 -
Trigger Event:
push
-
Statement type:
File details
Details for the file burnbox-1.2.1-py3-none-any.whl.
File metadata
- Download URL: burnbox-1.2.1-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65a9588146bd07c90b1220e384606a245866b239763fc24c909a9e0aa0449c4f
|
|
| MD5 |
b8088da6eaef52f5d9276f3edb63a30e
|
|
| BLAKE2b-256 |
3b45416b595d4f26fcaaa567d0ec28c295b002e6c714623cbc8286ed11af73df
|
Provenance
The following attestation bundles were made for burnbox-1.2.1-py3-none-any.whl:
Publisher:
ci.yml on 4bstr4ct/burnbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
burnbox-1.2.1-py3-none-any.whl -
Subject digest:
65a9588146bd07c90b1220e384606a245866b239763fc24c909a9e0aa0449c4f - Sigstore transparency entry: 1676426731
- Sigstore integration time:
-
Permalink:
4bstr4ct/burnbox@c0b6be8502401c00bdb4f65fddc3428ea413f799 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/4bstr4ct
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c0b6be8502401c00bdb4f65fddc3428ea413f799 -
Trigger Event:
push
-
Statement type: