Graphs of mail messages over time 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?
I am looking for this also. This answer claims: "AppleScript doesn't offer any means of getting a list of replies to a message. My workaround is to get the message id of the message being replied to and search it in the sent messages."

TimeToReply.com also provides a similar service, but they have locked out new users pending product updates (unfortunately, they are moving from a cloud service to client plugin model).