Mail::SpamAssassin::PersistentAddrListSection: User Contributed Perl Documentation (3)Updated: 2004-08-27 |
Mail::SpamAssassin::PersistentAddrListSection: User Contributed Perl Documentation (3)Updated: 2004-08-27 |
my $factory = PersistentAddrListSubclass->new(); $spamtest->set_persistent_addr_list_factory ($factory); ... call into SpamAssassin classes...
SpamAssassin will call:
my $addrlist = $factory->new_checker($spamtest); $entry = $addrlist->get_addr_entry ($addr); ...
See "Mail::SpamAssassin::DBBasedAddrList" for an example.
The entry object is a reference to a hash, which must contain at least two keys: "count", which is the count of times that address has been encountered before; and "totscore", which is the total of all scores for messages associated with that address. From these two fields, an average score will be calculated, and the score for the current message will be regressed towards that mean message score.
The hash can contain whatever other data your back-end needs to store, under other keys.
The method should never return "undef", or a hash that does not contain a "count" key and a "totscore" key.