-
Notifications
You must be signed in to change notification settings - Fork 9
/
99-antispam_with_sieve.conf
59 lines (50 loc) · 1.84 KB
/
99-antispam_with_sieve.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
protocol imap {
mail_plugins = $mail_plugins imap_sieve
}
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_extensions = +editheader +mboxmetadata +servermetadata +imapflags +notify +spamtest +spamtestplus +virustest
# From elsewhere to Spam folder
imapsieve_mailbox1_name = INBOX/Spam
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/learn-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = INBOX/Spam
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/learn-ham.sieve
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve-pipe
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
##
# rspamd:
#
# X-Spamd-Result: default: False [0.00 / 150.00]; ...
# X-Spam: Yes
##
# rspamd score based
#
# WARNING: the max score provided by rspamd is the maximum score
# rspamd cares about, e.g. the score required for reject, not
# necessarily the one for add_header, and therefore not a good
# baseline for what should be considered "100%" spam.
#
##
sieve_spamtest_status_type = score
sieve_spamtest_status_header = X-Spamd-Result: .*? \[([[:digit:]]+\.[[:digit:]]+) / [[:digit:]]+\.[[:digit:]]+\];
### best to use the same value as for `add_header` in rspamd
sieve_spamtest_max_value = 6
### can read the "max score" from rspamd, but see warning above
## sieve_spamtest_max_header = X-Spamd-Result: .*? \[[[:digit:]]+\.[[:digit:]]+ / ([[:digit:]]+\.[[:digit:]]+)\];
##
# Yes/No based
#
##
# sieve_spamtest_status_type = text
# sieve_spamtest_status_header = X-Spam
# sieve_spamtest_text_value1 = No
# sieve_spamtest_text_value10 = Yes
#
# Automatically filter spam into the spam folder
#
sieve_before = /usr/lib/dovecot/sieve/global-spam.sieve
}