Mail::SPF::Mod



Mail::SPF::Mod

NAME
DESCRIPTION
MODIFIER TYPES
OVERLOADING
SEE ALSO
AUTHORS

NAME

Mail::SPF::Mod − SPF record modifier base class

DESCRIPTION

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.

Constructors
The following constructors are provided:
new(%options)
: returns Mail::SPF::Mod

Abstract. Creates a new SPF record modifier object.

%options is a list of key/value pairs representing any of the following options:
text

A string denoting the unparsed text of the modifier.

name

A string denoting the name of the modifier. Required if a generic Mail::SPF::Mod object (as opposed to a specific sub-class) is being constructed.

domain_spec

Either a plain string or a Mail::SPF::MacroString object denoting an optional "domain−spec" parameter of the mechanism.

new_from_string($text, %options): returns Mail::SPF::Mod; throws
Mail::SPF::ENothingToParse
, Mail::SPF::EInvalidMod

Abstract. Creates a new SPF record modifier object by parsing the string and any options given.

Class methods
The following class methods are provided:
name_pattern
: returns Regexp

Returns a regular expression that matches any legal modifier name.

Instance methods
The following instance methods are provided:
text
: returns string; throws Mail::SPF::ENoUnparsedText

Returns the unparsed text of the modifier. Throws a Mail::SPF::ENoUnparsedText exception if the modifier was created synthetically instead of being parsed, and no text was provided.

name: returns string

Returns the name of the modifier.

params: returns string

Abstract. Returns the modifier’s parameters formatted as a string.

A sub-class of Mail::SPF::Mod does not have to implement this method if it supports no parameters, although this is highly unlikely.

stringify: returns string

Formats the modifier’s name and parameters as a string and returns it. You can simply use a Mail::SPF::Mod object as a string for the same effect, see " OVERLOADING ".

process: throws Mail::SPF::Result, Mail::SPF::Result::Error,
Mail::SPF::Exception

Abstract. Processes the modifier. What that means depends on the actual implementation in sub-classes. See " MODIFIER TYPES " below.

This method is abstract and must be implemented by sub-classes of Mail::SPF::Mod.

MODIFIER TYPES

There are different basic types of modifiers, which are described below. All of them are provided by the Mail::SPF::Mod module.

Global modifiers − Mail::SPF::GlobalMod
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:
precedence
: returns real

Abstract. Returns a real number between 0 and 1 denoting the precedence of the type of the global modifier. Global modifiers present in an SPF record are processed in the order of their precedence values, 0 meaning "first".

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:
process($server, $request,
$result): throws Mail::SPF::Result

Abstract. Processes the modifier. What that means depends on the actual implementation in sub-classes. Takes both a Mail::SPF::Server and a Mail::SPF::Request object. As global modifiers are generally processed after an SPF result has already been determined, takes also the current Mail::SPF::Result. If the modifier wishes to modify the SPF result, it may throw a different Mail::SPF::Result object.

This method is abstract and must be implemented by sub-classes of Mail::SPF::GlobalMod.

Positional modifiers − Mail::SPF::PositionalMod
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:
process($server, $request)
: throws Mail::SPF::Result::Error,
Mail::SPF::Exception

Abstract. Processes the modifier. What that means depends on the actual implementation in sub-classes. Takes both a Mail::SPF::Server and a Mail::SPF::Request object. As global modifiers are generally processed before an SPF result has been determined, no result object is available to the modifier. The modifier can (at least at this time) not directly modify the final SPF result, however it may throw an exception to signal an error condition.

This method is abstract and must be implemented by sub-classes of Mail::SPF::PositionalMod.

Unknown modifiers − Mail::SPF::UnknownMod
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:
params
: returns string

Returns the modifier’s unparsed value as a string.

OVERLOADING

If a Mail::SPF::Mod object is used as a string, the "stringify" method is used to convert the object into a string.

SEE ALSO

Mail::SPF::Mod::Redirect, Mail::SPF::Mod::Exp

Mail::SPF, Mail::SPF::Record, Mail::SPF::Term

<http://www.ietf.org/rfc/rfc4408.txt>

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

AUTHORS

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



More Linux Commands

manpages/ether_aton.3.html
ether_aton(3) - Ethernet address manipulation routines......
ether_aton() converts the 48-bit Ethernet host address asc from the standard hex-digits-and-colons notation into binary data in network byte order and returns a

manpages/syslog.3.html
syslog(3) - send messages to the system logger (Man Page)...
closelog() closes the descriptor being used to write to the system logger. The use of closelog() is optional. openlog() opens a connection to the system logger

manpages/gnutls_openpgp_crt_import.3.html
gnutls_openpgp_crt_import(3) - API function - Linux man page
This function will convert the given RAW or Base64 encoded key to the native gnutls_openpgp_crt_t format. The output will be stored in key. RETURNS GNUTLS_E_SUC

manpages/snmp_free_var.3.html
snmp_free_var(3) - netsnmp_varbind_api functions (Man Page)
The functions dealing with variable bindings fall into four groups dealing with the creation, setting of values, output and deletion of varbinds. Creation snmp_

manpages/Tcl_SetObjResult.3.html
Tcl_SetObjResult(3) - manipulate Tcl result - Linux man page
The procedures described here are utilities for manipulating the result value in a Tcl interpreter. The interpreter result may be either a Tcl object or a strin

manpages/Config::Extensions.3pm.html
Config::Extensions(3pm) - hash lookup of which core extensio
The Config::Extensions module provides a hash %Extensions containing all the core extensions that were enabled for this perl. The hash is keyed by extension nam

manpages/XIChangeHierarchy.3.html
XIChangeHierarchy(3) - change the device hierarchy (ManPage)
XIChangeHierarchy modifies the device hierarchy by creating or removing master devices or changing the attachment of slave devices. If num_changes is non-zero,

manpages/XkbKeyNumSyms.3.html
XkbKeyNumSyms(3) - Returns the total number of keysyms for t
XkbKeyNumSyms.3 - The key width and number of groups associated with a key are used to form a small two-dimensional array of KeySyms for a key. This array may b

manpages/Tcl_RegExpExec.3.html
Tcl_RegExpExec(3) - Pattern matching with regular expression
Tcl_RegExpMatch determines whether its pattern argument matches regexp, where regexp is interpreted as a regular expression using the rules in the re_syntax ref

manpages/chromium.1.html
chromium(1) - the web browser from Google - Linux man page
See the Google Chrome help center for help on using the browser. &lt;http://www.no_google.com/support/chrome/&gt; This manpage only describes invocation, environment,

manpages/XtReleasePropertyAtom.3.html
XtReleasePropertyAtom(3) - maintain a cache of property atom
XtReservePropertyAtom returns an atom that may be used for properties in conjunction with conversion requests from widget w. The atom returned will be unique fo

manpages/git-merge.1.html
git-merge(1) - Join two or more development histories togeth
Incorporates changes from the named commits (since the time their histories diverged from the current branch) into the current branch. This command is used by g





We can't live, work or learn in freedom unless the software we use is free.