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

NAME

6       Mail::SpamAssassin::SQLBasedAddrList - SpamAssassin SQL Based Auto
7       Welcomelist
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-welcomelists.
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         last_hit timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
36       CURRENT_TIMESTAMP,
37         PRIMARY KEY (username,email,signedby,ip) ) TYPE=MyISAM;
38
39       Your table definition may change depending on which database driver you
40       choose.  There is a config option to override the table name.
41
42       This module introduces several new config variables:
43
44       user_awl_dsn
45
46       user_awl_sql_username
47
48       user_awl_sql_password
49
50       user_awl_sql_table
51
52       user_awl_sql_override_username
53
54       see "Mail::SpamAssassin::Conf" for more information.
55
56   new
57       public class (Mail::SpamAssassin::SQLBasedAddrList) new ()
58
59       Description: This method creates a new instance of the SQLBasedAddrList
60       factory and calls the parent's (PersistentAddrList) new method.
61
62   new_checker
63       public instance (Mail::SpamAssassin::SQLBasedAddrList) new_checker (\%
64       $main)
65
66       Description: This method is called to setup a new checker interface and
67       return a blessed copy of itself.  Here is where we setup the SQL
68       database connection based on the config values.
69
70   get_addr_entry
71       public instance (\%) get_addr_entry (String $addr, String $signedby)
72
73       Description: This method takes a given $addr and splits it between the
74       email address component and the ip component and performs a lookup in
75       the database. If nothing is found in the database then a blank entry
76       hash is created and returned, otherwise an entry containing the found
77       information is returned.  If a with_awl_signer configuration option is
78       enabled only addresses signed by the given signing identity are taken
79       into account, or, if $signedby is undefined (or empty) only unsigned
80       entries are considered.
81
82       A key, "exists_p", is set to 1 if an entry already exists in the
83       database, otherwise it is set to 0.
84
85   add_score
86       public instance (\%) add_score (\% $entry, Integer $score)
87
88       Description: This method adds a given $score to a given $entry.  If the
89       entry was marked as not existing in the database then an entry will be
90       inserted, otherwise a simple update will be performed.
91
92       NOTE: This code uses a self referential SQL call (ie set foo = foo + 1)
93       which is supported by most modern database backends, but not everything
94       calling itself a SQL database.
95
96   remove_entry
97       public instance () remove_entry (\% $entry)
98
99       Description: This method removes a given $entry from the database.  If
100       the ip portion of the entry address is equal to "none" then remove any
101       perl-IP entries for this address as well.
102
103   finish
104       public instance () finish ()
105
106       Description: This method provides the necessary cleanup for the address
107       list.
108
109   _unpack_addr
110       private instance (String, String) _unpack_addr(string $addr)
111
112       Description: This method splits an autowelcomelist address into it's
113       two components, email and ip address.
114
115
116
117perl v5.36.0                      2023-0M1a-i2l1::SpamAssassin::SQLBasedAddrList(3)
Impressum