[Dovecot] Invalid Managesieve commands are counted twice
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
On 11/12/2012 10:49 AM, Christoph Bußenius wrote:
Hi,
the Managesieve server closes the connection if it receives an unknown command before authentication:
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.
It is a bug.
As a result, sieveshell cannot be used with TLS and a current Dovecot/Pigeonhole server.
I fixed this a while back, but hasn't been released so far:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/ceef02768dee
Regards,
Stephan.
Hi Stephan,
On 12.11.2012 11:18, Stephan Bosch wrote:
I fixed this a while back, but hasn't been released so far:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/ceef02768dee
thanks, I am going to try out the current hg version. I guess I should have tried this first...
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
participants (2)
-
Christoph Bußenius
-
Stephan Bosch