Mail::M...ang::Net(3)
π Mail::MIMEDefang::Net π
okay bestie, so this page is all about Mail::MIMEDefang::Net β that's the network-y little sibling of the Mail::MIMEDefang docs, and it's exactly what it says on the tin. π¦
β¨ NAME β¨
Mail::MIMEDefang::Net β network related methods for email filters. periodt. π
πΈ DESCRIPTION πΈ
so basically Mail::MIMEDefang::Net is a whole lil collection of methods you can call from your mimedefang-filter to go talk to network services. that's the whole vibe. no cap. β¨
π METHODS π
expand_ipv6_address
gives you back an IPv6 address where every single zero field is fully written out β nothing abbreviated, nothing sneaky. and if any field is shorter than 4 hex digits? it gets padded with zeros. slay. π
reverse_ip_address_for_rbl
hands you the IP address in that reversed format that RBL lookups are obsessed with. iykyk. π§
relay_is_blacklisted
returns the result of the lookup (like 127.0.0.2, for example). the parameters are the IP address of the relay host, and the domain of the RBL server. π
email_is_blacklisted
also returns the result of the lookup (again, think 127.0.0.2). this one takes an email address, the domain of the hashbl server, and the type of hashing you want β either MD5 or SHA1. π₯
is_public_ip4_address $ip_addr
returns true if $ip_addr is a publicly-routable IPv4 address, and false otherwise. simple as that bestie. π
is_public_ip6_address $ip_addr
same energy, IPv6 edition: true if $ip_addr is a publicly-routable IPv6 address, false if it's not. π
get_mx_ip_addresses $domain [$resolver_object]
goes and grabs the IP addresses of all the MX hosts for whatever domain you hand it. and if that domain has zero MX hosts? it falls back to the A records instead. cute. π
md_get_bogus_mx_hosts $domain
returns a list of the "bogus" IP addresses hanging out in $domain's MX records. and what counts as "bogus", you ask? loopback, private, multicast, etc. β all the ones that should not be there. π
get_ptr_record $ip_address [$resolver_object]
gets you the PTR record for the IP address you pass in. that's it, that's the method. β
md_get_dmarc_record $domain
returns the DMARC record of a domain. boom. π
relay_is_blacklisted_multi
this one returns a hash table with one entry for every original domain. the entries in the hash look like:
{ $domain =<gt" $return }>
where $return is one of SERVFAIL, NXDOMAIN, or a list of IP addresses in dotted-quad form. π«Ά
relay_is_blacklisted_multi_count
returns a number telling you how many RBLs the host got blacklisted in. just a count, no drama. π
relay_is_blacklisted_multi_list
returns an array of the domains where the relay is blacklisted. so you know where the problem is. π
md_dns_txt($resolver, $name [, $filter])
queries $name for TXT records using the Net::DNS::Resolver object you supplied, and returns the first TXT string it finds β or undef on any error (that means NXDOMAIN, SERVFAIL, or just no TXT records at all, all of it). π
the optional $filter argument is a Regexp (like qr/^v=spf1\b/i, for example). when you pass one, only a TXT record whose text matches $filter comes back. that's the whole point, honestly β it lets callers pick out one specific record type (SPF, BIMI, ...) from a domain that's publishing a bunch of unrelated TXT records all at once. main character filtering energy. π
and that's the page, bestie!! this was written for version 3.7.1 and dated 2026-07-20 β so if you're reading this from the future, hi, ily, hope your filters are clean. πβ¨
π¦ where this page comes from
- fedora 43: mimedefang 3.7.1-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: mimedefang 3.7.1-1.fc44 Β· GPL-2.0-only AND 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