commit f0325fc: [Minor] Add logging number of fake entries

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:09 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-15 20:15:21 +0000
URL: https://github.com/rspamd/rspamd/commit/f0325fc58b093d49dbfbed07332a31d2e8332c6e

[Minor] Add logging number of fake entries

---
 src/libserver/dns.c     | 7 ++++++-
 src/plugins/lua/rbl.lua | 1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index 02cf0d4d7..17b84884a 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -499,7 +499,12 @@ rspamd_dns_resolver_config_ucl (struct rspamd_config *cfg,
 				ucl_object_iterate_free (rep_it);
 
 				if (replies) {
-					msg_info_config ("added fake record: %s(%s)", name, rdns_str_from_type (rtype));
+					struct rdns_reply_entry *tmp_entry;
+					guint i = 0;
+					DL_COUNT (replies, tmp_entry, i);
+
+					msg_info_config ("added fake record: %s(%s); %d replies", name,
+							rdns_str_from_type (rtype), i);
 					rdns_resolver_set_fake_reply (dns_resolver->r,
 							name, rtype, rcode, replies);
 				}
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index c4582dada..4e0e1056d 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -426,7 +426,6 @@ local function gen_rbl_callback(rule)
     local dns_req = {}
 
     local function rbl_dns_callback(_, to_resolve, results, err)
-      rspamd_logger.errx(task, 'dns results: %s', results)
       rbl_dns_process(task, rule, to_resolve, results, err)
     end
 


More information about the Commits mailing list