diff options
author | dzjaivnt <91220882+dzjaivnt@users.noreply.github.com> | 2023-10-12 12:40:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 12:40:41 +0200 |
commit | 494078bf5904086fba0816e31d02ee6788429808 (patch) | |
tree | 2a938bbaf6fa0c0135e91c62b1184abcabfdd63c /lualib/plugins | |
parent | 4127a61ee72030c27c80c082283b73b85b3ac5c9 (diff) | |
download | rspamd-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')
-rw-r--r-- | lualib/plugins/dmarc.lua | 6 |
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', |