Viewable With Any Browser Your vote? I Disagree I Agree

Sender Rewriting Scheme in Python

This web page is written by Stuart D. Gathman
and
sponsored by Business Management Systems, Inc.
Last updated Mar 23, 2004

This is a Python implementation of the Sender Rewriting Scheme. It is a fairly direct translation of the draft implementation in Perl by Shevek. It includes a test suite, which currently checks four levels of forwarding and subsequent reversal for the Guarded, DB, and Reversible implementations.

Sendmail integration

Add the following lines to your /etc/mail/sendmail.mc (RedHat / Fedora):
#
# File listing domains we do not SRS encode for when sending to
#
define(`NO_SRS_FILE',`/etc/mail/no-srs-mailers')dnl
#
# Uncomment the following if you do not wish to SRS encode mail from
# local domains.  Only non-local domains need to be SRS encoded to
# satisfy SPF.  But encoding all outgoing mail can detect bounce forgeries.
#
dnl define(`NO_SRS_FROM_LOCAL')dnl
#
HACK(`pysrs',`mydomain.com')dnl

Downloads

  • pysrs-0.30.6.tar.gz
    Sendmail m4 hack (local feature) thanks to Alain Knaff.
  • pysrs-0.30.5.tar.gz
    Add missing import needed by SRS.new(). Make sendmail map scripts use /etc/mail/pysrs.cfg for configuration. This allows editing only one file to change config. This also supports additional software needing a matching SRS config such as Python milter.
  • pysrs-0.30.4.tar.gz
    Move global options to package module. Rename Base.SRS to Base.Base. Do not import classes into package module. Sorry if this breaks your application - this is still beta, and I didn't want to always import all implementations when only one will be used in most applications.
  • pysrs-0.30.3.tar.gz
    Bug fixes from testing envfrom2srs.py and srs2envtol.py in production with Python Milter. Test suite now covers sendmail map scripts.
  • pysrs-0.30.2.tar.gz
    Includes envfrom2srs.py and srs2envtol.py scripts suitable for use as a sendmail program map in place of a Perl script.
  • pysrs-0.30.1.tar.gz
    Includes SRS/Daemon class and test suite suitable for Exim extension. Tiny client to call Daemon with command line args.
  • pysrs-0.30.tar.gz