Mail::SPF::Mod(3pm) | User Contributed Perl Documentation | Mail::SPF::Mod(3pm) |
Mail::SPF::Mod - SPF record modifier base class
An object of class Mail::SPF::Mod represents a modifier within an SPF record. Mail::SPF::Mod cannot be instantiated directly. Create an instance of a concrete sub-class instead.
The following constructors are provided:
%options is a list of key/value pairs representing any of the following options:
The following class methods are provided:
The following instance methods are provided:
A sub-class of Mail::SPF::Mod does not have to implement this method if it supports no parameters, although this is highly unlikely.
This method is abstract and must be implemented by sub-classes of Mail::SPF::Mod.
There are different basic types of modifiers, which are described below. All of them are provided by the Mail::SPF::Mod module.
SPFv1 (RFC 4408) only knows "global" modifiers. A global modifier may appear anywhere in an SPF record, but only once. During evaluation of the record, global modifiers are processed after the last mechanism has been evaluated and an SPF result has been determined.
The following additional class method is provided by Mail::SPF::GlobalMod:
This method is abstract and must be implemented by sub-classes of Mail::SPF::GlobalMod.
The following specific instance method is provided by Mail::SPF::GlobalMod:
This method is abstract and must be implemented by sub-classes of Mail::SPF::GlobalMod.
Sender ID (RFC 4406) introduces the concept of "positional" modifiers. According to RFC 4406, a positional modifier must follow a mechanism and applies to that, and only that, mechanism. However, because this definition is not very useful, and because no positional modifiers have been defined based on it as of yet, Mail::SPF deviates from RFC 4406 as follows:
A positional modifier may appear anywhere in an SPF record, and it is stateful, i.e. it applies to all mechanisms and modifiers that follow it. Positional modifiers are generally multiple, i.e. they may appear any number of times throughout the record. During evaluation of the record, positional modifiers are processed at exactly the time when they are encountered by the evaluator. Consequently, all positional modifiers are processed before an SPF result is determined.
The following specific instance method is provided by Mail::SPF::PositionalMod:
This method is abstract and must be implemented by sub-classes of Mail::SPF::PositionalMod.
Both SPFv1 and Sender ID allow unknown modifiers to appear in SPF records in order to allow new modifiers to be introduced without breaking existing implementations. Obviously, unknown modifiers are neither global nor positional, but they may appear any number of times throughout the record and are simply ignored during evaluation of the record.
Also obviously, Mail::SPF::UnknownMod does not support a "process" method.
The following specific instance method is provided by Mail::SPF::UnknownMod:
If a Mail::SPF::Mod object is used as a string, the "stringify" method is used to convert the object into a string.
Mail::SPF::Mod::Redirect, Mail::SPF::Mod::Exp
Mail::SPF, Mail::SPF::Record, Mail::SPF::Term
<http://tools.ietf.org/html/rfc4408>
For availability, support, and license information, see the README file included with Mail::SPF.
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>
2021-01-02 | perl v5.32.0 |