]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add default description for multimap rules
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Jul 2016 22:44:35 +0000 (23:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Jul 2016 22:44:58 +0000 (23:44 +0100)
src/plugins/lua/multimap.lua

index de20bb32391b43e628ef5563bc8b2509b40f4892..12a59c32f63f9850d879abda70f2113c5dfc2a92 100644 (file)
@@ -473,6 +473,10 @@ local function add_multimap_rule(key, newrule)
     rspamd_logger.errx(rspamd_config, 'incomplete rule, missing symbol')
     return nil
   end
+  if not newrule['description'] then
+    newrule['description'] = string.format('multimap, type %s: %s', newrule['type'],
+      newrule['symbol'])
+  end
   -- Check cdb flag
   if string.find(newrule['map'], '^cdb://.*$') then
     local test = cdb.create(newrule['map'])