]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Register names for callback only symbols
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Mar 2018 14:48:11 +0000 (14:48 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Mar 2018 14:48:11 +0000 (14:48 +0000)
rules/misc.lua
src/plugins/lua/forged_recipients.lua
src/plugins/lua/mime_types.lua
src/plugins/lua/trie.lua

index 5286331857ad4b4b91bd1321eaf0421d718510c7..9d6cd01c23970f7416ab29c5b4a14e229c231def 100644 (file)
@@ -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
index a07fc668c1999d30d5258bfd193cd2e623ed0008..d9cab67c7a16f2ab82fcbd70ae6046662f05edd8 100644 (file)
@@ -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',
     })
index 24a478b9ad0439890c703b1922f352579a724294..35783eb773f3d661aafadf7fc5b53730381480f3 100644 (file)
@@ -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'
     })
index 796cd789ac6ef69a6a7ec854948b27a46e4c16e7..05c3a9fd1e7621d32a025d5e1734fe3f8b953234 100644 (file)
@@ -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
     })