Skip to main content

Find ‘From’ addresses in a folder of .emlx files

Sometimes, despite having a much neglected and ever-growing menagerie of un-handled emails, to-do tasks, GitHub Issues, and household chores, I just want to knock up a quick script to automate a little task.

So I cobbled together a Python script that looks through a directory of .emlx files (like the folders that macOS’s Mail application uses to store mailboxes of emails) and lists the most common “From” addresses and domains. It’s on GitHub should you need such a thing.

Why? As the README says:

Every so often I like to check my Spam mailbox and find any ‘From’ addresses that are used frequently, and block them entirely. I wrote this script to make it easier to find which addresses to block.

Just a #satisfying little task all round.

Now, back to ignoring too many things.