-
Notifications
You must be signed in to change notification settings - Fork 18
/
config.inc.php.dist
136 lines (115 loc) · 6.99 KB
/
config.inc.php.dist
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
/**
* SAUserPrefs configuration file
*/
$config = [];
// spamassassin database settings
$config['sauserprefs_db_dsnw'] = 'mysql://username:password@localhost/database';
// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$config['sauserprefs_db_dsnr'] = '';
// use persistent db-connections
// beware this will not "always" work as expected
// see: http://www.php.net/manual/en/features.persistent-connections.php
$config['sauserprefs_db_persistent'] = false;
// table that holds user prefs
$config['sauserprefs_sql_table_name'] = 'userpref';
// name of the username field in the user prefs table
$config['sauserprefs_sql_username_field'] = 'username';
// name of the preference field in the user prefs table, holds the name of the preference
$config['sauserprefs_sql_preference_field'] = 'preference';
// name of the value field in the user prefs table, holds the value of the preference
$config['sauserprefs_sql_value_field'] = 'value';
// username of the current user in the database, normaly %u (username from the session info)
// %u is replaced with the username (from the session info)
// %l is replaced with the local part of the username (if the username is an email address)
// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
// %i is replaced with the email address from the user's default identity
$config['sauserprefs_userid'] = '%u';
// username of the global or default settings user in the database, normaly $GLOBAL or @GLOBAL
$config['sauserprefs_global_userid'] = '\$GLOBAL';
// enable address welcomelist synchronisation with address book(s)
// possible values:
// false - synchronisation disabled
// true - synchronise with default address book
// array - an array of address book ids to synchronise with e.g. ['0', 'global']; '0' = the default address book
$config['sauserprefs_abook_sync'] = false;
// set to false to disable address book import
// possible values:
// false - address import disabled
// true - import addresses from default address book
// array - an array of address book ids to import e.g. ['0', 'global']; '0' = the default address book
$config['sauserprefs_abook_import'] = false;
// don't allow these settings to be overriden by the user
// eg. $config['sauserprefs_dont_override'] = ['required_score', 'rewrite_header Subject'];
// to disable entire sections enter the secion name surrounded by braces. Sections are: general,tests,bayes,headers,report,addresses
// eg. $config['sauserprefs_dont_override'] = ['{tests}'];
$config['sauserprefs_dont_override'] = [];
// activate SAUserPrefs for selected mail hosts only. If this is not set all mail hosts are allowed.
// example: $config['sauserprefs_allowed_hosts'] = ['mail1.domain.tld', 'mail2.domain.tld'];
$config['sauserprefs_allowed_hosts'] = null;
// load specific config for different mail hosts
// example: $config['sauserprefs_host_config'] = [
// 'mail1.domain.tld' => 'mail1_config.inc.php',
// 'mail2.domain.tld' => 'mail2_config.inc.php'
// ];
$config['sauserprefs_host_config'] = null;
// SpamAssassin Version 4
// Some configs have been renamed in SAv4, old config names are depreciated
// see https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7826 for more info
// setting this config to true will make this plugin use the new config names
$config['sauserprefs_sav4'] = false;
// default settings
// these are overridden by $GLOBAL and user settings from the database
$config['sauserprefs_default_prefs'] = [
'required_score' => 5,
'rewrite_header Subject' => '',
'ok_languages' => 'all',
'ok_locales' => 'all',
'fold_headers' => 1,
'add_header all Level' => '_STARS(*)_',
'use_razor1' => 0,
'use_razor2' => 1,
'use_pyzor' => 1,
'use_dcc' => 1,
'use_bayes' => 1,
'skip_rbl_checks' => 0,
'report_safe' => 1,
'bayes_auto_learn' => 1,
'bayes_auto_learn_threshold_nonspam' => 0.1,
'bayes_auto_learn_threshold_spam' => 12.0,
'use_bayes_rules' => 1,
// AWL plugin, use one of use_auto_welcomelist (previously use_auto_whitelist) or use_txrep
'use_auto_welcomelist' => 0,
//'use_txrep' => 0,
'score USER_IN_BLOCKLIST' => 10,
'score USER_IN_WELCOMELIST' => -10
];
// score options
// define the ranges for the various score select boxes
// '[field name]' => ['min' => 1, 'max' => 10, 'increment' => 1, 'extra' => []]
// note: the 'extra' key is optional and should contain further arrays with min, max and increment keys
$config['sauserprefs_score_options'] = [
'*' => ['min' => 1, 'max' => 10, 'increment' => 1],
'_bayesnonspam' => ['min' => -1, 'max' => 1, 'increment' => 0.1],
'_bayesspam' => ['min' => 1, 'max' => 20, 'increment' => 1],
'_score_user_blocklist' => ['min' => 0, 'max' => 100, 'increment' => 10, 'extra' => [['min' => 1, 'max' => 10, 'increment' => 1]]],
'_score_user_welcomelist' => ['min' => -100, 'max' => -1, 'increment' => 10, 'extra' => [['min' => -10, 'max' => -1, 'increment' => 1]]]
];
// delete user bayesian data stored in database
// the query can contain the following macros that will be expanded as follows:
// %u is replaced with the username from the sauserprefs_userid setting above
// use an array to run multiple queries
// set to null to disable this option
// eg. $config['sauserprefs_bayes_delete_query'] = [
// 'DELETE FROM bayes_seen WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
// 'DELETE FROM bayes_token WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
// 'DELETE FROM bayes_vars WHERE username = %u;'
// ];
$config['sauserprefs_bayes_delete_query'] = null;
// allowed languages
// set to array of language codes to limit the language list available for the ok_languages option
// eg ['en', 'es', 'ru', 'zh'];
// see the README for a full list of supported languages
// set to null for all possible languages
$config['sauserprefs_langs_allowed'] = null;