[Pymilter] Possible to use a milter for reverse SRS?

Stuart D. Gathman stuart at gathman.org
Mon Feb 11 17:58:00 EST 2019


On Mon, 11 Feb 2019, Mark Himsley wrote:

> Does pysrs.py replace pysrsfilter? In a later email you have a sendmail.mc 
> fragment which includes both, so I'm somewhat confused.

pysrs.py (with the sendmail.cf HACK) does both forward and reverse SRS.
That is the pysrs package.  You must have both the socket map daemon and
the HACK.

srsmilter.py was an experiment to see if CHGFROM could possible do SRS
(it can't).

Besides SRS, you may want to reject unsigned bounces (bounce spam). 
Currently, only bms.py (the big complicated milter) does this.  After
seeing people try to use srsmilter to do SRS, I decided that even though
srsmilter will never be able to do SRS do milter API shortcomings, that
it could still reject unsigned bounces.  This is not done yet.
It is almost certainly possible to reject unsigned bounces in
sendmail.cf (it is turing complete) - but I cringe at CF programming.

When I get it tested and released, you will need the m4 HACK, pysrs.py 
daemon, *and* srsmilter.py to get SRS + reject bounce spam.

To repeat, it is not possible to do SRS in a milter.  You must use
pysrs.py and the HACK.  srsmilter.py was experimental - an attempt
to coax the milter API into doing SRS.  It is a failure.  In the
next release, srsmilter.py will reject bouce spam - even though it can't
do SRS.  I could add code for that to spfmilter, it is only a few
lines, but it would have to be active only when pysrs.py is running.  Or
maybe just enabled via config.

The reason the issue never bothered me personally, is that bms.py is
my "everything and the kitched sink" milter, and it rejects bounce spam.

-- 
 	      Stuart D. Gathman <stuart at gathman.org>
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.


More information about the Pymilter mailing list