aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/plugins/dmarc.lua
diff options
context:
space:
mode:
authordzjaivnt <91220882+dzjaivnt@users.noreply.github.com>2023-10-12 12:40:41 +0200
committerGitHub <noreply@github.com>2023-10-12 12:40:41 +0200
commit494078bf5904086fba0816e31d02ee6788429808 (patch)
tree2a938bbaf6fa0c0135e91c62b1184abcabfdd63c /lualib/plugins/dmarc.lua
parent4127a61ee72030c27c80c082283b73b85b3ac5c9 (diff)
downloadrspamd-494078bf5904086fba0816e31d02ee6788429808.tar.gz
rspamd-494078bf5904086fba0816e31d02ee6788429808.zip
Update dmarc.lua
With name: dmarc; dmarc.lua:191: munging debug: {[domain] = domain.tld [flags] = {[valid] = true, [braced] = true}, [name] = Name [domain.tld], [raw] = <user@domain.tld>, [addr] = user@domain.tld, [user] = user} dmarc; dmarc.lua:234: munged DMARC header for domain.tld: Name [domain.tld] via mark <otheruser@otherdomain.tld> -> user@domain.tld Without name: dmarc; dmarc.lua:191: munging debug: {[domain] = domain.tld [flags] = {[valid] = true, [braced] = true}, [name] = , [raw] = <user@domain.tld>, [addr] = user@domain.tld, [user] = user} dmarc.lua:234: munged DMARC header for domain.tld: user via otheruser <otheruser@otherdomain.tld> -> user@domain.tld
Diffstat (limited to 'lualib/plugins/dmarc.lua')
-rw-r--r--lualib/plugins/dmarc.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua
index ff33626bf..7791f4eb3 100644
--- a/lualib/plugins/dmarc.lua
+++ b/lualib/plugins/dmarc.lua
@@ -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',