Skip to content

Commit 4d5047f

Browse files
stephanboschsirainen
authored andcommitted
docs: Adjust to Pigeonhole config rewrite
1 parent 1e168b3 commit 4d5047f

File tree

15 files changed

+662
-494
lines changed

15 files changed

+662
-494
lines changed

docs/core/admin/guides/spam_reporting.md

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ A global configuration script is used to capture the event of moving
2323
messages in/out of the Spam mailbox.
2424

2525
::: warning
26-
**You cannot run scripts anywhere you want.**
26+
**You cannot run shell scripts anywhere you want.**
2727

28-
Sieve allows you to only run scripts under
29-
[[setting_text,sieve_<extension>_bin_dir,sieve_pipe_bin_dir]]. You
28+
Sieve allows you to only run scripts under [[setting,sieve_pipe_bin_dir]]. You
3029
can't use `/usr/local/bin/my-sieve-filter.sh`, you have to put the
3130
script under `sieve_pipe_bin_dir` and use `my-sieve-filter.sh` in the
3231
script instead.
@@ -60,20 +59,30 @@ protocol imap {
6059
}
6160
}
6261
63-
plugin {
64-
sieve_plugins = sieve_imapsieve
65-
sieve_implicit_extensions = +vnd.dovecot.report
62+
sieve_plugins {
63+
sieve_imapsieve = yes
64+
}
65+
66+
sieve_global_extensions {
67+
vnd.dovecot.report = yes
68+
}
6669
70+
mailbox Spam {
6771
# From elsewhere to Spam folder
68-
imapsieve_mailbox1_name = Spam
69-
imapsieve_mailbox1_causes = COPY
70-
imapsieve_mailbox1_before = file:/etc/dovecot/report-spam.sieve
71-
72-
# From Spam folder to elsewhere
73-
imapsieve_mailbox2_name = *
74-
imapsieve_mailbox2_from = Spam
75-
imapsieve_mailbox2_causes = COPY
76-
imapsieve_mailbox2_before = file:/etc/dovecot/report-ham.sieve
72+
sieve_script report-spam {
73+
type = before
74+
cause = copy
75+
path = /etc/dovecot/report-spam.sieve
76+
}
77+
}
78+
79+
# From Spam folder to elsewhere
80+
imapsieve_from Spam {
81+
sieve_script report-ham {
82+
type = before
83+
cause = copy
84+
path = /etc/dovecot/report-ham.sieve
85+
}
7786
}
7887
7988
# Needed to send message to external mail server
@@ -160,23 +169,34 @@ protocol imap {
160169
}
161170
}
162171
163-
plugin {
164-
sieve_plugins = sieve_imapsieve
165-
sieve_implicit_extensions = +vnd.dovecot.report
172+
sieve_plugins {
173+
sieve_imapsieve = yes
174+
sieve_extprograms = yes
175+
}
166176
177+
sieve_global_extensions {
178+
vnd.dovecot.pipe = yes
179+
vnd.dovecot.environment = yes
180+
}
181+
182+
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
183+
184+
mailbox Spam {
167185
# From elsewhere to Spam folder
168-
imapsieve_mailbox1_name = Spam
169-
imapsieve_mailbox1_causes = COPY
170-
imapsieve_mailbox1_before = file:/etc/dovecot/report-spam.sieve
171-
172-
# From Spam folder to elsewhere
173-
imapsieve_mailbox2_name = *
174-
imapsieve_mailbox2_from = Spam
175-
imapsieve_mailbox2_causes = COPY
176-
imapsieve_mailbox2_before = file:/etc/dovecot/report-ham.sieve
177-
178-
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
179-
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
186+
sieve_script report-spam {
187+
type = before
188+
cause = copy
189+
path = /etc/dovecot/report-spam.sieve
190+
}
191+
}
192+
193+
# From Spam folder to elsewhere
194+
imapsieve_from Spam {
195+
sieve_script report-ham {
196+
type = before
197+
cause = copy
198+
path = /etc/dovecot/report-ham.sieve
199+
}
180200
}
181201
```
182202

docs/core/config/sieve/extensions/duplicate.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ The duplicate extension is available by default.
3434
### Example
3535

3636
```[dovecot.conf]
37-
plugin {
38-
sieve = ~/.dovecot.sieve
39-
40-
sieve_duplicate_default_period = 1h
41-
sieve_duplicate_max_period = 1d
37+
sieve_script personal {
38+
path = ~/.dovecot.sieve
4239
}
40+
41+
sieve_duplicate_default_period = 1h
42+
sieve_duplicate_max_period = 1d
4343
```

docs/core/config/sieve/extensions/editheader.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ enabled explicitly by adding it to [[setting,sieve_extensions]].
1818

1919
### Settings
2020

21-
::: warning
22-
Invalid values for these settings will make the Sieve interpreter
23-
log a warning and revert to the default values.
24-
:::
25-
2621
<SettingsComponent tag="sieve-editheader" level="3" />
2722

2823
### Example
2924

3025
```
31-
plugin {
32-
# Use editheader
33-
sieve_extensions = +editheader
26+
# Use editheader
27+
sieve_extensions {
28+
editheader = yes
29+
}
3430
35-
# Header fields must not exceed one kilobyte
36-
sieve_editheader_max_header_size = 1k
31+
# Header fields must not exceed one kilobyte
32+
sieve_editheader_max_header_size = 1k
3733
38-
# Protected special headers
39-
sieve_editheader_forbid_add = X-Verified
40-
sieve_editheader_forbid_delete = X-Verified X-Seen
34+
# Protected special headers
35+
sieve_editheader_header X-Verified {
36+
forbid_add = yes
37+
forbid_delete = yes
38+
}
39+
sieve_editheader_header X-Seen {
40+
forbid_delete = yes
4141
}
4242
```

docs/core/config/sieve/extensions/spamtest_virustest.md

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ X-Spam-Score: No, score=-3.2
4747
```
4848

4949
```[dovecot.conf]
50-
plugin {
51-
sieve_extensions = +spamtest +spamtestplus
52-
53-
sieve_spamtest_status_type = score
54-
sieve_spamtest_status_header = \
55-
X-Spam-Score: [[:alnum:]]+, score=(-?[[:digit:]]+\.[[:digit:]])
56-
sieve_spamtest_max_value = 5.0
50+
sieve_extensions {
51+
spamtest = yes
52+
spamtestplus = yes
5753
}
54+
55+
sieve_spamtest_status_type = score
56+
sieve_spamtest_status_header = \
57+
X-Spam-Score: [[:alnum:]]+, score=(-?[[:digit:]]+\.[[:digit:]])
58+
sieve_spamtest_score_max_value = 5.0
5859
```
5960
:::
6061

@@ -64,13 +65,16 @@ X-Spam-Status: Yes
6465
```
6566

6667
```[dovecot.conf]
67-
plugin {
68-
sieve_extensions = +spamtest +spamtestplus
68+
sieve_extensions {
69+
spamtest = yes
70+
spamtestplus = yes
71+
}
6972
70-
sieve_spamtest_status_type = text
71-
sieve_spamtest_status_header = X-Spam-Status
72-
sieve_spamtest_text_value1 = No
73-
sieve_spamtest_text_value10 = Yes
73+
sieve_spamtest_status_type = text
74+
sieve_spamtest_status_header = X-Spam-Status
75+
sieve_spamtest_text_value {
76+
1 = No
77+
10 = Yes
7478
}
7579
```
7680
:::
@@ -81,13 +85,14 @@ X-Spam-Score: sssssss
8185
```
8286

8387
```[dovecot.conf]
84-
plugin {
85-
sieve_extensions = +spamtest +spamtestplus
86-
87-
sieve_spamtest_status_header = X-Spam-Score
88-
sieve_spamtest_status_type = strlen
89-
sieve_spamtest_max_value = 5
88+
sieve_extensions {
89+
spamtest = yes
90+
spamtestplus = yes
9091
}
92+
93+
sieve_spamtest_status_header = X-Spam-Score
94+
sieve_spamtest_status_type = strlen
95+
sieve_spamtest_score_max_value = 5
9196
```
9297

9398
::: code-group
@@ -100,19 +105,23 @@ X-Virus-Scan: Found to be clean.
100105
```
101106

102107
```[dovecot.conf]
103-
plugin {
104-
sieve_extensions = +spamtest +spamtestplus +virustest
105-
106-
sieve_spamtest_status_type = score
107-
sieve_spamtest_status_header = \
108-
X-Spam-Score: score=(-?[[:digit:]]+\.[[:digit:]]).*
109-
sieve_spamtest_max_header = \
110-
X-Spam-Score: score=-?[[:digit:]]+\.[[:digit:]] required=([[:digit:]]+\.[[:digit:]])
111-
112-
sieve_virustest_status_type = text
113-
sieve_virustest_status_header = X-Virus-Scan: Found to be (.+)\.
114-
sieve_virustest_text_value1 = clean
115-
sieve_virustest_text_value5 = infected
108+
sieve_extensions {
109+
spamtest = yes
110+
spamtestplus = yes
111+
virustest = yes
112+
}
113+
114+
sieve_spamtest_status_type = score
115+
sieve_spamtest_status_header = \
116+
X-Spam-Score: score=(-?[[:digit:]]+\.[[:digit:]]).*
117+
sieve_spamtest_score_max_header = \
118+
X-Spam-Score: score=-?[[:digit:]]+\.[[:digit:]] required=([[:digit:]]+\.[[:digit:]])
119+
120+
sieve_virustest_status_type = text
121+
sieve_virustest_status_header = X-Virus-Scan: Found to be (.+)\.
122+
sieve_virustest_text_value {
123+
1 = clean
124+
5 = infected
116125
}
117126
```
118127
:::

docs/core/config/sieve/extensions/vacation.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ period of less than a day.
3333

3434
### Settings
3535

36-
::: warning
37-
Invalid values for these settings will make the Sieve interpreter
38-
log a warning and revert to the default values.
39-
:::
40-
4136
<SettingsComponent tag="sieve-vacation" level="3" />
4237

4338
### Auto-Reply
@@ -100,17 +95,17 @@ The automatic replies aren't sent if any of the following is true:
10095
### Example
10196

10297
```[dovecot.conf]
103-
plugin {
104-
# Use vacation-seconds
105-
sieve_extensions = +vacation-seconds
98+
# Use vacation-seconds
99+
sieve_extensions {
100+
vacation-seconds = yes
101+
}
106102
107-
# One hour at minimum
108-
sieve_vacation_min_period = 1h
103+
# One hour at minimum
104+
sieve_vacation_min_period = 1h
109105
110-
# Ten days default
111-
sieve_vacation_default_period = 10d
106+
# Ten days default
107+
sieve_vacation_default_period = 10d
112108
113-
# Thirty days at maximum
114-
sieve_vacation_max_period = 30d
115-
}
109+
# Thirty days at maximum
110+
sieve_vacation_max_period = 30d
116111
```

docs/core/config/sieve/index.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ about the extensions from the Sieve Mail Filtering Language Charter
3636
or the [Sieve.info wiki page](http://sieve.info/).
3737

3838
::: info
39-
Sieve doesn't support running external programs.
39+
Standard Sieve does not support running external programs. However, Dovecot
40+
provides non-standard extensions that provide limited support for doing that.
4041
:::
4142

4243
### Extensions
@@ -188,22 +189,31 @@ global scripts using the `sievec` command line tool. For example:
188189
sievec /var/lib/dovecot/sieve/global/
189190
```
190191

191-
This is necessary for scripts listed in [[setting,sieve_global]],
192-
[[setting,sieve_before]], and [[setting,sieve_after]] settings.
192+
This is necessary for script in storages with
193+
[[link,sieve_storage_type_after,after]],
194+
[[link,sieve_storage_type_before,before]],
195+
[[link,sieve_storage_type_default,default]], and
196+
[[link,sieve_storage_type_global,global]] storage type.
193197

194198
For global scripts that are only included in other scripts using the Sieve
195-
include extension, this step is not necessary since included scripts
196-
are incorporated into the binary produced for the main script.
199+
include extension (from the [[link,sieve_storage_type_personal,personal]] and
200+
[[link,sieve_storage_type_global,global]] storage types), this step is
201+
not necessary since included scripts are incorporated into the binary produced
202+
for the main script.
197203

198204
## Compile and Runtime Logging
199205

200206
Log messages produced during script compilation or during script
201207
execution are written to two locations by the LDA Sieve plugin:
202208

203-
- A log file is written in the same directory as the user's main
204-
private script (as specified by [[setting,sieve]]). This
205-
log file bears the name of that script file appended with ".log", e.g.
206-
`.dovecot.sieve.log`.
209+
- If the user's personal storage is using the
210+
[[link,sieve_storage_file,file driver]], a log file is written in the same
211+
directory as the user's active personal script as defined by
212+
[[setting,sieve_script_active_path]]. This log file bears the name
213+
of that script file appended with ".log", e.g. `.dovecot.sieve.log`.
214+
Alternatively, e.g. when using another storage driver,
215+
[[setting,sieve_user_log_path]] can be used to configure the log file
216+
explicitly.
207217

208218
If there are errors or warnings in the script, the messages are appended
209219
to that log file until it eventually grows too large (>10 kB currently).
@@ -213,7 +223,7 @@ execution are written to two locations by the LDA Sieve plugin:
213223
Informational messages are not written to this log file and the log
214224
file is not created until messages are actually logged, i.e. when an
215225
error or warning is produced. The log file name can be overridden with
216-
[[setting,sieve_user_log]].
226+
[[setting,sieve_user_log_path]].
217227

218228
- Messages that could be of interest to the system administrator are
219229
also written to the Dovecot logging facility (usually syslog). This

0 commit comments

Comments
 (0)