| Mail-SPF documentation | Contained in the Mail-SPF distribution. |
Mail::SPF - An object-oriented implementation of Sender Policy Framework
2.007
use Mail::SPF;
my $spf_server = Mail::SPF::Server->new();
my $request = Mail::SPF::Request->new(
versions => [1, 2], # optional
scope => 'mfrom', # or 'helo', 'pra'
identity => 'fred@example.com',
ip_address => '192.168.0.1',
helo_identity => 'mta.example.com' # optional,
# for %{h} macro expansion
);
my $result = $spf_server->process($request);
print("$result\n");
my $result_code = $result->code; # 'pass', 'fail', etc.
my $local_exp = $result->local_explanation;
my $authority_exp = $result->authority_explanation
if $result->is_code('fail');
my $spf_header = $result->received_spf_header;
Mail::SPF is an object-oriented implementation of Sender Policy Framework (SPF). See http://www.openspf.org for more information about SPF.
This class collection aims to fully conform to the SPF specification (RFC 4408) so as to serve both as a production quality SPF implementation and as a reference for other developers of SPF implementations.
Mail::SPF::Server, Mail::SPF::Request, Mail::SPF::Result
For availability, support, and license information, see the README file included with Mail::SPF.
http://www.openspf.org/Specifications, http://www.ietf.org/rfc/rfc4408.txt
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>
| Mail-SPF documentation | Contained in the Mail-SPF distribution. |
# # Mail::SPF # An object-oriented Perl implementation of Sender Policy Framework. # <http://search.cpan.org/dist/Mail-SPF> # # (C) 2005-2009 Julian Mehnle <julian@mehnle.net> # 2005 Shevek <cpan@anarres.org> # $Id: SPF.pm 53 2009-10-31 21:40:08Z Julian Mehnle $ # ############################################################################## package Mail::SPF;
use version; our $VERSION = qv('2.007'); use warnings; use strict; use Mail::SPF::Server; use Mail::SPF::Request; use constant TRUE => (0 == 0); use constant FALSE => not TRUE;
TRUE;