Merge pull request #25 from chillout2k/devel

Strip BATV-signatures out of envelope sender address
This commit is contained in:
Dominik Chilla 2019-11-20 00:58:00 +01:00 committed by GitHub
commit 269f446b3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,9 @@ class LdapAclMilter(Milter.Base):
logging.error(self.mconn_id + "/FROM sasl_user " + traceback.format_exc())
mailfrom = mailfrom.replace("<","")
mailfrom = mailfrom.replace(">","")
# BATV (https://tools.ietf.org/html/draft-levine-smtp-batv-01)
# Strip out Simple Private Signature (PRVS)
mailfrom = re.sub(r"^prvs=.{10}=", '', mailfrom)
self.env_from = mailfrom
m = g_re_domain.match(self.env_from)
if m == None: