diff options
author | Anton Yuzhaninov <citrin+git@citrin.ru> | 2020-12-14 19:31:22 +0000 |
---|---|---|
committer | Anton Yuzhaninov <citrin+git@citrin.ru> | 2020-12-14 19:31:22 +0000 |
commit | c31d5ddde33f2fb1bd410cf97fecdd2845bc5053 (patch) | |
tree | c90d89842a369d28a44da274dddadfbb7201b64d | |
parent | 5d6b526c6b764af902c85b0430497368b82a0368 (diff) | |
download | rspamd-c31d5ddde33f2fb1bd410cf97fecdd2845bc5053.tar.gz rspamd-c31d5ddde33f2fb1bd410cf97fecdd2845bc5053.zip |
[Minor] Update regexp for R_UNDISC_RCPT
Match more variations for undisclosed-recipients, but don't match when
it is used as a lame real name.
-rw-r--r-- | rules/regexp/headers.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua index b760b802e..c47205fea 100644 --- a/rules/regexp/headers.lua +++ b/rules/regexp/headers.lua @@ -106,9 +106,17 @@ reconf['MISSING_TO'] = { } -- Detects undisclosed recipients -local undisc_rcpt = 'To=/^<?undisclosed[- ]recipient/Hi' reconf['R_UNDISC_RCPT'] = { - re = string.format('(%s)', undisc_rcpt), + -- match: + -- To: undisclosed-recipients:; + -- To: Undisclosed recipients:; + -- To: undisclosed-recipients: ; + -- To: <Undisclosed-Recipient:;> + -- To: "undisclosed-recipients (utajeni adresati)": ; + -- To: Undisclosed recipients: + -- but do not match: + -- Undisclosed Recipient <user@example.org> + re = [[To=/^[<"]?undisclosed[- ]recipients?\b.*:/i{header}]], score = 3.0, description = 'Recipients are absent or undisclosed', group = 'headers', |