Skip to content

Helps you to keep an eye on unread emails in Thunderbird 📬👀

License

Notifications You must be signed in to change notification settings

eikendev/tbunread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tbunread

Unread counts for your Thunderbird accounts.

Watch Thunderbird mail folders and output unread totals in a simple, script-friendly format.

Build status  License  Version  Downloads 

✨ 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 tbunread using Cargo:

cargo install 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

About

Helps you to keep an eye on unread emails in Thunderbird 📬👀

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks