Skip to content

Commit

Permalink
[Minor] Improve logging and set hostname for further usage
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Nov 16, 2019
1 parent fb61b5b commit 9ec2301
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/lua/once_received.lua
Expand Up @@ -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
Expand Down

0 comments on commit 9ec2301

Please sign in to comment.