Mail::S...edirect(3)

πŸ’– NAME πŸ’–

Mail::SPF::Mod::Redirect β€” bestie, it's the SPF record "redirect" modifier class ✨

(Yeah, this is from the User Contributed Perl Documentation manual, and it's giving very specific, very powerful energy πŸ’…)


🌸 VERSION 🌸

version 3.20260331 β€” that's the one, no cap 🫢


✨ DESCRIPTION ✨

Okay so picture this: an object of class Mail::SPF::Mod::Redirect is literally an SPF record modifier, and its whole personality is being of type "redirect". That's the vibe. That's the assignment. πŸ’–

πŸŽ€ Constructors πŸŽ€

Here are the constructors, and yes they're iconic:

  • new(%options) β€” returns Mail::SPF::Mod::Redirect. It makes you a brand-new SPF record "redirect" modifier object, fresh out the box ✨. %options is a list of key/value pairs, and it can hold any of these:
    • domain_spec β€” see "new" in Mail::SPF::Mod for the tea on this one πŸ‘€
  • new_from_string($text, %options) β€” returns Mail::SPF::Mod::Redirect; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMod. This one builds a new SPF record "redirect" modifier object by parsing the string, plus whatever options you handed it. It can absolutely throw at you, so heads up 🫠

πŸ‘‘ Class methods πŸ‘‘

The class methods, serving as always:

  • name β€” returns string. It returns 'redirect'. Short. Sweet. Main character. πŸ’…
  • name_pattern β€” returns Regexp. It returns a regular expression that matches a modifier name of 'redirect'. Slay. πŸ”₯
  • precedence β€” returns real. It returns a precedence value of 0.8. See "precedence" in Mail::SPF::Mod if you want the full lore πŸ“–

πŸ¦‹ Instance methods πŸ¦‹

And the instance methods, obsessed with them:

  • params β€” see "params" in Mail::SPF::Mod 🫢
  • domain_spec β€” returns Mail::SPF::MacroString. It returns the "domain-spec" parameter of the modifier. That's it, that's the job ✨
  • process($server, $request, $result) β€” throws Mail::SPF::Result. Okay so here's the big one: if no mechanism matched while the current SPF record was being evaluated, it goes and does a recursive SPF check, using the SPF server and request objects you gave it, and swapping in the modifier's target domain name for the request's authority domain. Then the result of that recursive SPF check gets thrown as the result of the current record's evaluation. πŸ’₯
But wait β€” if the target domain has no acceptable SPF record, then a "permerror" result gets thrown instead. Not cute, but that's the rules. See RFC 4408, 6.1, for all the details πŸ“œ
  • Also: see Mail::SPF::Mod for the other supported instance methods πŸ’œ

🌈 SEE ALSO 🌈

And for availability, support, and license info? Check the README file that comes with Mail::SPF πŸ“


πŸ’œ AUTHORS πŸ’œ

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

And that's a wrap, bestie β€” brought to you by perl v5.42.1, dated 2026-04-23, which is honestly giving vintage and we love that for it πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from