Run this script on a Mac to find all email addresses of persons who wrote emails to a specific email address.

The aim of this script was to collect all addresses of person who wrote me once a mail. I used it when I changed my old main email address to be able to send to those people my new email. Useful for those who aren’t in your address book.

This script use spotlight search so your emails must be indexed by this tool.

Download (gist)

Usage:
find_emails.py emailTo [-onlyin path]
  emailTo : your email address
  -onlyin : find onlyin a certain folder scope
            (for more information see mdfind help)
Ex : find_email.py me@email.com -onlyin /Users/pik/Library/Mail/Mailboxes
Feb. 12, 2011, 11:25 a.m. index
You are here projects:scripts:find email