On Tue, Apr 12, 2005 at 04:37:23PM -0400, John Peacock wrote:
> >5) Options to the config thing should be a hashref; how the map/cdb
> >option is implemented now is bad and ugly.
>
> If I add a config extension as a hashref, should I rewrite the current
> usage of "map" at the same time? It only applies to:
>
> rcpt_ok
> check_relay
> virus/kavscanner
> sender_permitted_from
>
> I see that exe_filter and greylisting have something like:
>
> my @config = $self->qp->config('exe_filter', { rcpt => $rcpt });
>
> which looks to be the per-user config hooks. Adding a validation hook
> shouldn't disturb that at all, plus it makes that a supported interface...
Yeah - the per-user config plugin needed the recipient, which wasn't
obviously available from within the plugin, so I patched Qpsmtpd.pm
to pass any additional args in a hashref down to the plugin through
run_hooks:
http://www.openfusion.com.au/labs/qpsmtpd/qpsmtpd-per-user-config-0.28.patch
What do people think of this behaviour - is it reasonable? The per-user
config plugin actually works really well, but it does require this or
something equivalent in the core. Thoughts?
Cheers,
Gavin