GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MAIL::SPF::UTIL (3)

.ds Aq ’

NAME

Mail::SPF::Util - Mail::SPF utility class

CONTENTS

SYNOPSIS



    use Mail::SPF::Util;

    $hostname = Mail::SPF::Util->hostname;

    $ipv6_address_v4mapped =
        Mail::SPF::Util->ipv4_address_to_ipv6($ipv4_address);

    $ipv4_address =
        Mail::SPF::Util->ipv6_address_to_ipv4($ipv6_address_v4mapped);

    $is_v4mapped =
        Mail::SPF::Util->ipv6_address_is_ipv4_mapped($ipv6_address);

    $ip_address_string  = Mail::SPF::Util->ip_address_to_string($ip_address);
    $reverse_name       = Mail::SPF::Util->ip_address_reverse($ip_address);

    $validated_domain = Mail::SPF::Util->valid_domain_for_ip_address(
        $spf_server, $request,
        $ip_address, $domain,
        $find_best_match,       # defaults to false
        $accept_any_domain      # defaults to false
    );

    $sanitized_string = Mail::SPF::Util->sanitize_string($string);



DESCRIPTION

<B>Mail::SPF::UtilB> is Mail::SPF’s utility class.

    Class methods

The following class methods are provided:
<B>hostnameB>: returns string Returns the fully qualified domain name (FQDN) of the local host.
<B>ipv4_address_to_ipv6($ipv4_address)B>: returns NetAddr::IP; throws Mail::SPF::EInvalidOptionValue Converts the specified NetAddr::IP IPv4 address into an IPv4-mapped IPv6 address. Throws a Mail::SPF::EInvalidOptionValue exception if the specified IP address is not an IPv4 address.
<B>ipv6_address_to_ipv4($ipv6_address)B>: returns NetAddr::IP; throws Mail::SPF::EInvalidOptionValue Converts the specified NetAddr::IP IPv4-mapped IPv6 address into a proper IPv4 address. Throws a Mail::SPF::EInvalidOptionValue exception if the specified IP address is not an IPv4-mapped IPv6 address.
<B>ipv6_address_is_ipv4_mapped($ipv6_address)B>: returns boolean Returns <B>trueB> if the specified NetAddr::IP IPv6 address is an IPv4-mapped address, <B>falseB> otherwise.
<B>ip_address_to_string($ip_address)B>: returns string; throws Mail::SPF::EInvalidOptionValue Returns the given NetAddr::IP IPv4 or IPv6 address compactly formatted as a string. For IPv4 addresses, this is equivalent to calling NetAddr::IP’s addr method. For IPv6 addresses, this is equivalent to calling NetAddr::IP’s short method. Throws a Mail::SPF::EInvalidOptionValue exception if the specified object is not a NetAddr::IP IPv4 or IPv6 address object.
<B>ip_address_reverse($ip_address)B>: returns string; throws Mail::SPF::EInvalidOptionValue Returns the in-addr.arpa./ip6.arpa. reverse notation of the given NetAddr::IP IPv4 or IPv6 address. Throws a Mail::SPF::EInvalidOptionValue exception if the specified object is not a NetAddr::IP IPv4 or IPv6 address object.
<B>valid_domain_for_ip_address($server, B>$request<B>, B>$ip_address<B>, B>$domain<B>, B>$find_best_match<B> = false, B>$accept_any_domain<B> = false)B>: returns string or <B>undefB> Finds a valid domain name for the given NetAddr::IP IP address that matches the given domain or a sub-domain thereof. A domain name is valid for the given IP address if the IP address reverse-maps to that domain name in DNS, and the domain name in turn forward-maps to the IP address. Uses the given Mail::SPF::Server and Mail::SPF::Request objects to perform DNS look-ups. Returns the validated domain name.

If $find_best_match is <B>trueB>, the one domain name is selected that best matches the given domain name, preferring direct matches over sub-domain matches. Defaults to <B>falseB>.

If $accept_any_domain is <B>trueB>, any domain names are considered acceptable, even if they differ completely from the given domain name (which is then effectively unused unless a best match is requested). Defaults to <B>falseB>.

<B>sanitize_string($string)B>: returns string or <B>undefB> Replaces all non-printable or non-ascii characters in a string with their hex-escaped representation (e.g., \x00).

SEE ALSO

Mail::SPF

For availability, support, and license information, see the README file included with Mail::SPF.

AUTHORS

Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 157: L<> starts or ends with whitespace

L<> starts or ends with whitespace

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MAIL::SPF::UTIL (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.