From: dzjaivnt <91220882+dzjaivnt@users.noreply.github.com> Date: Thu, 12 Oct 2023 10:28:48 +0000 (+0200) Subject: Update dmarc.lua X-Git-Tag: 3.7.2~13^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4127a61ee72030c27c80c082283b73b85b3ac5c9;p=rspamd.git Update dmarc.lua When from.name is Nil its still show up, with != "" not Then you get From: via user Instead of From: otheruser via user Debug: 2023-10-12 12:08:15 #725504(normal) <0b948d>; dmarc; dmarc.lua:191: munging debug: {[user] = user, [domain] = domain.tld, [flags] = {[valid] = true}, [name] = , [raw] = user@domain.tld, [addr] = user@domain.tld} --- diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua index f80eaad5b..ff33626bf 100644 --- a/lualib/plugins/dmarc.lua +++ b/lualib/plugins/dmarc.lua @@ -188,7 +188,7 @@ exports.gen_munging_callback = function(munging_opts, settings) local via_addr = rcpt_found.addr local via_name - if from.name then + if from.name != "" then via_name = string.format('%s via %s', from.name, via_user) else via_name = string.format('%s via %s', from.user or 'unknown', via_user)