@@ -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 {
@@ -210,9 +223,9 @@ the direct error messages from the server without intermission of your
210223client.
211224
212225If you do not use TLS, you can connect using a simple ` telnet `
213- or ` netcat ` connection to the configured port (typically 4190 or 2000
214- for older setups). Otherwise you must use a TLS-capable text protocol
215- client like ` gnutls-cli ` as described below.
226+ or ` netcat ` connection to the configured port (typically 4190).
227+ Otherwise you must use a TLS-capable text protocol client like ` openssl `
228+ or ` gnutls-cli ` as described below.
216229
217230Upon connection, the server presents the initial greeting with its
218231capabilities:
@@ -226,12 +239,13 @@ OK "Dovecot ready."
226239```
227240
228241Note that the reported ` STARTTLS ` capability means that the server
229- accepts TLS, but, since you are using telnet/netcat, you cannot use this
230- (refer to Manual TLS Login below). The ` SASL ` capability lists the
242+ accepts opportunistic TLS, but, since you are using telnet/netcat, you cannot use this
243+ (refer to Manual Opportunistic TLS Login below). The ` SASL ` capability lists the
231244available SASL authentication mechanisms. If this list is empty and
232245` STARTTLS ` is available, it probably means that the server forces you
233- to initiate TLS first (as dictated by [[ setting,auth_allow_cleartext,yes]]
234- in ` dovecot.conf ` ).
246+ to initiate STARTTLS first (as dictated by [[ setting,auth_allow_cleartext,yes]]
247+ in ` dovecot.conf ` ). Note: if you're connecting from the same computer, the
248+ connection is considered secure and plaintext authentication is allowed!
235249
236250Now you need to log in. Although potentially multiple SASL mechanisms
237251are available, only ` PLAIN ` is described here. Authentication is
@@ -246,7 +260,7 @@ The credentials are the base64-encoded version of the string
246260` "\0<username>\0<password" ` (in which ` \0 ` represents the ASCII NUL
247261character). Generating this is cumbersome and a bit daunting for the
248262novice user, so for convenience a
249- [ simple Perl script] ( http ://pigeonhole.dovecot.org/utilities/sieve-auth-command.pl)
263+ [ simple Perl script] ( https ://pigeonhole.dovecot.org/utilities/sieve-auth-command.pl)
250264is provided to generate the ` AUTHENTICATE ` command for you. It is used
251265as follows:
252266
@@ -315,11 +329,21 @@ The symbolic link configured with the `sieve` setting should now point
315329to the activated script in the sieve directory. If no script is
316330active, this symbolic link is absent.
317331
318- #### Manual TLS Login
332+ #### Manual Implicit TLS Login
333+ ----------------
334+
335+ If you have enabled implicit TLS, you can use, for example, ` openssl `
336+ to connect:
337+
338+ ```
339+ openssl s_client -quiet -connect <host>:4190
340+ ```
341+
342+ #### Manual Opportunistic TLS Login
319343----------------
320344
321- When TLS needs to be used during manual testing, ` gnutls-cli ` provides
322- the means to do so. This command-line utility is part of the GNUTLS
345+ When opportunistic TLS needs to be used during manual testing, ` gnutls-cli `
346+ provides the means to do so. This command-line utility is part of the GNUTLS
323347distribution and on most systems this should be easy to install. It is
324348used to connect to ManageSieve as follows:
325349
0 commit comments