Skip to content

sdgathman/pysrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

446fcd8 · Jun 11, 2022

History

65 Commits
Jun 17, 2020
Sep 11, 2020
Sep 11, 2020
Sep 11, 2020
Sep 11, 2020
Apr 26, 2011
Mar 18, 2010
Mar 18, 2010
Sep 11, 2020
Jun 17, 2020
Sep 11, 2020
May 20, 2022
Sep 11, 2020
Jun 17, 2020
Nov 3, 2017
Mar 17, 2010
Sep 11, 2020
Mar 2, 2014
Nov 3, 2017
Jun 17, 2020
Feb 28, 2006
Oct 17, 2017
Jun 17, 2020
May 20, 2022
Jun 17, 2020
Nov 14, 2017
Sep 11, 2020

Repository files navigation

pysrs

Python SRS (Sender Rewriting Scheme) library.

As SPF is implemented, MTAs that check SPF must account for any forwarders. One way to handle forwarding is to have the forwarding MTA rewrite envfrom to a domain they are authorized to use.

See https://www.open-spf.org/SRS for details. The Perl reference implementation and a C implementation are at http://www.libsrs2.org/

This is a python library and sendmail/Exim socketmap that rewrites MAIL FROM. Often used with python milter to reject forged bounces (that lack a valid SRS signature).

Note

The srsmilter.py program is experimental, and not intended for production. It's purpose is to explore whether the milter API supports an SRS application. The verdict is that it does not at present. There are fundamental shortcomings in the CHGFROM api and worse problems with recipient handling.

For a functioning SRS system, you must use sendmail, the macros with CF code, and the pysrs.py socket daemon. Sadly, a postfix solution will need to likewise be very postfix specific - the milter API doesn't cut it.