Skip to main content

A Python application for collecting email addresses from email messages

Project description

A Python application for collecting email addresses from email messages


addrcollector collects email addresses from email messages. This is similar to Thunderbird’s “Collected Addresses” feature and corresponding functionality in other software. In the case of addrcollector, however, email messages are read from standard input, or manually on the command line, and the email address database can be queried by keyword.

It is possible for addrcollector to be integrated with a mail delivery system like Procmail or Maildrop to collect addresses from all messages, or with mail clients like Mutt or Alpine to collect addresses selectively.

Dates and display names are also collected. If an address is seen more than once, then (1) the date is updated and (2) the display name is updated if the new one is longer than the old one.

For example, to add an address manually (the display name is optional):

$ addrcollector add "Jon Smith"
$ addrcollector add

To import addresses from a message passed on standard input:

$ addrcollector import < mymail.msg

To search for addresses using keywords (multiple keywords may be given and are ORed):

$ addrcollector search jon sven
2020-07-03                Jon Smith

Installing from PyPI

addrcollector is published on PyPI and can be installed with pip.

  1. Install the addrcollector package.

    $ pip3 install addrcollector

    This should provide a ~/.local/bin/addrcollector script that you can execute.

  2. If that path is included in your PATH environment variable, you can run the addrcollector command without typing the entire path., To set up this, if it hasn’t been done already, add the following code in your ~/.bash_profile (it may be ~/.profile for a shell other than Bash):

    if [ -d "$HOME/.local/bin" ] ; then

Running from repository

If you have cloned the repository, you can run addrcollector from it directly.

  1. Install Poetry:

    $ pip3 install poetry
  2. With the addrcollector repository root as your current directory, use Poetry to install the dependencies:

    $ poetry install
  3. Now that the dependencies have been installed, use Poetry to run addrcollector:

    $ poetry run addrcollector

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

addrcollector-2.0.0.tar.gz (7.7 kB view hashes)

Uploaded source

Built Distribution

addrcollector-2.0.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page