On Wed, Jul 28, 2010 at 2:35 PM, David Nicol <davidni...@gmail.com> wrote: > On Wed, Jul 28, 2010 at 2:14 PM, Jared Johnson <jjohn...@efolder.net> wrote: >> I think we've had a thread about this before, but how do you see the API >> for a standard hook for persistence working? > > either the tie or overload interface is invoked by the plug-in, [...]
so inside QP, the qpsmtpd::address object would have a known parameter that brings up the per-address persistence hash, which would be a flat hash. Something like $object->{persistent} = ( eval { $PERSISTENCEFRAMEWORK->new(Address => $object) } or {} ); at the end of the address object constructor, possibly even more generic. The "persistent" element would default to a non-persistent version when $PERSISTENCEFRAMEWORK isn't set to something that works, and when it has been configured, per-address config can be loaded or altered via return HARDFAIL if $AddressObject->{persistent}->{AcceptableSpamScore} < $Message->getSpamScore or such