Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



40 Commits

Repository files navigation


This is a Python command-line script that creates a chart of mails from local Maildir format mailboxes or IMAP4 SSL mailboxes. It was designed to show an individual's activity over many years, by processing their sent-mail mailbox.

The main body of the chart is a scatterplot. The vertical axis is minutes, and the horizontal axis is days. Each pixel represents a minute. If that pixel is white, that means an email was sent in that minute. If you're sending more than one email per minute, you have bigger problems.

The bottom of the chart is a histogram of days. Red is the raw histogram; overlaid on that is a rolling seven day average histogram.

The right side of the chart is a histogram of hours. Red is the raw histogram; overlaid on that is a rolling eleven minute average histogram.


Requires Python 2.6 or greater. Optionally, for timezone-corrected charts, the pytz module should be installed (


./ -s 2001-01-01 [OPTIONS] maildir_or_imaps_url [maildir_or_imaps_url [...]]

You may process as many Maildirs or IMAP4 mailboxes as you like, using a single command, and all the mails will be assembled on the same chart. You'll be prompted for IMAP passwords for each IMAP URL.

Only IMAP4 over SSL is supported. (If you really want to send your authentication and entire mailbox unencrypted over the Internets you can hack the code easily enough, but I'm not going to enable you.)

Since mailboxes might contain un-sorted messages, you must supply a start date on the command line, using the -s option. All other command line options are optional.


-h, --help            show this help message and exit
                      path to write output image to
                      path to TTF/OTF font file to use for labels
--fontsize=FONT_SIZE  font size, in pixels (requires that -f FONT is
-s START, --start=START
                      process emails starting on this date (required)
-e END, --end=END     process emails before this date
                      draw chart using this timezone
--noninteractive      disable progress meter


I've had the same email since August 29th, 2000, and I'm usually in the America/Los_Angeles timezone, and my sent-mail is in ~/Maildir/.Sent/, so I use this command:

./ -s 2000-08-29 -z America/Los_Angeles ~/Maildir/.Sent/

Alternatively, if you'd like to process a remote Gmail mailbox over IMAP4, you may supply an imaps:// URL. (Note that USERNAME must be URL-encoded, so if it has an @ sign in it, that gets turned into %40.)

./ -s 2001-01-01 'imaps://"[Gmail]/Sent Mail"'


Generate a graphical chart of mail times from a Maildir or IMAP.






No releases published


No packages published