tbunread 0.0.11

Helps you to keep an eye on unread emails in Thunderbird.
tbunread-0.0.11 is not a library.

✨ 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:

cargo binstall tbunread

Or build from source:

cargo install tbunread

Static musl binaries for x86_64 and aarch64 are attached to every release, each with a .sha256 checksum and a verifiable build provenance:

gh attestation verify tbunread-x86_64-unknown-linux-musl.tar.gz --repo eikendev/tbunread

📄 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:

$ pwd
/path/to/.thunderbird/some.profile/ImapMail/tbunread
$ ls -lA
lrwxrwxrwx. (...) 01 -> ../mail.example1.com
lrwxrwxrwx. (...) 02 -> ../mail.example2.com
lrwxrwxrwx. (...) 03 -> ../mail.example3.com

The symlink names define the output order (alphabetical).

Run

Print unread counts to stdout:

tbunread

Write counts to a file:

tbunread --output /where/you/need/the/output

Only write to a file (no stdout):

tbunread --quiet --output /where/you/need/the/output

Adjust the Thunderbird process scan interval (seconds):

tbunread --interval 10

🔧 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