From 379ed84da218ace36a4a443fdac6f89e987bcfe0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 26 Aug 2022 22:30:18 +0100 Subject: [PATCH] [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; -- 2.39.5