commit 379ed84: [Fix] Skip cname records when processing SPF records

Vsevolod Stakhov vsevolod at rspamd.com
Fri Aug 26 21:35:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-08-26 22:30:18 +0100
URL: https://github.com/rspamd/rspamd/commit/379ed84da218ace36a4a443fdac6f89e987bcfe0 (HEAD -> master)

[Fix] Skip cname records when processing SPF records

---
 src/libserver/spf.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index 8f7a596d9..eb7477129 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -882,6 +882,11 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
 				rec->ttl = elt_data->ttl;
 			}
 
+			if (elt_data->type == RDNS_REQUEST_CNAME) {
+				/* Skip cname aliases - it must be handled by a recursor */
+				continue;
+			}
+
 			switch (cb->cur_action) {
 				case SPF_RESOLVE_MX:
 					if (elt_data->type == RDNS_REQUEST_MX) {
@@ -984,6 +989,10 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
 									req_name->name,
 									selected->content.txt.data);
 						}
+						else {
+							msg_debug_spf ("no include record for %s",
+									req_name->name);
+						}
 					}
 					goto end;
 


More information about the Commits mailing list