From 806b88c02ecb85e81b8460cb0fcbcb406840b782 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 8 Sep 2017 19:17:34 +0100 Subject: [PATCH] [Fix] Do not cache SPF records with PTR elements --- src/libserver/spf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libserver/spf.c b/src/libserver/spf.c index a3a1b95f8..6378fa5d2 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -1046,6 +1046,10 @@ 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 (make_dns_request_task_forced (task, spf_record_dns_callback, (void *) cb, RDNS_REQUEST_PTR, ptr)) { rec->requests_inflight++; -- 2.39.5