diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-21 15:23:25 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-21 15:23:25 -0400 |
commit | 3ceda2207e9e8b2ab1bc868befd870a8bfc483a0 (patch) | |
tree | 33e21ae8e87f2c69bd7cc78ad2868f10266d8ae8 | |
parent | be580856dd137b25eb17bf37118eb62e09452ef3 (diff) | |
download | b4-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__.py | 5 |
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() |