From 3ceda2207e9e8b2ab1bc868befd870a8bfc483a0 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 21 May 2021 15:23:25 -0400 Subject: Strip any List-* headers matching lore Our version of public-inbox still adds List-* headers of its own. This is gone in the newer version, so strip these in hopes that this helps verify more DKIM signatures. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'b4') diff --git a/b4/__init__.py b/b4/__init__.py index eed101a..186a1e3 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1038,7 +1038,10 @@ class LoreMessage: # until we come to a passing one dkhdrs = list() for header in list(self.msg._headers): # noqa - if header[0].lower() == 'dkim-signature': + # Also remove any List- headers set by lore.kernel.org + if header[0].lower().startswith('list-') and header[1].find('lore.kernel.org') > 0: + self.msg._headers.remove(header) # noqa + elif header[0].lower() == 'dkim-signature': dkhdrs.append(header) self.msg._headers.remove(header) # noqa dkhdrs.reverse() -- cgit v1.2.3