> Please see my "peers" plugin posted a few months ago
> (http://www.nntp.perl.org/group/perl.qpsmtpd/4475). It allows
> different (arbitrary) sets of plugins to be hooked for different
> ranges of connecting IP addresses, and required no code changes in
> core (or in other plugins).
>
> I said then "I'd appreciate some feedback", and that remains true
> today :-)
And now you'll get some.
General comments:
- If there are things from Qpsmtpd.pm that would be useful to access
from a plugin, we should factor them out into subroutines.
- I like the implementation, it's nice and clean (minus the small
amount of duplication.)
- It only works with networks configured on 8 bit boundaries, but in
practice this probably isn't an issue.
- Will this do the right thing in a non-forked environment? (I've
been going back and forth on this.)
- The configuration interface is somewhat rough - requiring multiple
on-disk records. (aka filesystem as database model). Since they
can mostly be symlinks, thats probably not a huge deal. (I'm
waffling over whether I'd prefer a file based configuration
method.)
- the name is confusing
Based on your replies to Ask's comments
(http://beta.nntp.perl.org/group/perl.qpsmtpd/2006/02/msg4497.html)
it looks like we need to factor out some of the functionality for
plugin loading, and an API to be a little more versatile for it.
I think that's where some of Hanno's change comes in. He started
building some framework for that.
I suspect there's a happy medium.
On the note of config plugins (mentioned in previous thread), I don't
think they help much here - except in that it would be a place to
abstract out the connect hook to.
-R