[Dovecot] Invalid Managesieve commands are counted twice

Christoph Bußenius busseniu at in.tum.de
Mon Nov 12 11:49:06 EET 2012


Hi,

the Managesieve server closes the connection if it receives an unknown 
command before authentication:

"IMPLEMENTATION" "Dovecot Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress 
comparator-i;ascii-numeric relational regex imap4flags copy include 
variables body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" "PLAIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot ready."
--> BOGUS
NO "Error in MANAGESIEVE command received by server."
NO "Error in MANAGESIEVE command received by server."
BYE "Too many invalid MANAGESIEVE commands."
Connection closed by foreign host.

Note that only one bogus command has been sent by the client, however 
the server sends two identical error messages.

This seems to be a bug in Pigeonhole 0.3.3.  In version 0.2.6, the 
connection was kept open after the error message.

This is actually important to us because we use the "sieveshell" utility 
which is shipped with the Python "managesieve" package.  The 
managesieve.py module always sends a BOGUS command after the TLS 
handshake.  According to its comments, this is done to work around 
problems with other server implementations:

             # Some servers send capabilities after TLS handshake, some
             # do not. We send a bogus command, and expect a NO. If you
             # get something else instead, read the extra NO to clear
             # the buffer.
             typ, data = self._command('BOGUS')

(The full source is at http://pydoc.net/managesieve/0.4.2/managesieve)

As a result, sieveshell cannot be used with TLS and a current 
Dovecot/Pigeonhole server.

Cheers,
Christoph

-- 
Christoph Bußenius
Rechnerbetriebsgruppe der Fakultäten Informatik und Mathematik
Technische Universität München
+49 89-289-18519 <> Raum 00.05.040 <> Boltzmannstr. 3 <> Garching



More information about the dovecot mailing list