diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-17 14:48:11 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-17 14:48:11 +0000 |
commit | ee638abdb4255d1af153ae619f3743814b79df22 (patch) | |
tree | 89a042bfbbe08c3c207a838809f83052c9654544 | |
parent | 3f5511c9b11dadd45f57bb43ef1162037c11c77c (diff) | |
download | rspamd-ee638abdb4255d1af153ae619f3743814b79df22.tar.gz rspamd-ee638abdb4255d1af153ae619f3743814b79df22.zip |
[Minor] Register names for callback only symbols
-rw-r--r-- | rules/misc.lua | 1 | ||||
-rw-r--r-- | src/plugins/lua/forged_recipients.lua | 1 | ||||
-rw-r--r-- | src/plugins/lua/mime_types.lua | 1 | ||||
-rw-r--r-- | src/plugins/lua/trie.lua | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/rules/misc.lua b/rules/misc.lua index 528633185..9d6cd01c2 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -482,6 +482,7 @@ rspamd_config:register_symbol{ local check_from_display_name = rspamd_config:register_symbol{ type = 'callback', + name = 'FROM_DISPLAY_CALLBACK', callback = function (task) local from = task:get_from(2) if not (from and from[1] and from[1].name) then return false end diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index a07fc668c..d9cab67c7 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -86,6 +86,7 @@ local opts = rspamd_config:get_all_opt('forged_recipients') if opts then if opts['symbol_rcpt'] or opts['symbol_sender'] then local id = rspamd_config:register_symbol({ + name = 'FORGED_CALLBACK', callback = check_forged_headers, type = 'callback', }) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 24a478b9a..35783eb77 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1011,6 +1011,7 @@ if opts then 'mime types map') if map then local id = rspamd_config:register_symbol({ + name = 'MIME_TYPES_CALLBACK', callback = check_mime_type, type = 'callback,nostat' }) diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 796cd789a..05c3a9fd1 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -159,6 +159,7 @@ if opts then local id = -1 if mime_trie or raw_trie or body_trie then id = rspamd_config:register_symbol({ + name = 'TRIE_CALLBACK', type = 'callback', callback = tries_callback }) |