Skip to content

Fix for regex parsing misbehaviour when mail id in received headers ends with "-by" #108

Merged
fedelemantuano merged 1 commit into
SpamScope:developfrom
nikolay-matev:regex_parsing_fix
Aug 25, 2022
Merged

Fix for regex parsing misbehaviour when mail id in received headers ends with "-by" #108
fedelemantuano merged 1 commit into
SpamScope:developfrom
nikolay-matev:regex_parsing_fix

Conversation

@nikolay-matev
Copy link
Copy Markdown
Contributor

This should fix problems such as:

More than one match found for (?:by\s+(?P<by>.+?)(?:\s*[(]?envelope-from|\s*[(]?envelope-sender|\s+from|\s+with(?! cipher)|\s+id|\s+for|\s+via|;)) in from 123.123.123.123 port=48602 helo=example.com by example.com with esmtps TLS1.2 tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 Exim 4.90-.1 envelope-from <example@example.com> id 1nqqB6-000B8x-By for example@example.com; Tue, 17 May 2022 05:55:28 +0000

Example headers causing this issue:

https://gist.github.com/matevn/56914754904828c9cc1061af12320c81

@fedelemantuano fedelemantuano merged commit 7649ee8 into SpamScope:develop Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants