I'd like to be able to track information relating to how I use email. I'm basically after a better way to visualise when my inbox is going out of control, and I'd historically like to know how much email I deal with.
At the moment I have a spreadsheet with daily tallies of ‘messages in inbox’, ‘total for today’, ‘trashed today’, etc., that I often forget to update since it's a manual process.
I've attempted to AppleScript mail in the past but generally have found it's flaky trying to deal with smart mailboxes. (Haven't tried using accessibility scripting, though.) E.g., something like this (assuming I have a smart mailbox called "Unread"), doesn't work:
tell application "Mail" to get every mailbox whose name is "Unread"
Is anyone aware of software, or know a workable technique, for tracking mail behaviour over time? The more automated the better of course. TL;DR version: How can I get the number of messages in a smart mailbox?