Courie...e::SPF(3pm)
π Courier::Filter::Module::SPF β the tea β
okay bestie, gather round, because this is the SPF filter module for the Courier::Filter framework, and it's genuinely so good. This page lives in the Courier::Filter::Module::SPF(3pm) section of your friendly neighbourhood User Contributed Perl Documentation, and it's about to become your new obsession. π
β¨ NAME β¨
Courier::Filter::Module::SPF β the SPF filter module for the Courier::Filter framework. that's the whole name, that's the whole vibe, periodt. π
πΈ SYNOPSIS πΈ
look at her. she's beautiful. copy-paste her exactly, i'm literally begging:
use Courier::Filter::Module::SPF;
my $module = Courier::Filter::Module::SPF->new(
scope => 'mfrom' || 'helo',
match_on => ['fail', 'permerror', 'temperror'],
default_response => $default_response_text,
spf_options => {
# any Mail::SPF::Server options
},
logger => $logger,
inverse => 0,
trusting => 0,
testing => 0,
debugging => 0
);
my $filter = Courier::Filter->new(
...
modules => [ $module ],
...
);
see how she slots into modules? main character energy fr fr. π
π¦ DESCRIPTION π¦
so this class is a filter module class made to be used with Courier::Filter. By default β and listen, this is the whole point β it matches a message if the sending machine's IP address is not authorized to send mail from the envelope sender's (MAIL FROM) domain, according to that domain's SPF (Sender Policy Framework) DNS record. That's classic inbound SPF checking, no cap. β¨
and the point of inbound SPF checking? receivers protecting themselves against forged envelope sender addresses in messages sent by others. iconic protective behaviour honestly. π«Ά
π§ Constructor
here's the constructor, the following one is provided:
new(%options): returnsCourier::Filter::Module::SPFβ Creates a new SPF filter module. π
%options is a list of key/value pairs representing any of the following options:
scopeβ A string denoting the authorization scope, i.e., identity, on which the SPF check is to be performed. Defaults to'mfrom'. See"scope"inMail::SPF::Requestfor a detailed explanation. πmatch_onβ A reference to an array containing the set of SPF result codes which should cause the filter module to match a message. Possible result codes are"pass","fail","softfail","neutral","none","permerror", and"temperror". See the SPF specification for details on the meaning of those. If"temperror"is listed, a"temperror"result will by definition never cause a permanent rejection, but only a temporary one. Defaults to['fail', 'permerror', 'temperror'].
Note: With early SPF specification drafts as well as the obsoleteMail::SPF::Querymodule, the"permerror"and"temperror"result codes were known as"unknown"and"error", respectively; the old codes are now deprecated but still supported for the time being. π
default_responseβ A string that is to be returned as the module's match result in case of a match, that is when the"match_on"option includes the result code of the SPF check (by default when a message fails the SPF check). However, this default response is used only if the (claimed) MAIL FROM or HELO domain does not provide a result explanation of its own. See"default_authority_explanation"inMail::SPF::Serverfor more information.
SPF macro substitution is performed on the default response, just like on explanations provided by domain owners. If undef, Mail::SPF's default explanation will be used. Defaults to undef. π
spf_optionsβ A hash-ref specifying options for theMail::SPFserver object used by this filter module. See"new"inMail::SPF::Serverfor the supported options. If any ofMail::SPF::BlackMagic's additional options, such as"default_policy"(best-guess) or"tfwl"("trusted-forwarder.org"accreditation checking), are specified, a black-magic SPF server object will be created instead. π₯fallback_guesstrusted_forwardersβ Deprecated. These options should now be specified as"default_policy"and"tfwl"keys of the"spf_options"option instead, although these legacy options will continue to work for the time being. Furthermore, due to the move from the obsoleteMail::SPF::Querymodule to theMail::SPFreference implementation, theMail::SPF::BlackMagicextension module is now required when using these non-standard options. π
All options of the Courier::Filter::Module constructor are also supported. Please see "new" in Courier::Filter::Module for their descriptions.
π Instance methods
See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods. (yes bestie, the whole rundown is over there β nothing hidden here, go peek π)
π SEE ALSO π
Courier::Filter::ModuleCourier::Filter::OverviewMail::SPF
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. π
π REFERENCES π
- SPF website (Sender Policy Framework) β
<http://www.openspf.org> - SPF specification β
<http://www.openspf.org/Specifications>
links stay links, exactly like that, don't touch them, they're precious. πΈ
π AUTHOR π
Julian Mehnle <julian@mehnle.net> β legend behaviour, we stan. π
and that's the whole page, bestie!! π¦ this was perl v5.34.0, dated 2022-10-21, chillin' in the Courier::Filter::Module::SPF(3pm) corner of the User Contributed Perl Documentation. go forth and filter, mwah π
π
π¦ where this page comes from
- debian bookworm: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms