From fbfcfea5dc1b8fd219d80d0ca6f105eeededdac3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 23 Mar 2013 09:59:58 +0100 Subject: [PATCH] fix cram-md5 authentication we need to send a newline after the response for imap to grok it. --- src/drv_imap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index c790c41..1c29fde 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -1209,7 +1209,9 @@ do_cram_auth( imap_store_t *ctx, struct imap_cmd *cmdp, const char *prompt ) printf( ">+> %s\n", resp ); fflush( stdout ); } - return socket_write( &ctx->conn, resp, l, GiveOwn ); + if (socket_write( &ctx->conn, resp, l, GiveOwn ) < 0) + return -1; + return socket_write( &ctx->conn, "\r\n", 2, KeepOwn ); } #endif