From d79b9cd87057d44e5afd384be4de7e267fd466b6 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Wed, 15 Jun 2022 13:18:05 -0400 Subject: Improve identity matching for DKIM Sometimes the DKIM record will have the full email address instead of just the @domainname.com part. For those cases, drop the local part so we don't falsely claim domain mismatching during b4-am runs. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/b4/__init__.py b/b4/__init__.py index 00419be..5a901e9 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1842,8 +1842,11 @@ class LoreAttestorDKIM(LoreAttestor): self.keysrc = 'DNS' self.signtime = signtime self.passing = passing - self.identity = identity.lstrip('@') self.errors = errors + if identity.find('@') >= 0: + self.identity = identity.split('@')[1] + else: + self.identity = identity class LoreAttestorPatatt(LoreAttestor): -- cgit v1.2.3