From: Vsevolod Stakhov Date: Sat, 17 Mar 2018 14:48:11 +0000 (+0000) Subject: [Minor] Register names for callback only symbols X-Git-Tag: 1.7.1~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee638abdb4255d1af153ae619f3743814b79df22;p=thirdparty%2Frspamd.git [Minor] Register names for callback only symbols --- diff --git a/rules/misc.lua b/rules/misc.lua index 5286331857..9d6cd01c23 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 a07fc668c1..d9cab67c7a 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 24a478b9ad..35783eb773 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 796cd789ac..05c3a9fd1e 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 })