diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-12-10 11:36:41 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-12-10 11:36:41 +0000 |
commit | ad9a444a525e51290a1845927e84188d2e9f18bf (patch) | |
tree | 5b80696b1e7271bba548f18266813f2ef35f3267 /lualib/lua_mime.lua | |
parent | 717cfba84f7a80e0d164a03a2bf45b06b2f07075 (diff) | |
download | rspamd-ad9a444a525e51290a1845927e84188d2e9f18bf.tar.gz rspamd-ad9a444a525e51290a1845927e84188d2e9f18bf.zip |
[Minor] Some adjustments
Diffstat (limited to 'lualib/lua_mime.lua')
-rw-r--r-- | lualib/lua_mime.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 24d02c304..1135f2b63 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -969,7 +969,7 @@ exports.anonymize_message = function(task, settings) local rspamd_re = require "rspamd_regexp" local lua_util = require "lua_util" -- We exclude words with digits, currency symbols and so on - local exclude_words_re = rspamd_re.create_cached([[/^(?:\d+|\d+\D{1,3}|\p{Sc}.*|(\+?\d{1,3}[\s\-]?)?)$/u]]) + local exclude_words_re = rspamd_re.create_cached([=[/^(?:\d+|\d+\D{1,3}|\p{Sc}.*|(\+?\d{1,3}[\s\-]?)?)$/(:?^[[:alpha:]]*\d{4,}.*$)/u]=]) local newline_s = newline(task) local state = { newline_s = newline_s @@ -1120,9 +1120,9 @@ exports.anonymize_message = function(task, settings) end -- Construct new message - table.insert(text_content, '\nurls: ') + table.insert(text_content, '\nurls:') table.insert(text_content, table.concat(lua_util.keys(urls), ', ')) - table.insert(text_content, '\nemails: ') + table.insert(text_content, '\nemails:') table.insert(text_content, table.concat(lua_util.keys(emails), ', ')) local new_text = table.concat(text_content, ' ') |