Sisima...uirePTR(3pm)

πŸ“¦
version 5.7.0 Β· 4 versions
, in ubuntu stonking

✨ Sisimai::Reason::RequirePTR ✨

okay bestie, gather round 🫢 this is the Sisimai::Reason::RequirePTR page from the User Contributed Perl Documentation (section 3pm, iykyk). no cap, it's a tiny little class with one job and it does it flawlessly πŸ’…


🌸 NAME 🌸

Sisimai::Reason::RequirePTR β€” deciding whether a bounce reason is "requireptr" or not. that's it. that's the whole vibe. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

the way you literally just import it and ask it stuff:

use Sisimai::Reason::RequirePTR;
print Sisimai::Reason::->match('The IP address sending this message does not have a PTR recor'); # 1

boom. it prints 1. main character energy fr fr πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so "Sisimai::Reason::RequirePTR" checks whether a bounce reason is "requireptr" or not. that's its whole personality. this class is called only from the Sisimai::Reason class β€” like, it doesn't just hang out with anyone, it's exclusive bestie πŸŽ€

and what is this error? it's the one where the SMTP connection got rejected because the source IP address used for the SMTP connection was missing a PTR record or was rocking an invalid PTR record. problematic behavior honestly 😭

here's what that looks like in the wild, verbatim:

host gmail-smtp-in.l.google.com[142.251.170.27] said:
[192.0.2.25] The IP address sending this message does not have a PTR record setup, or the
corresponding forward DNS entry does not point to the sending IP. As a policy, Gmail does
not accept messages from IPs with missing PTR records. For more information, go to
https://support.google.com/mail/answer/81126#ip-practices (in reply to end of DATA command)

πŸ’… CLASS METHODS πŸ’…

✨ "text()"

the text() method returns the fixed string "requireptr". it never changes, it's committed, it's loyal 🫢

print Sisimai::Reason::RequirePTR->text;  # "requireptr"

and then, slay, the match() method returns 1 if the argument matched with patterns defined in this class. iconic matching behavior fr:

print Sisimai::Reason::RequirePTR->match('Reverse DNS failed');   # 1

✨ "true(Sisimai::Fact)"

the true() method returns 1 if the bounce reason is "requireptr". the argument must be a Sisimai::Fact object, and heads up β€” this method is called only from the Sisimai::Reason class. so like, don't just call it from anywhere, bestie πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

azumakuniyuki


Copyright (C) 2024-2026 azumakuniyuki, All rights reserved.


⭐ LICENSE ⭐

This software is distributed under The BSD 2-Clause License. periodt. πŸ’œ


and that's a wrap on this one, bestie!! πŸŽ€ this page came to you via perl v5.40.1, dated 2026-07-05, from the good people over at Sisima...uirePTR(3pm). go forth and validate your PTR records, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from