NAME Validate::SPF - Validates SPF text string VERSION version 0.002 SYNOPSIS use Validate::SPF qw( validate ); my $spf_text = 'v=spf1 +a/24 mx mx:mailer.example.com ip4:192.168.0.1/16 -all'; print $spf_text . "\n"; print ( validate( $spf_text ) ? 'valid' : 'NOT valid' ) . "\n"; DESCRIPTION This module implements basic SPF validation. This is ALPHA quality software. The API may change without notification! FUNCTIONS validate Parse and validate SPF string.. EXPORTS Module does not export any symbols by default. check_extra Checks extra parameters of the tokens (mechanisms, modifiers). Uses the appropriate private function to validate it. Returns the result of calling this function, or 0 if no function found. PRIVATE FUNCTIONS _validate_a Additional checks for A mechanism. The A records can be passed as a a/ a: a:/ If no *domain-name* given, the current domain is used. _validate_mx Additional checks for MX mechanism. The MX records can be passed as mx mx/ mx: mx:/ If no *domain-name* given, the current domain is used. _validate_ip4 Additional checks for IP4 mechanism. IPv4 addresses can be passed as ip4: ip4:/ If no *prefix-length* given, the /32 is assumed. _validate_ip6 Additional checks for IP6 mechanism. IPv6 addresses can be passed as ip6: ip6:/ If no *prefix-length* given, the /128 is assumed. _validate_ptr Additional checks for PTR mechanism. ptr ptr: _validate_exists Additional checks for EXISTS mechanism. exists: _validate_include Additional checks for INCLUDE mechanism. include: _validate_redirect Additional checks for REDIRECT modifier. redirect= _validate_exp Additional checks for EXP modifier. exp= SEE ALSO RFC 7208 Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1. AUTHOR Anton Gerasimov COPYRIGHT AND LICENSE This software is copyright (c) 2014 by Anton Gerasimov. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.