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 Nov 30, 2005

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',`/var/run/milter/pysrs')dnl
If you cannot install a version of sendmail with socketmap support, then the original program map is still available as HACK(pysrsprog).

Downloads

  • pysrs-0.30.9.tar.gz
    Support sendmail socketmap.
    pysrs-0.30.9-1.noarch.rpm
    Redhat 7,8,9 binary RPM.
    pysrs-0.30.9-1.src.rpm
    Redhat source RPM. Installs initscript pysrs daemon.
    sendmail-8.13.1-2.73.src.rpm
    Redhat 7,8,9 source RPM for sendmail-8.13.
    sendmail-8.13.1-2.i686.rpm
    Redhat 9 binary RPM for sendmail-8.13.
  • pysrs-0.30.8.tar.gz
    Use HMAC algorithm instead of straight SHA-1 to match the reference implementation. This will break all currently valid addresses, so you might want to accept apparent spoofs for a few days when upgrading.
    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.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