Skip to main content

EMailFilter is a customizable e-mail content filter written in Python. It consists of the following Python modules and shell scripts:

  • EMAILFILTER.PY: the core filter logic; it allows you to add as many Python filtering modules as you want, and will give each filtering module a chance to examine each e-mail message and (possibly) add ‘X-’ headers to record its findings.

  • EMAILFILTERD.PY: the preferred mode of operation for EMailFilter; it wraps EMAILFILTER.PY in a daemon that listens on a user-specific port (currently the port number is 5590 + the user id) and processes each e-mail message sent to it through that port.

  • EMAILFILTERC.PY: a command-line client program that takes its standard input, sends it through a socket to the daemon on the appropriate port, receives the processed data back, and writes it to standard output. This is not the preferred method of talking to the daemon; see the emailfilterc shell script below.

  • EMAILFILTERDEFS.PY: common definitions for all the above modules.

  • EMAILFILTERD: a shell script to invoke the daemon.

  • EMAILFILTERC: a shell script to invoke the client; it can use emailfilterc.py above if necessary, but this is slow because it requires a new instance of the Python interpreter to be loaded for each e-mail message (the message comes in on standard input and the processed message is written to standard output). The preferred method is to use either the CFilter program (available on SourceForge, see http://cfilter.sourceforge.net) as the client (this is done by invoking this script with the -c option) or the “TCP/IP swiss army knife” netcat program (this is done by invoking the script with either the -n option, if netcat goes by the command name nc, or the -t option if it goes by the command name netcat – which name it will be depends on which specific flavor of Unix/Linux you are running).

Most e-mail clients can be set up to invoke any desired filter program, sending it messages on standard input and receiving processed messages on standard output; thus, to use EMailFilter, simply tell your e-mail client to invoke emailfilterc -c as the filter program (you can leave out the -c, but as above, filtering will be significantly slower).

Installation

To install EMailFilter, you can simply run:

$ python setup.py install

at a shell prompt from the directory into which you unzipped the source tarball (the same directory that this README file is in). This will install EMailFilter, and then run each of the post-install scripts in the scripts directory.

EMailFilter requires the PLIB Python library package, which is available from the Python Package Index under the name plib. However, the helper module used by EMailFilter’s setup script, SetupHelper, can automatically detect if you don’t have PLIB installed, and if so, it will download and install it for you before installing EMailFilter.

Release files for emailfilter 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emailfilter 0.6
File Size Uploaded
emailfilter-0.6.tar.gz 29.4 kB Details

Release files / emailfilter-0.6.tar.gz

Download URL emailfilter-0.6.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
953a2d82e4b17e3b7f53ca590d6c3aacd1aac970af54ef81762292a39845d41d
BLAKE2b-256 checksum
How to use checksums
ff5ce878938950c0e2e9e755e06b68aa109548949822aa1cd19a369a15c642a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6 This release

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page