On Tue, 30 Oct 2012 15:50:37 +0100
Tilman Schmidt <[email protected]> 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.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to