commit 9ec2301: [Minor] Improve logging and set hostname for further usage
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Nov 16 12:21:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-16 12:18:42 +0000
URL: https://github.com/rspamd/rspamd/commit/9ec2301bfd4ed4e343daaee1664b4c12b384e0fc (HEAD -> master)
[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
More information about the Commits
mailing list