-
Notifications
You must be signed in to change notification settings - Fork 1
/
train-spam-scanner.conf
executable file
·106 lines (80 loc) · 3.86 KB
/
train-spam-scanner.conf
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
# train-spam-scanner.conf: local configuration for train-spam-scanner
# (train spammassassin/rspamd on dovecot servers)
# This file is included by train-spam-scanner and can be used to
# override any config variables it uses.
#
# The defaults here are used on an ISPConfig mail server running Debian 10.
# Save it as /etc/train-spam-scanner/train-spam-scanner.conf.
#
# You need to set ADMIN_USERS (below) to at least one valid dovecot username,
# which will be given rights to administer the admin training folders.
# which spam scanner should be trained
# rspamd: Rspamd
# spamassassin: SpamAssassin
# auto: SpamAssassin if found, else Rspamd
SCANNER="auto"
# how to rebuild/merge mail in working and incoming folders
# incremental: add only recent spam/non-spam messages (default)
# rebuild: completely wipe and recreate
REBUILD_FOLDERS_MODE="incremental"
# how to train/rebuild bayes db
# normal: train live bayes db with all messages
# in admin incoming folders and admin training folders (default)
# rebuild: create and train a new bayes db, then move to live
# incremental: **not yet implemented**, the intent is to:
# - unlearn old messages being removed from incoming folders
# - train new messages going into incoming folders
# - train "new" messages in training folders
# rspamd always uses 'normal'; there is no rspamc interface to delete all tokens
# so 'rebuild' is a no-go, and there is currently no way to unlearn a message,
# so incremental doesn't make sense
REBUILD_BAYES_MODE="normal"
REBUILD_BAYES_MODE="incremental"
#REBUILD_BAYES_MODE="rebuild"
# imap users given rights to the admin folder,
# ie. these users/logins have access to the Admin/* training folders
# (you must create these users manually before running this script)
# This is an array.
#ADMIN_USERS=('[email protected]' '[email protected]')
ADMIN_USERS=( "root@`hostname -d`" )
# should we create training folders for all user accounts (yes/no)
CREATE_USER_FOLDERS="no"
# clean up user training messages older than this time
# (must be a valid date specification for a dovecot search_query)
CLEANUP_USER_MESSAGES_BEFORE="27weeks"
# clean up admin training messages older than this time
# (must be a valid date specification for a dovecot search_query)
CLEANUP_ADMIN_MESSAGES_BEFORE="53weeks"
# unix user/group which owns the shared folders
SHARED_USER='vmail'
SHARED_GROUP='vmail'
# unix user which spam training should be performed as
TRAIN_AS_USER='amavis'
TRAIN_AS_GROUP='amavis'
# location of shared folders
SHARED_ROOT='/var/vmail/admin'
# location of bind mount point for training
TRAIN_BIND_MNT='/var/lib/amavis/mnt'
# location of persistent data (timestamp file) and tmp files (guid lists)
DATA_DIR='/var/lib/train-spam-scanner'
# SpamAssassin specific settings
## To use a sql/redis bayes store with spamassassin, the variables
## BAYES_LIVE_DBPATH and BAYES_TRAIN_DBPATH must be empty (below):
# location of live bayes dbpath (leave unset for sql/redis bayes store)
BAYES_LIVE_DBPATH='/var/lib/amavis/.spamassassin/bayes'
# location of tmp dir for rebuilding bayes db when training
# (unused for sql/redis bayes store)
BAYES_TEMP='/var/lib/amavis/.bayes-rebuild'
# location of bayes dbpath to be trained; left unset, the live bayes db
# will be trained (leave unset for sql/redis bayes store)
BAYES_TRAIN_DBPATH="${BAYES_TEMP}/bayes"
# extra arguments passed to sa-learn
# SA_LEARN_ARGS="--cf 'bayes_learn_to_journal 1'"
SA_LEARN_ARGS=''
# Rspamd specific settings
# Path to file containing the controller password
# (Or, if it doesn't start with '/' or '.', the password itself.
# But it might leak the password through ps to other users)
RSPAMD_CONTROLLER_PASSWORD=/etc/train-spam-scanner/rspamd-controller.password
# classifier to learn for (default by rspamc: bayes), e.g. `bayes_user`
RSPAMD_CLASSIFIER=''