summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/files/tmp/spamassassin.sql
blob: ed2e6412ce64d85773f23fe2197293cbdaa08ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- Sources: https://svn.apache.org/repos/asf/spamassassin/trunk/sql/awl_mysql.sql
--          https://svn.apache.org/repos/asf/spamassassin/trunk/sql/bayes_mysql.sql

CREATE TABLE awl (
    username VARCHAR(100)   NOT NULL DEFAULT '',
    email    VARBINARY(255) NOT NULL DEFAULT '',
    ip       VARCHAR(40)    NOT NULL DEFAULT '',
    count    INT(11)        NOT NULL DEFAULT 0,
    totscore FLOAT          NOT NULL DEFAULT 0,
    signedby VARCHAR(255)   NOT NULL DEFAULT '',
    PRIMARY KEY (username,email,signedby,ip)
) ENGINE=InnoDB;

CREATE TABLE bayes_expire (
    id      INT(11) NOT NULL DEFAULT 0,
    runtime INT(11) NOT NULL DEFAULT 0,
    KEY bayes_expire_idx1 (id)
) ENGINE=InnoDB;

CREATE TABLE bayes_global_vars (
    variable VARCHAR(30)  NOT NULL default '',
    value    VARCHAR(200) NOT NULL default '',
    PRIMARY KEY (variable)
) ENGINE=InnoDB;
INSERT INTO bayes_global_vars VALUES ('VERSION','3');

CREATE TABLE bayes_seen (
    id    INT(11)             NOT NULL DEFAULT 0,
    msgid VARCHAR(200) BINARY NOT NULL DEFAULT '',
    flag  CHAR(1)             NOT NULL DEFAULT '',
    PRIMARY KEY (id,msgid)
) ENGINE=InnoDB;

CREATE TABLE bayes_token (
    id         INT(11)   NOT NULL DEFAULT 0,
    token      BINARY(5) NOT NULL DEFAULT '',
    spam_count INT(11)   NOT NULL DEFAULT 0,
    ham_count  INT(11)   NOT NULL DEFAULT 0,
    atime      INT(11)   NOT NULL DEFAULT 0,
    PRIMARY KEY (id, token),
    INDEX bayes_token_idx1 (id, atime)
) ENGINE=InnoDB;

CREATE TABLE bayes_vars (
    id                 INT(11)      NOT NULL AUTO_INCREMENT,
    username           VARCHAR(200) NOT NULL DEFAULT '',
    spam_count         INT(11)      NOT NULL DEFAULT 0,
    ham_count          INT(11)      NOT NULL DEFAULT 0,
    token_count        INT(11)      NOT NULL DEFAULT 0,
    last_expire        INT(11)      NOT NULL DEFAULT 0,
    last_atime_delta   INT(11)      NOT NULL DEFAULT 0,
    last_expire_reduce INT(11)      NOT NULL DEFAULT 0,
    oldest_token_age   INT(11)      NOT NULL DEFAULT 2147483647,
    newest_token_age   INT(11)      NOT NULL DEFAULT 0,
    PRIMARY KEY (id),
    UNIQUE bayes_vars_idx1 (username)
) ENGINE=InnoDB;