From f613668cb40a90eff0820e13c877a24f1641dd76 Mon Sep 17 00:00:00 2001 From: Scott Kitterman Date: Thu, 12 Jan 2012 10:30:45 -0500 Subject: [PATCH] ! Query only TXT and not DNS RR Type SPF records to reduce unnecessary DNS lookups (LP: #161133) --- CHANGES | 2 ++ postfix-policyd-spf-perl | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 8e72c42..b3d21ec 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,8 @@ # * = Fixed a bug, or made a minor improvement --- 2.008 UNRELEASED + ! Query only TXT and not DNS RR Type SPF records to reduce unnecessary DNS + lookups (LP: #161133) * Fix incorrect version string * Ensure all variables are initialized prior to being passed to syslog diff --git a/postfix-policyd-spf-perl b/postfix-policyd-spf-perl index 85bf971..f36108f 100755 --- a/postfix-policyd-spf-perl +++ b/postfix-policyd-spf-perl @@ -41,8 +41,11 @@ my $resolver = Net::DNS::Resolver->new( # Makes for a total timeout for UDP queries of 5s * 2 = 10s. ); +# query_rr_type_all will query both type TXT and type SPF. This upstream +# default is changed due to there being essentiall no type SPF deployment. my $spf_server = Mail::SPF::Server->new( - dns_resolver => $resolver + dns_resolver => $resolver, + query_rr_types => Mail::SPF::Server->query_rr_type_txt ); # Adding more handlers is easy: