From 9ec2301bfd4ed4e343daaee1664b4c12b384e0fc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 16 Nov 2019 12:18:42 +0000 Subject: [PATCH] [Minor] Improve logging and set hostname for further usage --- src/plugins/lua/once_received.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index c8c47ddb1..03e098311 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -65,8 +65,11 @@ local function check_quantity_received (task) end task:insert_result(symbol_rdns, 1) else - rspamd_logger.infox(task, 'SMTP resolver failed to resolve: %1 is %2', + rspamd_logger.infox(task, 'source hostname has not been passed to Rspamd from MTA, ' .. + ' but we could resolve source IP address PTR %s as "%s"', to_resolve, results[1]) + task:set_hostname(results[1]) + if good_hosts then for _,gh in ipairs(good_hosts) do if string.find(results[1], gh) then -- 2.39.5