On 2007-01-21 16:42:28 +0100, Michael Holzt wrote:
> I'm not up to date about the current stock implementation (if any) of 
> per recipient configuration, but i think qpsmtpd should have this for 
> each and every content filtering plugin. I think this is a killer feature
> because spam filtering got very complex and involves lots of methods with
> various risks. Especially on large mailservers there is no one-size-fits-
> them-all spam filter configuration.

Right. Most plugins I wrote support per-recipient configuration.
Unfortunately there's no standard mechanism to do this, so even my
plugins aren't consistent, and it gets worse if you mix plugins from
several authors.

The mechanism I currently use extends the Qpsmtpd::Address class with a
notes() method (this is done by the address_notes plugin[0]). This
allows arbitrary notes to be attached to recipient objects. The plugins
then check for the existence of certain notes (for example, my modified
spamassassin plugin uses 

 my $reject_threshold = $rcpt->notes('spamassassin_reject_threshold')
                        || $self->{_args}->{reject_threshold}
                        || 99;

to determine the reject threshold. 

Another plugin (called from the rcpt hook) populates the recipient
object with notes. I currently use address_notes_aliases[1] which gets
the data from transaction notes set by aliases_check[2] which gets the
config from a plain text file, but it should be easy to write a plugin
which gets the per-recipient config from LDAP or an SQL database.

I think this mechanism is quite flexible and I would appreciate it if
other plugin authors would adopt it.

        hp

[0] http://svn.perl.org/qpsmtpd/contrib/hjp/address_notes/address_notes

[1] http://svn.perl.org/qpsmtpd/contrib/hjp/address_notes/address_notes_aliases

[2] http://svn.perl.org/qpsmtpd/contrib/hjp/aliases/aliases_check

-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | [EMAIL PROTECTED]         |
__/   | http://www.hjp.at/ |    -- Sam in "Freefall"

Attachment: signature.asc
Description: Digital signature

Reply via email to