Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Check email addresses against the austrian do-not-email list (ECG-Liste)

Project Description

This package provides simple access to the austrian RTR (Rundfunk und Telekom Regulierungs-GmbH) “ECG list”, the registry of persons and companies who do not wish to receive promotional e-mail.

Typical usage looks like this:

from ecglist import ECGList

e = ECGList()
if not e.get_blacklist_status_code(email):
    print "%s does not want to receive email" % email


Set up the interface:

from ecglist import ECGList

# Defaults to reading "ecg-liste.hash" in current directory
blacklist = ECGList(filename="my-ecg-list.hash")

Test for an email address being in the blacklist:

"foo@bar.example" in blacklist

Get an email’s status code:

code = blacklist["foo@bar.example"]

code will be None if the email address was not found in the blacklist or a status code indicating the type of match otherwise.

Same, but get a human readable string instead of a status code:

status_str = blacklist.get_blacklist_status("foo@bar.example")

Note that the data file is only loaded when the first address is verified, i.e. the address verification might raise an Exception if the hash file has vanished in the meantime.

To reread the on-disk hash file or to free up the in-memory hash table, use the reread() method like so:



Service providers that send unsolicited advertising e-mail have to observe this list. Please refer to for the legal background. Unfortunately, the only sample code provided by the RTR is in Perl (Boo! Hiss!), which prompted the creation of this module.

Obtaining the official blacklist

You will need to follow the steps outlined at to obtain a copy of the current ECG list. Save the “ecg-liste.hash” you receive and configure the ECGList to access that file.


To install this module, simply:

$ pip install email-ecglist
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
email-ecglist-1.6.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Mar 20, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting