[Mimedefang] dnswl and relay_is_blacklisted() in Mimedefang sub_filter_relay

David F. Skoll dfs at roaringpenguin.com
Thu Dec 13 10:58:22 EST 2007


Marko Leer wrote:

> relay_is_blacklisted("providersmtpip"," list.dnswl.org")

> I get a returnvalue of "^?" [is whitelisted] or a value of "TôM-^Sõ"
> [not found in list] whereas the shellcommand
> "host piptmsredivorp.list.dnswl.org" returns a nice 127.0.5.0 if found?

Sorry, the mimedefang-filter man page is somewhat misleading.
relay_is_blacklisted returns whatever the Perl function
gethostbyname returns.  That function returns (probably) an
IPv4 in_addr structure, not a nice human-readable hostname.
You might need to "use Socket;" and make use of the inet_ntoa() function
to convert the return value to a human-readable IPv4 address.

Regards,

David.




More information about the MIMEDefang mailing list