[Mimedefang] dnswl and relay_is_blacklisted() in Mimedefang sub_filter_relay

Marko Leer mleer at sp.nl
Fri Dec 14 08:11:10 EST 2007


Hello David,

Thanks for your reply; your suggestion does the trick!

In the mean time I've let my relay filter read the daily rsynced
IPnetblock-list from dnswl.org [combined with the mainly local
hosts from nlwhitelist.bit.nl] into an array.
This file is, after removing some data that I don't use for
validating, about 444 Kb and consists of some 23000 records.

This works incredibly fast - I guess this is the stuff Perl is made
for - but I was wondering if any of you from a performance and
resources point of view would prefer to make the actual
blacklisted_multi lookups to these whitelists.

Cheers,

Marko.

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

DFS> Regards,

DFS> David.

DFS> _______________________________________________
DFS> NOTE: If there is a disclaimer or other legal boilerplate in the above
DFS> message, it is NULL AND VOID.  You may ignore it.

DFS> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
DFS> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
DFS> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




Groeten,

Marko




More information about the MIMEDefang mailing list