From b35abfa3bfb239af64ec4b27eccc12866dc3e9bd Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 17 Feb 2011 23:51:40 -0800 Subject: [PATCH] Handle SPF exists: tag http://www.virtualmin.com/node/17242 --- bind8/records-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bind8/records-lib.pl b/bind8/records-lib.pl index 78a6f16be..66051693e 100755 --- a/bind8/records-lib.pl +++ b/bind8/records-lib.pl @@ -662,7 +662,7 @@ if ($txt =~ /^v=spf1/) { if ($w eq "a" || $w eq "mx" || $w eq "ptr") { $spf->{$w} = 1; } - elsif ($w =~ /^(a|mx|ip4|ip6|ptr|include):(\S+)$/) { + elsif ($w =~ /^(a|mx|ip4|ip6|ptr|include|exists):(\S+)$/) { push(@{$spf->{"$1:"}}, $2); } elsif ($w eq "-all") { @@ -704,7 +704,7 @@ local @rv = ( "v=spf1" ); foreach my $s ("a", "mx", "ptr") { push(@rv, $s) if ($spf->{$s}); } -foreach my $s ("a", "mx", "ip4", "ip6", "ptr", "include") { +foreach my $s ("a", "mx", "ip4", "ip6", "ptr", "include", "exists") { foreach my $v (@{$spf->{"$s:"}}) { push(@rv, "$s:$v"); }