source: npl/mailserver/dspam/dspam-3.10.2/UPGRADING

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 8.6 KB
Line 
1Follow the steps sequentially from the base version you are running up to
2the top.
3
4UPGRADING FROM 3.9.0
5--------------------
6
71. Ensure MySQL is using latin1 character set. This should reduce the needed
8   database space. The following clauses should be executed for upgrading 3.9.0
9   DSPAM MySQL schema:
10     ALTER TABLE `dspam_signature_data`
11       CHANGE `signature` `signature` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
12     ALTER TABLE `dspam_signature_data`
13       DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
14     ALTER TABLE `dspam_stats`
15       DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
16     ALTER TABLE `dspam_token_data`
17       DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
18
19   If you are using preference extension with DSPAM, then you should execute
20   the following clause for upgrading DSPAM preference MySQL schema to use
21   latin1 character set:
22     ALTER TABLE `dspam_preferences`
23       CHANGE `preference` `preference` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
24     ALTER TABLE `dspam_preferences`
25       CHANGE `value` `value` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
26     ALTER TABLE `dspam_preferences`
27       DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
28
29   If you are using the DSPAM virtual user feature then execute the following
30   clauses to update the DSPAM virtual user table to use latin1 character set:
31     ALTER TABLE `dspam_virtual_uids`
32       CHANGE `username` `username` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
33     ALTER TABLE `dspam_virtual_uids`
34       DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
35
36
37UPGRADING FROM 3.8
38------------------
39
401. Ensure MySQL is using the new database schema. The following clauses should
41   be executed for upgrading pre-3.9.0 DSPAM MySQL schema to the 3.9.0 schema:
42     ALTER TABLE `dspam_signature_data`
43       CHANGE `uid` `uid` INT UNSIGNED NOT NULL,
44       CHANGE `data` `data` LONGBLOB NOT NULL,
45       CHANGE `length` `length` INT UNSIGNED NOT NULL;
46     ALTER TABLE `dspam_stats`
47       CHANGE `uid` `uid` INT UNSIGNED NOT NULL,
48       CHANGE `spam_learned` `spam_learned` BIGINT UNSIGNED NOT NULL,
49       CHANGE `innocent_learned` `innocent_learned` BIGINT UNSIGNED NOT NULL,
50       CHANGE `spam_misclassified` `spam_misclassified` BIGINT UNSIGNED NOT NULL,
51       CHANGE `innocent_misclassified` `innocent_misclassified` BIGINT UNSIGNED NOT NULL,
52       CHANGE `spam_corpusfed` `spam_corpusfed` BIGINT UNSIGNED NOT NULL,
53       CHANGE `innocent_corpusfed` `innocent_corpusfed` BIGINT UNSIGNED NOT NULL,
54       CHANGE `spam_classified` `spam_classified` BIGINT UNSIGNED NOT NULL,
55       CHANGE `innocent_classified` `innocent_classified` BIGINT UNSIGNED NOT NULL;
56     ALTER TABLE `dspam_token_data`
57       CHANGE `uid` `uid` INT UNSIGNED NOT NULL,
58       CHANGE `spam_hits` `spam_hits` BIGINT UNSIGNED NOT NULL,
59       CHANGE `innocent_hits` `innocent_hits` BIGINT UNSIGNED NOT NULL;
60
61   If you are using preference extension with DSPAM, then you should execute
62   the following clause for upgrading pre-3.9.0 DSPAM preference MySQL schema
63   to the 3.9.0 schema:
64     ALTER TABLE `dspam_preferences`
65       CHANGE `uid` `uid` INT UNSIGNED NOT NULL;
66
67   If you are using virtual users (with AUTO_INCREMENT) in DSPAM, then you
68   should execute the following clause for upgrading pre-3.9.0 DSPAM virtual
69   uids MySQL schema to the 3.9.0 schema:
70     ALTER TABLE `dspam_virtual_uids`
71       CHANGE `uid` `uid` INT UNSIGNED NOT NULL AUTO_INCREMENT;
72
73   If you are using virtual user aliases (aka: DSPAM in relay mode) in DSPAM,
74   then you should execute the following clause for upgrading pre-3.9.0 DSPAM
75   virtual uids MySQL schema to the 3.9.0 schema:
76     ALTER TABLE `dspam_virtual_uids`
77       CHANGE `uid` `uid` INT UNSIGNED NOT NULL;
78
79   If you need to speed up the MySQL purging script and can afford to use more
80   disk space for the DSPAM MySQL data, then consider executing the following
81   clause for adding additional indices to the dspam_token_data table:
82     ALTER TABLE `dspam_token_data`
83       ADD INDEX(`spam_hits`,`innocent_hits`),
84       ADD INDEX(`last_hit`);
85
86   You can of course combine all three fields in one index (and save some space):
87     ALTER TABLE `dspam_token_data`
88       ADD INDEX(`spam_hits`,`innocent_hits`,`last_hit`);
89
90   Those additional indices/index can speed up the purging for MyISAM tables. If you
91   are using InnoDB tables then the difference with/without them is not that amazing
92   and in most cases not worth the needed additional space/processing power.
93
942. Ensure PosgreSQL is using the new database schema. The following clauses should
95   be executed for upgrading pre-3.9.0 DSPAM PosgreSQL schema to the 3.9.0 schema:
96     ALTER TABLE dspam_preferences ALTER COLUMN uid TYPE integer;
97     ALTER TABLE dspam_signature_data ALTER COLUMN uid TYPE integer;
98     ALTER TABLE dspam_stats ALTER COLUMN uid TYPE integer;
99     ALTER TABLE dspam_token_data ALTER COLUMN uid TYPE integer;
100     DROP INDEX IF EXISTS id_token_data_sumhits;
101
102   If you are using virtual users in DSPAM, then you should execute the following
103   clause for upgrading pre-3.9.0 DSPAM virtual uids to the 3.9.0 schema:
104     ALTER TABLE dspam_virtual_uids ALTER COLUMN uid TYPE integer;
105
106   You need to add an second lookup_tokens function to PostgreSQL. The additional
107   lookup_tokens function can be found in pgsql_objects.sql and it's a slightly
108   different and enhanced then the function originally introduced in 3.6.8.
109
1103. Follow steps in "UPGRADING FROM 3.9.0".
111
112
113UPGRADING FROM 3.6
114------------------
115
1161. Add 'Tokenizer' setting to dspam.conf
117   The 'Tokenizer' setting in 3.8.0 replaces tokenizer definitions in the
118   "Feature" clause of previous version configurations. See src/dspam.conf
119   (after make) for more information about this seting.
120 
1212. Check calls to dspam_logrotate
122   Earlier versions of 3.6 did not prepend a leading "-l" flag to specifying
123   log file selection. This is now required.
124
1253. Ensure 3.6.0 malaligned hash databases are converted
126   Version 3.6.0 failed to align hash databases to 8-byte boundaries. If you
127   are upgrading from v3.6.0 and are using the hash_drv storage driver, you
128   should run cssconvert to upgrade your .css files to a fully aligned format.
129
1304. Invert "SupressWebStats" setting in dspam.conf
131   SupressWebStats has been changed to simply WebStats, and the setting is
132   inverted. Be sure to update this in dspam.conf.
133
1345. Add "ProcessorURLContext" setting in dspam.conf
135   ProcessorURLContext has been added to toggle whether URL specific tokens
136   are created in the tokenizer process. The "on" value is default for previous
137   versions of DSPAM.
138
1396. Follow steps in "UPGRADING FROM 3.8".
140
141
142UPGRADING FROM 3.4
143------------------
144
145Follow all of the steps above, and the following steps:
146
1471. Add "ProcessorBias" setting to dspam.conf
148   ProcessorBias has been added to dspam.conf and must be specified.
149   Since ProcessorBias is the default behavior for previous versions of DSPAM,
150   you will need to add "ProcessorBias on" to dspam.conf. If you have
151   specifically disabled bias, or are using a technique such as Markovian
152   discrimination, you may leave this feature off.
153
1542. Ensure references to SBLQueue are changed to RABLQueue.
155   Older versions of DSPAM used the SBLQueue setting to write files for a
156   DSPAM SBL setup. This has been renamed to RABLQueue. Please change this in
157   dspam.conf if you are writing to a SBL/RABL installation.
158
1593. Add "TestConditionalTraining" setting to dspam.conf
160   TestConditionalTraining has been added to dspam.conf and must be specified
161   to be enabled. Since TestConditionalTraining is the default behavior
162   in DSPAM, it is strongly recommended that you add
163   "TestConditionalTraining on" to dspam.conf
164
1654. Ensure PostgreSQL installation have a lookup_tokens function
166   PostgreSQL systems running v8.0+ must create the function lookup_tokens
167   added to pgsql_objects.sql. The driver now checks your version and uses this
168   function to improve performance on 8.0+.
169
1705. Ensure you are specifying the correct storage driver.
171   hash_drv is now the new default storage driver. hash_drv has no dependencies
172   and is extremely fast/efficient. If you're not familiar with it, you should
173   check out the readme. If you were previously using SQLite, you will now need
174   to specify it as the storage driver: --with-storage-driver=sqlite_drv
175
176   NOTE: Berkeley DB drivers (libdb3_drv, libdb4_drv) are deprecated and have
177         been removed from the build. You will need to select an alternative
178         storage driver in order to upgrade.
179
1806. Follow steps in "UPGRADING FROM 3.6".
Note: See TracBrowser for help on using the repository browser.