summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-21 15:23:25 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-21 15:23:25 -0400
commit3ceda2207e9e8b2ab1bc868befd870a8bfc483a0 (patch)
tree33e21ae8e87f2c69bd7cc78ad2868f10266d8ae8
parentbe580856dd137b25eb17bf37118eb62e09452ef3 (diff)
downloadb4-3ceda2207e9e8b2ab1bc868befd870a8bfc483a0.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py5
1 files changed, 4 insertions, 1 deletions
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()