1Mail::SpamAssassin::BayUesseSrtoCroen:t:rMiybSuQtLe(d3M)Paeirll::DSopcaummAesnstaastsiionn::BayesStore::MySQL(3)
2
3
4

NAME

6       Mail::SpamAssassin::BayesStore::MySQL - MySQL Specific Bayesian Storage
7       Module Implementation
8

SYNOPSIS

DESCRIPTION

11       This module implements a MySQL specific based bayesian storage module.
12       It requires that you are running at least version 4.1 of MySQL, if you
13       are running a version of MySQL < 4.1 then several aspects of this
14       module will fail and possibly corrupt your bayes database data.
15
16       In addition, this module will support rollback on error, if you are
17       using the InnoDB database table type in MySQL.  For more information
18       please review the instructions in sql/README.bayes.
19

METHODS

21   token_expiration
22       public instance (Integer, Integer,
23                        Integer, Integer) token_expiration(\% $opts,
24                                                           Integer $newdelta,
25                                                           @ @vars)
26
27       Description: This method performs the database specific expiration of
28       tokens based on the passed in $newdelta and @vars.
29
30   seen_put
31       public (Boolean) seen_put (string $msgid, char $flag)
32
33       Description: This method records $msgid as the type given by $flag.
34       $flag is one of two values 's' for spam and 'h' for ham.
35
36   seen_delete
37       public instance (Boolean) seen_delete (string $msgid)
38
39       Description: This method removes $msgid from the database.
40
41   set_last_expire
42       public instance (Boolean) set_last_expire (Integer $time)
43
44       Description: This method sets the last expire time.
45
46   set_running_expire_tok
47       public instance (String $time) set_running_expire_tok ()
48
49       Description: This method sets the time that an expire starts running.
50
51   remove_running_expire_tok
52       public instance (Boolean) remove_running_expire_tok ()
53
54       Description: This method removes the row in the database that indicates
55       that and expire is currently running.
56
57   nspam_nham_change
58       public instance (Boolean) nspam_nham_change (Integer $num_spam,
59                                                    Integer $num_ham)
60
61       Description: This method updates the number of spam and the number of
62       ham in the database.
63
64   tok_touch
65       public instance (Boolean) tok_touch (String $token,
66                                            String $atime)
67
68       Description: This method updates the given tokens ($token) atime.
69
70       The assumption is that the token already exists in the database.
71
72   tok_touch_all
73       public instance (Boolean) tok_touch (\@ $tokens
74                                            String $atime)
75
76       Description: This method does a mass update of the given list of tokens
77       $tokens, if the existing token atime is < $atime.
78
79       The assumption is that the tokens already exist in the database.
80
81       We should never be touching more than N_SIGNIFICANT_TOKENS, so we can
82       make some assumptions about how to handle the data (ie no need to batch
83       like we do in tok_get_all)
84
85   cleanup
86       public instance (Boolean) cleanup ()
87
88       Description: This method perfoms any cleanup necessary before moving
89       onto the next operation.
90
91   clear_database
92       public instance (Boolean) clear_database ()
93
94       Description: This method deletes all records for a particular user.
95
96       Callers should be aware that any errors returned by this method could
97       causes the database to be inconsistent for the given user.
98

Private Methods

100   _connect_db
101       private instance (Boolean) _connect_db ()
102
103       Description: This method connects to the SQL database.
104
105   _initialize_db
106       private instance (Boolean) _initialize_db ()
107
108       Description: This method will check to see if a user has had their
109       bayes variables initialized. If not then it will perform this
110       initialization.
111
112   _put_token
113       private instance (Boolean) _put_token (string $token,
114                                              integer $spam_count,
115                                              integer $ham_count,
116                                  string $atime)
117
118       Description: This method performs the work of either inserting or
119       updating a token in the database.
120
121   _put_tokens
122       private instance (Boolean) _put_tokens (\% $tokens,
123                                               integer $spam_count,
124                                               integer $ham_count,
125                                    string $atime)
126
127       Description: This method performs the work of either inserting or
128       updating tokens in the database.
129
130
131
132perl v5.16.3                      2014-M0a2i-l0:7:SpamAssassin::BayesStore::MySQL(3)
Impressum