Mail::...n::SPF(3pm)

πŸ’– Mail::MtPolicyd::Plugin::SPF(3pm) β€” the manual, but make it cute πŸ’–

okay bestie, so the manual name up top is Mail::MtPolicyd::Plugin::SPF(3pm) (the header squishes it down to Mail::...n::SPF(3pm) bc apparently terminals have a character budget πŸ™„) and it lives in the User Contributed Perl Documentation corner of the world. this is a mtpolicyd plugin that does SPF checks. yes THAT SPF. let's get into it πŸ¦‹


✨ NAME ✨

Mail::MtPolicyd::Plugin::SPF β€” the mtpolicyd plugin that applies SPF checks. that's it, that's the name, iconic πŸ’…


🌸 VERSION 🌸

version 2.05 β€” periodt ✨


πŸ‘‘ DESCRIPTION πŸ‘‘

so basically this plugin applies Sender Policy Framework (SPF) checks. vibe check for email senders, fr fr πŸŽ€

the checks are implemented using the Mail::SPF perl module. shoutout to them, they ate 🫢

you can set up actions based on what the SPF result comes back as:

  • pass (controlled by pass_mode, default: passive)
  • softfail (controlled by softfail_mode, default: passive)
  • fail (controlled by fail_mode, default: reject)
  • temperror (controlled by temperror_mode, default: defer)
  • permerror (controlled by permerror_mode, default: reject)

and for status neutral? no action or score is applied. neutral is just out here existing, no thoughts head empty πŸ’€


πŸŽ€ PARAMETERS πŸŽ€

  • (uc_)enabled (default: on) β€” turn the plugin on or off. the (uc_) bit means you can write it uppercase too, go off πŸ’…
  • (uc_)pass_mode (default: passive) β€” how to behave when the SPF checks passed successfully:
    • passive β€” just apply score. do not return an action. lowkey chill.
    • accept, dunno β€” will return an 'dunno' action. (yes, "an 'dunno'", the manual said it, i'm just the messenger 😭)
  • pass_score (default: empty) β€” the score to apply when the sender has been successfully checked against SPF. treat yourself ✨
  • (uc_)softfail_mode (default: passive) β€” how to behave if the SPF checks returned a softfail status:
    • passive β€” just apply score. do not return an action.
    • accept, dunno β€” will return an 'dunno' action.
    • reject β€” return an reject action. 🚫
  • softfail_score (default: empty) β€” score to apply when the SPF check returns an softfail status.
  • (uc_)fail_mode (default: reject) β€” what to do on a fail:
    • reject β€” return an reject action. bye bestie πŸ‘‹
    • passive β€” just apply score and do not return an action.
  • temperror_mode (default: defer) β€” the action to apply on a temperror SPF result.
    • possible values: passive, dunno, defer, reject
  • temperror_score (default: empty) β€” score to apply on a temperror SPF result.
    • by default no score is applied.
  • permerror_mode (default: reject) β€” the action to apply on a permerror SPF result.
    • possible values: passive, dunno, defer, reject
  • permerror_score (default: empty) β€” score to apply on a permerror SPF result.
    • by default no score is applied.
  • reject_message (default: empty) β€” if fail_mode is set to 'reject', this message is used in the reject.
    • the following pattern will be replaced in the string:
    • %LOCAL_EXPL% β€” will be replaced with a (local) explanation of the check result.
    • %AUTH_EXPL% β€” will be replaced with a URL to the explanation of the result.
      • this URL could be configured with 'default_authority_explanation'. iykyk πŸ’œ
  • fail_score (default: empty) β€” score to apply if the sender failed the SPF checks.
  • default_authority_explanation (default: See http://www.%{d}/why/id=%{S};ip=%{I};r=%{R}) β€” a string to return as an URL pointing to an explanation of the SPF check result.
    • see Mail::SPF::Server for details. πŸ‘€
  • hostname (default: empty) β€” an hostname to show in the default_authority_explanation as generating server.
  • whitelist (default: '') β€” a comma separated list of IP addresses to skip. you're on the list, bestie 🫢
  • check_helo (default: "on") β€” set it to 'off' to disable SPF check on helo.
  • max_dns_interactive_terms (default: 10) β€” maximum number of terms using DNS lookup in a SPF record to evaluate.
    • exceeding this limit will cause a permanent error as specified by RFC7208.
    • the default of 10 is also specified in by RFC7208. (yes it says "specified in by", the manual is doing its best, no notes πŸ™ˆ)
  • max_name_lookups_per_term (default: 10) β€” maximum number of DNS lookups per SPF term.
  • max_void_dns_lookups (default: 2) β€” maximum number of void DNS lookups.

🌈 EXAMPLE 🌈

here's the config glow-up, copy it exactly bestie:

<Plugin spf>
  module = "SPF"
  pass_mode = passive
  pass_score = -10
  fail_mode = reject
  #fail_score = 10
</Plugin>

πŸ¦‹ SEE ALSO πŸ¦‹

go read them, they're giving scholar energy πŸ“šβœ¨


πŸ’œ AUTHOR πŸ’œ

Markus Benning <ich@markusbenning.de> β€” the main character who wrote this 🫑


this software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.

this is free software, licensed under:

The GNU General Public License, Version 2, June 1991

and that's the whole page, bestie β€” no cap, we kept every single flag, default, and pattern πŸ’–

sign-off: this page was brought to you by perl v5.38.2, dated 2024-05-26, and the manual name Mail::...n::SPF(3pm) πŸ’… mwah, go configure your SPF modes responsibly πŸŽ€βœ¨

πŸ“¦ where this page comes from