diff options
Diffstat (limited to 'lualib/lua_scanners/cloudmark.lua')
-rw-r--r-- | lualib/lua_scanners/cloudmark.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lualib/lua_scanners/cloudmark.lua b/lualib/lua_scanners/cloudmark.lua index b07f238ea..13ebc157d 100644 --- a/lualib/lua_scanners/cloudmark.lua +++ b/lualib/lua_scanners/cloudmark.lua @@ -109,6 +109,7 @@ local function cloudmark_config(opts) symbol_fail = 'CLOUDMARK_FAIL', symbol = 'CLOUDMARK_CHECK', symbol_spam = 'CLOUDMARK_SPAM', + add_score_header = false, -- Add X-CMAE-Score header add_headers = false, -- allow addition of the headers from Cloudmark } @@ -238,6 +239,17 @@ local function parse_cloudmark_reply(task, rule, body) }) end + if rule.add_score_header then + lua_mime.modify_headers(task, { + add = { + ['X-CMAE-Score'] = { + order = 1, + value = tostring(score) + } + } + }) + end + end local function cloudmark_check(task, content, digest, rule, maybe_part) |