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 bypass_mode, default:passive)softfail(controlled bysoftfail_mode, default:passive)fail(controlled byfail_mode, default:reject)temperror(controlled bytemperror_mode, default:defer)permerror(controlled bypermerror_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
- possible values:
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
- possible values:
permerror_score(default: empty) β score to apply on a permerror SPF result.- by default no score is applied.
reject_message(default: empty) β iffail_modeis 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 π
- this URL could be configured with
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::Serverfor details. π
- see
hostname(default: empty) β an hostname to show in thedefault_authority_explanationas 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.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 π¦
Mail::SPFOpenSPF "" in www.openspf.orgRFC 7208 <https://tools.ietf.org/html/rfc7208>
go read them, they're giving scholar energy πβ¨
π AUTHOR π
Markus Benning <ich@markusbenning.de> β the main character who wrote this π«‘
β COPYRIGHT AND LICENSE β
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
- debian trixie: mtpolicyd 2.05-1.2 Β· GPL-2.0-only
- ubuntu questing: mtpolicyd 2.05-1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms