.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::MIMEDefang::Net 3" .TH Mail::MIMEDefang::Net 3 2024-03-20 3.4.1 "Mail::MIMEDefang::Net Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::MIMEDefang::Net \- Network related methods for email filters .SH DESCRIPTION .IX Header "DESCRIPTION" Mail::MIMEDefang::Net are a set of methods that can be called from \fImimedefang-filter\fR to call network related services. .SH METHODS .IX Header "METHODS" .IP expand_ipv6_address 4 .IX Item "expand_ipv6_address" Method that returns an IPv6 address with all zero fields explicitly expanded, any field shorter than 4 hex digits will be padded with zeros. .IP reverse_ip_address_for_rbl 4 .IX Item "reverse_ip_address_for_rbl" Method that returns the ip address in the appropriately-reversed format used for RBL lookups. .IP relay_is_blacklisted 4 .IX Item "relay_is_blacklisted" Method that returns the result of the lookup (eg 127.0.0.2). Parameters are the ip address of the relay host and the domain of the rbl server. .IP email_is_blacklisted 4 .IX Item "email_is_blacklisted" Method that returns the result of the lookup (eg 127.0.0.2). Parameters are an email address, the domain of the hashbl server, and the type of hashing (MD5 or SHA1). .ie n .IP "is_public_ip4_address $ip_addr" 4 .el .IP "is_public_ip4_address \f(CW$ip_addr\fR" 4 .IX Item "is_public_ip4_address $ip_addr" Returns true if \f(CW$ip_addr\fR is a publicly-routable IPv4 address, false otherwise .ie n .IP "is_public_ip6_address $ip_addr" 4 .el .IP "is_public_ip6_address \f(CW$ip_addr\fR" 4 .IX Item "is_public_ip6_address $ip_addr" Returns true if \f(CW$ip_addr\fR is a publicly-routable IPv6 address, false otherwise .ie n .IP "get_mx_ip_addresses $domain [$resolver_object]" 4 .el .IP "get_mx_ip_addresses \f(CW$domain\fR [$resolver_object]" 4 .IX Item "get_mx_ip_addresses $domain [$resolver_object]" Get IP addresses of all MX hosts for given domain. If there are no MX hosts, then return A records. .ie n .IP "md_get_bogus_mx_hosts $domain" 4 .el .IP "md_get_bogus_mx_hosts \f(CW$domain\fR" 4 .IX Item "md_get_bogus_mx_hosts $domain" Returns a list of "bogus" IP addresses that are in \f(CW$domain\fR's list of MX records. A "bogus" IP address is loopback/private/multicast/etc. .IP relay_is_blacklisted_multi 4 .IX Item "relay_is_blacklisted_multi" Method that rerurns a hash table with one entry per original domain. Entries in hash will be: \&\f(CW\*(C`{ $domain =, where \f(CW$return\fR is one of SERVFAIL, NXDOMAIN or a list of IP addresses as a dotted-quad. .IP relay_is_blacklisted_multi_count 4 .IX Item "relay_is_blacklisted_multi_count" Method that returns a number indicating how many RBLs the host was blacklisted in. .IP relay_is_blacklisted_multi_list 4 .IX Item "relay_is_blacklisted_multi_list" Method that returns an array indicating the domains in which the relay is blacklisted.