Last active
August 29, 2015 13:57
-
-
Save jonpryor/9647759 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env perl -w | |
use strict; | |
use Mail::SPF; | |
my $spf_server = Mail::SPF::Server->new( | |
# Optional custom default for authority explanation: | |
default_authority_explanation => 'See http://www.%{d}/why/id=%{S};ip=%{I};r=%{R}', | |
max_dns_interactive_terms => 18 | |
); | |
foreach my $argnum (0 .. $#ARGV) { | |
my $identity = $ARGV[$argnum]; | |
my $request = Mail::SPF::Request->new (identity => $identity, ip_address => '192.168.1.1'); | |
my $result = $spf_server->process($request); | |
print "$identity: $result\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment