@@ -52,6 +52,18 @@ ManageSieve protocol support in Dovecot is to add `sieve` to the
5252
5353The managesieve daemon will listen on port 4190 by default.
5454
55+ ### TLS Configuration
56+
57+ The ManageSieve network protocol can be used either:
58+
59+ 1 . unencrypted
60+ 2 . encrypted with opportunistic TLS (STARTTLS)
61+ 3 . encrypted with implicit TLS
62+
63+ Implicit TLS is the best practice because STARTTLS can be susceptible
64+ to downgrade attacks. To enable this, set ` ssl = yes ` in the
65+ ` inet_listener sieve ` section.
66+
5567### Settings
5668
5769As the implementation of the managesieve daemon is largely based on the
@@ -98,6 +110,7 @@ are shown.
98110service managesieve-login {
99111 #inet_listener sieve {
100112 # port = 4190
113+ # ssl = yes
101114 #}
102115
103116 #inet_listener sieve_deprecated {
@@ -213,9 +226,9 @@ the direct error messages from the server without intermission of your
213226client.
214227
215228If you do not use TLS, you can connect using a simple ` telnet `
216- or ` netcat ` connection to the configured port (typically 4190 or 2000
217- for older setups). Otherwise you must use a TLS-capable text protocol
218- client like ` gnutls-cli ` as described below.
229+ or ` netcat ` connection to the configured port (typically 4190).
230+ Otherwise you must use a TLS-capable text protocol client like ` openssl `
231+ or ` gnutls-cli ` as described below.
219232
220233Upon connection, the server presents the initial greeting with its
221234capabilities:
@@ -229,12 +242,13 @@ OK "Dovecot ready."
229242```
230243
231244Note that the reported ` STARTTLS ` capability means that the server
232- accepts TLS, but, since you are using telnet/netcat, you cannot use this
233- (refer to Manual TLS Login below). The ` SASL ` capability lists the
245+ accepts opportunistic TLS, but, since you are using telnet/netcat, you cannot use this
246+ (refer to Manual Opportunistic TLS Login below). The ` SASL ` capability lists the
234247available SASL authentication mechanisms. If this list is empty and
235248` STARTTLS ` is available, it probably means that the server forces you
236- to initiate TLS first (as dictated by [[ setting,auth_allow_cleartext,yes]]
237- in ` dovecot.conf ` ).
249+ to initiate STARTTLS first (as dictated by [[ setting,auth_allow_cleartext,yes]]
250+ in ` dovecot.conf ` ). Note: if you're connecting from the same computer, the
251+ connection is considered secure and plaintext authentication is allowed!
238252
239253Now you need to log in. Although potentially multiple SASL mechanisms
240254are available, only ` PLAIN ` is described here. Authentication is
@@ -249,7 +263,7 @@ The credentials are the base64-encoded version of the string
249263` "\0<username>\0<password" ` (in which ` \0 ` represents the ASCII NUL
250264character). Generating this is cumbersome and a bit daunting for the
251265novice user, so for convenience a
252- [ simple Perl script] ( http ://pigeonhole.dovecot.org/utilities/sieve-auth-command.pl)
266+ [ simple Perl script] ( https ://pigeonhole.dovecot.org/utilities/sieve-auth-command.pl)
253267is provided to generate the ` AUTHENTICATE ` command for you. It is used
254268as follows:
255269
@@ -318,11 +332,21 @@ The symbolic link configured with the `sieve` setting should now point
318332to the activated script in the sieve directory. If no script is
319333active, this symbolic link is absent.
320334
321- #### Manual TLS Login
335+ #### Manual Implicit TLS Login
336+ ----------------
337+
338+ If you have enabled implicit TLS, you can use, for example, ` openssl `
339+ to connect:
340+
341+ ```
342+ openssl s_client -quiet -connect <host>:4190
343+ ```
344+
345+ #### Manual Opportunistic TLS Login
322346----------------
323347
324- When TLS needs to be used during manual testing, ` gnutls-cli ` provides
325- the means to do so. This command-line utility is part of the GNUTLS
348+ When opportunistic TLS needs to be used during manual testing, ` gnutls-cli `
349+ provides the means to do so. This command-line utility is part of the GNUTLS
326350distribution and on most systems this should be easy to install. It is
327351used to connect to ManageSieve as follows:
328352
0 commit comments