Re: per-recipient configuration

[email protected] (David Nicol)
Newsgroups perl.qpsmtpd
Message-ID <[email protected]>
On Wed, Jul 28, 2010 at 2:35 PM, David Nicol <[email protected]> wrote:
> On Wed, Jul 28, 2010 at 2:14 PM, Jared Johnson <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.