develooper Front page | perl.qpsmtpd | Postings from July 2010

Rewritten URIBL plugin take two

From:
Jared Johnson
Date:
July 27, 2010 03:10
Subject:
Rewritten URIBL plugin take two
Message ID:
120449c2fd72d0146a9685cfecf378cc.squirrel@efoldering.com
Attached:

uribl: the new URIBL plugin with some changes suggested on the list

uribl.diff: diff from the first copy of this plugin I posted to the list
            for anyone who's been following it and prefers that.  *not* a
            diff from the original plugin, that would be too noisy to be
            useful :)

parse_mime: new plugin that can optionally be added in order to decode MIME;
            the uribl plugin will use the decoded MIME if it's there, else
            it will use the old method.  I didn't try to do anything cooler
            with the old method yet as I haven't had time to set up a test

async.diff: diff necessary for the async plugin to work with this plugin.
            UNTESTED!

gen_tld_lists: the script I've been using to generate tld_lists.pl, FTR

Feel free to reiterate any old requests, I may have had a reason not to do
it or I may have just forgotten :)  Highlights:

- new config format (the old method is still supported).  $zones is now
  more genuinely a structure for 'service specific defaults'
- shifted things around to support async and patched the async plugin and
  Q::Plugin::Async::DNSBLBase to work with the new plugin.  I tried very
  hard not to touch these things much because I have no way to test, but it
  was necessary to make quite a lot of changes to support the new plugin,
  especially to support lookup_a_record and lookup_ns_record.  I am *sure*
  there are serious bugs in this but I'm fairly convinced they will be
  trivially found and fixed.
- some more entity un-munging and fixed the & thing
- a handful of other little things I did in the course of my own work

I haven't yet pulled the trigger on moving tld_lists.pl into an API, see
the thread on why.

I am somewhat interested in switching the non-async plugin to still use
ParaDNS, but it's not in my immediate plans; it doesn't make much
difference for performance of the non-async version, and it would mean a
new dependency on a module that apparently is not packaged for Debian in
our own Debian-based software.  Plus ParaDNS or at least the DNSBLBase
wrapper is not quite as flexible and easy to work with as N::D::A.

This code is a bit fresher so there may be further updates as I get
further into testing.  I'll probably wait to submit those until it's time
for hopefully one final shot.  That seems easiest anyway considering that
I still don't have a timeline on getting my git on again.  My apologies
once again for the lack of git.  Happy reviewing!

-Jared



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About