-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy path90-sieve-extprograms.conf
57 lines (46 loc) · 2.02 KB
/
90-sieve-extprograms.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
# Sieve Extprograms plugin configuration
# Don't forget to add the sieve_extprograms plugin to the sieve_plugins setting.
# Also enable the extensions you need (one or more of vnd.dovecot.pipe,
# vnd.dovecot.filter and vnd.dovecot.execute) by adding these to the
# sieve_extensions or sieve_global_extensions settings. Restricting these
# extensions to a global context using sieve_global_extensions is recommended.
plugin {
# The directory where the program sockets are located for the
# vnd.dovecot.pipe, vnd.dovecot.filter and vnd.dovecot.execute extension
# respectively. The name of each unix socket contained in that directory
# directly maps to a program-name referenced from the Sieve script.
sieve_pipe_socket_dir = sieve-pipe
sieve_filter_socket_dir = sieve-filter
sieve_execute_socket_dir = sieve-execute
# The directory where the scripts are located for direct execution by the
# vnd.dovecot.pipe, vnd.dovecot.filter and vnd.dovecot.execute extension
# respectively. The name of each script contained in that directory
# directly maps to a program-name referenced from the Sieve script.
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve-pipe
sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter
sieve_execute_bin_dir = /usr/lib/dovecot/sieve-extprograms
}
# Service to learn spam or ham
service sieve-pipe-script {
executable = script /usr/lib/dovecot/sieve-extprograms/learn-hamorspam.sh
# use some unprivileged user for execution
user = dovenull
# socket name is program-name in Sieve (without sieve-pipe/ prefix)
unix_listener sieve-pipe-script {
user = dovecot
group = mail_users
mode = 0660
}
}
service sieve-execute-action {
# This script is executed for each service connection
executable = script /usr/lib/dovecot/sieve-extprograms/learn-hamorspam.sh
# use some unprivileged user for execution
user = dovenull
# socket name is program-name in Sieve (without sieve-execute/ prefix)
unix_listener sieve-execute-action {
user = dovecot
group = mail_users
mode = 0660
}
}