[Mimedefang] DNSWL

David F. Skoll dfs at roaringpenguin.com
Tue Oct 30 10:59:06 EDT 2012


On Tue, 30 Oct 2012 15:50:37 +0100
Tilman Schmidt <t.schmidt at phoenixsoftware.de> wrote:

> which (apart from being an example of obvious spam from a DNSWL
> listed site :-) seems to show that relay_is_blacklisted(),
> un-Perl-like, returns its result not as a string, but in some
> sort of packed binary format. Any idea how to unpack that?

First of all, from the mimedefang-filter man page:

       Note that the "relay_is_blacklisted" functions are deprecated
       and may be removed in a future release.  Instead, you should
       use the module Net::DNSBL::Client from CPAN.

Second, relay_is_blacklisted simply returns whatever Perl's built-in
gethostbyname function returns, which is (as you note) a packed binary
structure that you unpack with:

	  use Socket;
	  $unpacked = inet_ntoa($return_from_relay_is_blacklisted);

Third: Use relay_is_blacklisted_multi instead.  It provides a much
more useful return value.

Regards,

David.



More information about the MIMEDefang mailing list