]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Slightly improve logging
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 8 Oct 2020 11:01:52 +0000 (12:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 8 Oct 2020 11:01:52 +0000 (12:01 +0100)
src/libserver/spf.c

index 05326900708a97cd7cd3eac3eb605ad0465b39a7..8242d94c2d5e62477c1a7088df4e756932812786 100644 (file)
@@ -1257,6 +1257,10 @@ parse_spf_a (struct spf_record *rec,
 
                return TRUE;
        }
+       else {
+               msg_info_spf ("unresolvable A element for %s: %s", addr->spf_string,
+                               rec->sender_domain);
+       }
 
        return FALSE;
 
@@ -1293,15 +1297,18 @@ parse_spf_ptr (struct spf_record *rec,
        rspamd_mempool_add_destructor (task->task_pool, free, ptr);
        msg_debug_spf ("resolve ptr %s for %s", ptr, host);
 
-       rec->ttl = 0;
-       msg_debug_spf ("disable SPF caching as there is PTR expansion");
-
        if (rspamd_dns_resolver_request_task_forced (task,
                        spf_record_dns_callback, (void *) cb, RDNS_REQUEST_PTR, ptr)) {
                rec->requests_inflight++;
+               rec->ttl = 0;
+               msg_debug_spf ("disable SPF caching as there is PTR expansion");
 
                return TRUE;
        }
+       else {
+               msg_info_spf ("unresolvable PTR element for %s: %s", addr->spf_string,
+                               rec->sender_domain);
+       }
 
        return FALSE;
 }
@@ -1539,6 +1546,10 @@ parse_spf_include (struct spf_record *rec, struct spf_addr *addr)
 
                return TRUE;
        }
+       else {
+               msg_info_spf ("unresolvable include element for %s: %s", addr->spf_string,
+                               rec->sender_domain);
+       }
 
 
        return FALSE;
@@ -1597,6 +1608,10 @@ parse_spf_redirect (struct spf_record *rec,
 
                return TRUE;
        }
+       else {
+               msg_info_spf ("unresolvable redirect element for %s: %s", addr->spf_string,
+                               rec->sender_domain);
+       }
 
        return FALSE;
 }
@@ -1640,6 +1655,10 @@ parse_spf_exists (struct spf_record *rec, struct spf_addr *addr)
 
                return TRUE;
        }
+       else {
+               msg_info_spf ("unresolvable exists element for %s: %s", addr->spf_string,
+                               rec->sender_domain);
+       }
 
        return FALSE;
 }