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 Jun 08, 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) after any MAILER():
dnl #
dnl # File listing domains we do not SRS encode for when sending to
dnl #
define(`NO_SRS_FILE',`/etc/mail/no-srs-mailers')dnl
dnl #
dnl # Uncomment the following if you do not wish to SRS encode mail from
dnl # local domains.  Only non-local domains need to be SRS encoded to
dnl # satisfy SPF.  But encoding all outgoing mail can detect bounce forgeries.
dnl #
dnl define(`NO_SRS_FROM_LOCAL')dnl
dnl #
HACK(`pysrs',`mydomain.com')dnl

Downloads

  • pysrs-0.30.8.tar.gz
    Use HMAC algorithm instead of straight SHA-1 to match reference implementation.
    pysrs-0.30.8-1.noarch.rpm
    Redhat binary RPM.
    pysrs-0.30.8-1.src.rpm
    Redhat source RPM.
  • pysrs-0.30.7.tar.gz
    Fix sequencing in pysrs.m4. Pass fowarding domain to envfrom2srs.py.
    pysrs-0.30.7-1.noarch.rpm
    Redhat binary RPM.
    pysrs-0.30.7-1.src.rpm
    Redhat source RPM.
  • pysrs-0.30.6.tar.gz
    Sendmail m4 hack (local feature) thanks to Alain Knaff.
    pysrs-0.30.6-4.noarch.rpm
    Redhat binary RPM.
    pysrs-0.30.6-4.src.rpm
    Redhat source RPM. Release 3 fixes is_srs regex in pysrs.m4. Release 4 moves MakeSrs to end of EnvFromSMTP in pysrs.m4.
  • 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