✨ Why tbunread?
Thunderbird is great, but it does not expose a simple, stable way to read unread counts from the outside. If you want to feed a status bar, a panel widget, or a script, I found no good native way to do that.
tbunread reads Thunderbird's local IMAP index files and prints a compact list of unread totals, ordered exactly the way you want. It updates whenever files change and stays out of the way.
🧠 How it works
- Configure email accounts by creating symlinks in
ImapMail/tbunread(see Configuration) - Setup tbunread to run in the background (see Recommended setup)
- tbunread watches the default profile for changes
- Prints counts to stdout and optionally writes them to a file
- Emits
???when Thunderbird is not running
🚀 Installation
Install a prebuilt binary with cargo-binstall:
Or build from source:
Static musl binaries for x86_64 and aarch64 are attached to every release, each with a .sha256 checksum and a verifiable build provenance:
📄 Usage
Configuration
tbunread only processes accounts you explicitly link. Create a tbunread directory inside your Thunderbird profile's ImapMail directory, then add symlinks to each IMAP account directory. (POP3 is not supported.)
Example layout:
)
)
)
The symlink names define the output order (alphabetical).
Run
Print unread counts to stdout:
Write counts to a file:
Only write to a file (no stdout):
Adjust the Thunderbird process scan interval (seconds):
🔧 Recommended setup (systemd)
For continuous updates, run tbunread as a systemd user service:
[Unit]
Description=tbunread
[Service]
Type=simple
ExecStart=tbunread --output /where/you/need/the/output
Restart=on-success
RestartSec=5s
[Install]
WantedBy=default.target