[PATCH 06/10] Use a more precise regex for email trailers
Konstantin Ryabitsev <[email protected]> Fri, 2 Oct 2020 19:29:11 -0400
| Newsgroups | org.kernel.lore.signatures |
|---|---|
| Message-ID | <[email protected]> |
Still seeing false-positives for personal follow-up trailers, so tighten a regex a bit further to make sure we don't match bogus content. Signed-off-by: Konstantin Ryabitsev <[email protected]> --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b4/__init__.py b/b4/__init__.py index d4a67a5..f0d5d24 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1206,7 +1206,7 @@ class LoreMessage: if len(others) and tname in headers: logger.debug('Ignoring %s (header after other content)', line) continue - mperson = re.search(r'<[^>]+>', groups[1]) + mperson = re.search(r'<\S+@\S+\.\S+>', groups[1]) if not mperson and tname not in nonperson: logger.debug('Ignoring %s (not a recognized non-person trailer)', line) continue -- 2.26.2