Skip to main content

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):
    send_email(email)
else:
    print "%s does not want to receive email" % email

Usage

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")

Background

Service providers that send unsolicited advertising e-mail have to observe this list. Please refer to https://www.rtr.at/en/tk/E_Commerce_Gesetz 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 https://www.rtr.at/en/tk/NutzenECG to obtain a copy of the current ECG list. Save the “ecg-liste.hash” you receive and configure the ECGList to access that file.

Installation

To install this module, simply:

$ pip install email-ecglist

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

email-ecglist-1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

email-ecglist-1.1.macosx-10.8-x86_64.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file email-ecglist-1.1.tar.gz.

File metadata

  • Download URL: email-ecglist-1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for email-ecglist-1.1.tar.gz
Algorithm Hash digest
SHA256 db8ef5519779abafe2faa00194a381003cdd9c8baefe50d36d2200f3c61a9b36
MD5 f04acb4907da6302d46a1b6aa39df8fe
BLAKE2b-256 3766c481edc8e4fc8bbe18850cb467bcd0ddded77c467542524074b6fed7ea46

See more details on using hashes here.

File details

Details for the file email-ecglist-1.1.macosx-10.8-x86_64.tar.gz.

File metadata

File hashes

Hashes for email-ecglist-1.1.macosx-10.8-x86_64.tar.gz
Algorithm Hash digest
SHA256 269f853a641d3bfe60c69450a74983e12bc02e6660397a37affd7e1de5867d7f
MD5 4e5c0c6575d6b97d89c62d7aa4c91428
BLAKE2b-256 cda9bbbf80c563b29ea16fce4107fa82f3bd43e37d473bff05d0c1a264e4e56b

See more details on using hashes here.

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