diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-10-14 09:31:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 09:31:19 +0100 |
commit | 3f031b071cc104fa03db38cfdb532f2e3b22be6a (patch) | |
tree | 0c7e0f54ac8239525260fbe63885f8530c630e40 | |
parent | 452bf19ced0c346c616ea3301cde2531ef617033 (diff) | |
parent | 494078bf5904086fba0816e31d02ee6788429808 (diff) | |
download | rspamd-3f031b071cc104fa03db38cfdb532f2e3b22be6a.tar.gz rspamd-3f031b071cc104fa03db38cfdb532f2e3b22be6a.zip |
Merge pull request #4640 from dzjaivnt/dzjaivnt-patch-1
Dzjaivnt patch 1
-rw-r--r-- | lualib/plugins/dmarc.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua index 6acf982c3..7791f4eb3 100644 --- a/lualib/plugins/dmarc.lua +++ b/lualib/plugins/dmarc.lua @@ -151,7 +151,7 @@ exports.gen_munging_callback = function(munging_opts, settings) if munging_opts.munge_map_condition then local accepted, trace = munging_opts.munge_map_condition:process(task) if not accepted then - lua_util.debugm(task, 'skip munging, maps condition not satisfied: (%s)', + lua_util.debugm(N, task, 'skip munging, maps condition not satisfied: (%s)', trace) -- Excepted return @@ -170,7 +170,7 @@ exports.gen_munging_callback = function(munging_opts, settings) end if not rcpt_found then - lua_util.debugm(task, 'skip munging, recipients are not in list_map') + lua_util.debugm(N, task, 'skip munging, recipients are not in list_map') -- Excepted return end @@ -178,7 +178,7 @@ exports.gen_munging_callback = function(munging_opts, settings) local from = task:get_from({ 'mime', 'orig' }) if not from or not from[1] then - lua_util.debugm(task, 'skip munging, from is bad') + lua_util.debugm(N, task, 'skip munging, from is bad') -- Excepted return end @@ -188,10 +188,10 @@ exports.gen_munging_callback = function(munging_opts, settings) local via_addr = rcpt_found.addr local via_name - if from.name then - via_name = string.format('%s via %s', from.name, via_user) - else + if from.name == "" then via_name = string.format('%s via %s', from.user or 'unknown', via_user) + else + via_name = string.format('%s via %s', from.name, via_user) end local hdr_encoded = rspamd_util.fold_header('From', |