]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add support of glob maps to multimap
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Apr 2018 09:41:43 +0000 (10:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Apr 2018 09:42:05 +0000 (10:42 +0100)
src/plugins/lua/multimap.lua

index 9d8ff54fdc2f2ef77f44c0e9af8fbd66e2a98811..e2c5e2f594c8d4b870d52f6be3372988a71dd85d 100644 (file)
@@ -944,6 +944,12 @@ local function add_multimap_rule(key, newrule)
               description = newrule['description'],
               type = 'regexp'
             })
+          elseif newrule['glob'] then
+            newrule['hash'] = rspamd_config:add_map ({
+              url = newrule['map'],
+              description = newrule['description'],
+              type = 'glob'
+            })
           else
             newrule['hash'] = rspamd_config:add_map ({
               url = newrule['map'],
@@ -983,6 +989,12 @@ local function add_multimap_rule(key, newrule)
             description = newrule['description'],
             type = 'regexp'
           })
+        elseif newrule['glob'] then
+          newrule['hash'] = rspamd_config:add_map ({
+            url = newrule['map'],
+            description = newrule['description'],
+            type = 'glob'
+          })
         else
           newrule['hash'] = rspamd_config:add_map ({
             url = newrule['map'],