Courie...e::SPF(3pm)

πŸ“¦
version 0.200 Β· 2 versions
, in debian bookworm, debian trixie

πŸ’– 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): returns Courier::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" in Mail::SPF::Request for 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 obsolete Mail::SPF::Query module, 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" in Mail::SPF::Server for 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 the Mail::SPF server object used by this filter module. See "new" in Mail::SPF::Server for the supported options. If any of Mail::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_guess
  • trusted_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 obsolete Mail::SPF::Query module to the Mail::SPF reference implementation, the Mail::SPF::BlackMagic extension 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::Module
  • Courier::Filter::Overview
  • Mail::SPF

For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. πŸ’–


πŸ“š REFERENCES πŸ“š

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