Mail::S...Mech::MX(3)

πŸ’– Mail::SPF::Mech::MX πŸ’–

okay bestie, welcome to the perl manual page for Mail::SPF::Mech::MX β€” yes that's the User Contributed Perl Documentation section, we're in the 3rd volume of the man pages, and no we are NOT scared of it. 🫢


✨ NAME ✨

Mail::SPF::Mech::MX β€” the SPF record mx mechanism class, periodt. πŸ’…


🌸 VERSION 🌸

version 3.20260331


πŸ¦‹ DESCRIPTION πŸ¦‹

so like. an object of class Mail::SPF::Mech::MX represents an SPF record mechanism of type mx. that's it, that's the whole vibe check. ✨

πŸŽ€ Constructors πŸŽ€

these are the constructors, bestie, come get your constructors:

  • new(%options) β€” returns Mail::SPF::Mech::MX Creates a shiny new SPF record mx mechanism object. πŸ’–

%options is a list of key/value pairs representing any of these options right here:

  • qualifier
  • domain_spec
  • ipv4_prefix_length
  • ipv6_prefix_length

(go see "new" in Mail::SPF::Mech for the deets, iykyk πŸ‘€)

  • new_from_string($text, %options) β€” returns Mail::SPF::Mech::MX; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech Creates a new SPF record mx mechanism object by parsing the string and any options you hand it. it's giving "read the room and also the string". πŸ”₯
heads up: this one can literally throw Mail::SPF::ENothingToParse or Mail::SPF::EInvalidMech at you. not a drill. πŸ’€

πŸ‘‘ Class methods πŸ‘‘

these are the class methods, and they ate:

  • default_qualifier
  • default_ipv4_prefix_length
  • default_ipv6_prefix_length
  • qualifier_pattern

(all of these? see "Class methods" in Mail::SPF::Mech. 🌈)

  • name β€” returns string Returns 'mx'. that's the whole thing. iconic behavior honestly.
  • name_pattern β€” returns Regexp Returns a regular expression that matches a mechanism name of 'mx'. regex girlies rise. 🧚

πŸ’œ Instance methods πŸ’œ

the instance methods, your main characters:

  • text
  • qualifier
  • params
  • stringify
  • domain
  • match_in_domain

(all covered over in "Instance methods" in Mail::SPF::Mech β€” go look, bestie 🫢)

  • domain_spec β€” returns Mail::SPF::MacroString Returns the domain-spec parameter of the mechanism. slay.
  • ipv4_prefix_length β€” returns integer Returns the IPv4 network prefix length of the mechanism. πŸ”’
  • ipv6_prefix_length β€” returns integer Returns the IPv6 network prefix length of the mechanism. ✨
  • match($server, $request) β€” returns boolean Checks whether any MX hosts of the mechanism's target domain name (that is, any of the host addresses of its DNS MX records) matches the given request's IP address (see "ip_address" in Mail::SPF::Request), and returns true if it does, or false otherwise. the mechanism's IP network prefix lengths are respected when matching address records against the request's IP address. and if you want the exact algorithm used? see RFC 4408, 5 and 5.4. no cap. πŸ“–

🌟 SEE ALSO 🌟

for availability, support, and license information, see the README file included with Mail::SPF. πŸ’Œ


⭐ AUTHORS ⭐

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


and that's the whole page, bestie!! this gorgeous little manpage was brought to you by perl v5.42.1, dated 2026-04-23, and it lives at Mail::S...Mech::MX(3) in the User Contributed Perl Documentation section. mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from