Mail::...drList(3pm)
π Mail::SpamAssassin::PersistentAddrList β the base class era π
okay bestie, so this is a 3pm manual page, and it's literally the blueprint for persistent address lists π
welcome to the foundation, no cap.
β¨ NAME β¨
Mail::SpamAssassin::PersistentAddrList β the persistent address list base class π«Ά
πΈ SYNOPSIS πΈ
so here's how you'd actually use it, kudos to you for reading the synopsis (nobody does):
my $factory = PersistentAddrListSubclass->new();
$spamtest->set_persistent_addr_list_factory ($factory);
... call into SpamAssassin classes...
and then SpamAssassin itself will be the one calling into it, like:
my $addrlist = $factory->new_checker($spamtest);
$entry = $addrlist->get_addr_entry ($addr);
...
π¦ DESCRIPTION π¦
every single persistent address list implementation β and yes, that includes the ones the auto-welcomelist code uses to keep track of known-good email addresses π β uses this as its base class. it's giving "everyone's mom", it's giving foundation, it's giving main character energy built on top of another main character.
if you want a whole entire example of what a subclass looks like, go peek at "Mail::SpamAssassin::DBBasedAddrList" π
π METHODS π
$factory = PersistentAddrListSubclass->new();β makes you a factory object β¨ SpamAssassin is gonna call on this factory whenever it needs to spin up a fresh new checker object for the persistent address list.my $addrlist = $factory->new_checker();β builds a brand new address-list checker object out of the factory. the SpamAssassin classes are the ones that call this, not you, bestie. let them cook π$entry = $addrlist->get_addr_entry ($addr);β hand it an email address$addrand it hands you back an entry object with all the deets on that address π
that entry object is a reference to a hash, and it must have at least these two keys: "count", which is the count of how many times that address has been encountered before; and "totscore", which is the total of all scores for messages associated with that address. from those two little fields an average score gets calculated, and then the score for the current message gets regressed towards that mean message score. math! slay! π
the hash can also carry literally whatever other data your back-end needs to store, stashed under other keys. it's your hash, decorate it however π
β οΈ and bestie, listen: this method should never returnundef, and should never return a hash that doesn't contain a"count"key and a"totscore"key. don't do it. not the vibe. periodt.
$entry = $addrlist->add_score($entry, $score);β should take the given score, add it into the welcomelist database for the given entry, and then return you the new entry. that's it, that's the whole thing π$entry = $addrlist->remove_entry ($entry);β should remove the given entry out of the welcomelist database. bye girl, we won't miss you π$entry = $addrlist->finish ();β clean up, but only if necessary, no pressure π SpamAssassin calls this once it's done checking, or done adding to, the auto-welcomelist database. like the end-of-night cleanup montage in every teen movie β¨
okay that's the whole page, you ate that π«Ά this was perl v5.40.1, dated 2026-07-23, and yes this is the Mail::...drList(3pm) page β go be a good subclass, ily, bye ππ
π¦ where this page comes from
- ubuntu stonking: spamassassin 4.0.2+svn1935691-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms