close connection for too long commands
diff --git a/src/imap/ngx_imap_handler.c b/src/imap/ngx_imap_handler.c
index dad0994..a32b107 100644
--- a/src/imap/ngx_imap_handler.c
+++ b/src/imap/ngx_imap_handler.c
@@ -1253,6 +1253,8 @@
         ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
                       "client sent too long command \"%V\"", &l);
 
+        s->quit = 1;
+
         return NGX_IMAP_PARSE_INVALID_COMMAND;
     }