Mail::SpamAssassin::PersistentAddrList - persistent address list base class
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); ...
All persistent address list implementations, used by the auto-whitelist code to track known-good email addresses, use this as a base class.
See Mail::SpamAssassin::DBBasedAddrList for an example.
Mail::SpamAssassin::DBBasedAddrList
This creates a factory object, which SpamAssassin will call to create a new checker object for the persistent address list.
Create a new address-list checker object from the factory. Called by the SpamAssassin classes.
Given an email address $addr, return an entry object with the details of that address.
$addr
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.
count
totscore
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.
undef
This method should add the given score to the whitelist database for the given entry, and then return the new entry.
This method should remove the given entry from the whitelist database.
Clean up, if necessary. Called by SpamAssassin when it has finished checking, or adding to, the auto-whitelist database.
To install Mail::SpamAssassin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::SpamAssassin
CPAN shell
perl -MCPAN -e shell install Mail::SpamAssassin
For more information on module installation, please visit the detailed CPAN module installation guide.