1Mail::SpamAssassin::SQLUBsaesredCAodndtrrLiibsutt(e3d)PMearill:D:oScpuammeAnstsaatsisoinn::SQLBasedAddrList(3)
2
3
4

NAME

6       Mail::SpamAssassin::SQLBasedAddrList - SpamAssassin SQL Based Auto
7       Whitelist
8

SYNOPSIS

10           my $factory = Mail::SpamAssassin::SQLBasedAddrList->new()
11           $spamtest->set_persistent_addr_list_factory ($factory);
12         ... call into SpamAssassin classes...
13
14       SpamAssassin will call:
15
16           my $addrlist = $factory->new_checker($spamtest);
17           $entry = $addrlist->get_addr_entry ($addr, $origip);
18         ...
19

DESCRIPTION

21       A SQL based persistent address list implementation.
22
23       See "Mail::SpamAssassin::PersistentAddrList" for more information.
24
25       Uses DBI::DBD module access to your favorite database (tested with
26       MySQL, SQLite and PostgreSQL) to store user auto-whitelists.
27
28       The default table structure looks like this: CREATE TABLE awl (
29         username varchar(100) NOT NULL default '',
30         email varchar(255) NOT NULL default '',
31         ip varchar(40) NOT NULL default '',
32         msgcount int(11) NOT NULL default '0',
33         totscore float NOT NULL default '0',
34         signedby varchar(255) NOT NULL default '',
35         PRIMARY KEY (username,email,signedby,ip) ) TYPE=MyISAM;
36
37       Your table definition may change depending on which database driver you
38       choose.  There is a config option to override the table name.
39
40       This module introduces several new config variables:
41
42       user_awl_dsn
43
44       user_awl_sql_username
45
46       user_awl_sql_password
47
48       user_awl_sql_table
49
50       user_awl_sql_override_username
51
52       see "Mail::SpamAssassin::Conf" for more information.
53
54   new
55       public class (Mail::SpamAssassin::SQLBasedAddrList) new ()
56
57       Description: This method creates a new instance of the SQLBasedAddrList
58       factory and calls the parent's (PersistentAddrList) new method.
59
60   new_checker
61       public instance (Mail::SpamAssassin::SQLBasedAddrList) new_checker (\%
62       $main)
63
64       Description: This method is called to setup a new checker interface and
65       return a blessed copy of itself.  Here is where we setup the SQL
66       database connection based on the config values.
67
68   get_addr_entry
69       public instance (\%) get_addr_entry (String $addr, String $signedby)
70
71       Description: This method takes a given $addr and splits it between the
72       email address component and the ip component and performs a lookup in
73       the database. If nothing is found in the database then a blank entry
74       hash is created and returned, otherwise an entry containing the found
75       information is returned.  If a with_awl_signer configuration option is
76       enabled only addresses signed by the given signing identity are taken
77       into account, or, if $signedby is undefined (or empty) only unsigned
78       entries are considered.
79
80       A key, "exists_p", is set to 1 if an entry already exists in the
81       database, otherwise it is set to 0.
82
83   add_score
84       public instance (\%) add_score (\% $entry, Integer $score)
85
86       Description: This method adds a given $score to a given $entry.  If the
87       entry was marked as not existing in the database then an entry will be
88       inserted, otherwise a simple update will be performed.
89
90       NOTE: This code uses a self referential SQL call (ie set foo = foo + 1)
91       which is supported by most modern database backends, but not everything
92       calling itself a SQL database.
93
94   remove_entry
95       public instance () remove_entry (\% $entry)
96
97       Description: This method removes a given $entry from the database.  If
98       the ip portion of the entry address is equal to "none" then remove any
99       perl-IP entries for this address as well.
100
101   finish
102       public instance () finish ()
103
104       Description: This method provides the necessary cleanup for the address
105       list.
106
107   _unpack_addr
108       private instance (String, String) _unpack_addr(string $addr)
109
110       Description: This method splits an autowhitelist address into it's two
111       components, email and ip address.
112
113
114
115perl v5.36.0                      2022-0M7a-i2l3::SpamAssassin::SQLBasedAddrList(3)
Impressum