Courie...r::Util(3pm)
π NAME π
okay so this is Courier::Filter::Util β the utility class that the Courier::Filter framework leans on. it's the little helper bestie, fr fr.
β¨ SYNOPSIS β¨
use Courier::Filter::Util qw(
ipv4_address_pattern
ipv6_address_pattern
loopback_address_pattern
);
$message->remote_host =~ / ^ (?: ::ffff: )? $(\ipv4_address_pattern} $ /x;
$message->remote_host =~ / ^ $(\ipv6_address_pattern} $ /x;
$message->remote_host =~ / ^ ${\loopback_address_pattern} $ /x;
like, you import the three patterns, and then you can drop them straight into a regex to vibe-check $message->remote_host. iconique.
πΈ DESCRIPTION πΈ
Courier::Filter::Util is Courier::Filter's utility class. that's literally its whole job and it does it flawlessly. no notes. π
π Constants π
here's the lineup of constants it hands you:
ipv4_address_patternβ a regular expression that matches an IPv4 address written out in "dotted decimal" notation. classic. old reliable. β¨ipv6_address_patternβ a regular expression that matches an IPv6 address in full RFC 4291 syntax. yes, full β no shortcuts, she's giving complete. πloopback_address_patternβ a regular expression that matches an IPv4 or IPv6 loopback address, aka"127.n.n.n","::ffff:127.n.n.n.n", or"::1". that's the "it's me, i'm the computer talking to myself" energy π¦
π SEE ALSO π
Courier::Filter.- for AVAILABILITY, SUPPORT, and LICENSE information, go look at
Courier::Filter::Overview. everything you need lives over there, bestie. π«Ά
π AUTHOR π
Julian Mehnle <julian@mehnle.net> β king behavior, honestly. π
and that's the whole page, babes π this one shipped as perl v5.34.0, dated 2022-10-21, filed under Courie...r::Util(3pm) β periodt. πβ¨
π¦ where this page comes from
- debian bookworm: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms