From e0cc3a8d268a12b7e3f89cb8a482a763325c2e8a Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Thu, 19 Jul 2012 14:15:17 +0700 Subject: [PATCH 1/3] Always use LIST to get delimiter to support Cyrus IMAP server. --- imap.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/imap.js b/imap.js index 96e3ea8..d7d07cb 100644 --- a/imap.js +++ b/imap.js @@ -99,8 +99,7 @@ ImapConnection.prototype.connect = function(loginCb) { } // Lastly, get the top-level mailbox hierarchy delimiter used by the // server - self._send((self.capabilities.indexOf('XLIST') === -1 - ? 'LIST' : 'XLIST') + ' "" ""', loginCb); + self._send('LIST "" ""', loginCb); }); }); }; From ca317f56d988f5293e2b6900895759d81932721e Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Thu, 9 Aug 2012 15:42:57 +0700 Subject: [PATCH 2/3] Fix missing message structure in fetch result --- lib/imap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/imap.js b/lib/imap.js index 967e27e..7b5de52 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -824,6 +824,7 @@ ImapConnection.prototype._fetch = function(which, uids, options) { if (extensions) cmd += extensions; cmd += 'UID FLAGS INTERNALDATE'; + cmd += (opts.request.struct ? ' BODYSTRUCTURE' : ''); if (toFetch !== undefined) { cmd += ' BODY'; if (!opts.markSeen) From 84318676c64c17f638ca424ed7e7a8352e099e04 Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Fri, 10 Aug 2012 20:40:00 +0700 Subject: [PATCH 3/3] Fix undefined login callback call when connection timed out --- lib/imap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/imap.js b/lib/imap.js index 7b5de52..7e2dd3f 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -577,8 +577,8 @@ ImapConnection.prototype.connect = function(loginCb) { }); this._state.conn.connect(this._options.port, this._options.host); - this._state.tmrConn = setTimeout(this._fnTmrConn.bind(this), - this._options.connTimeout, loginCb); + this._state.tmrConn = setTimeout(this._fnTmrConn.bind(this, loginCb), + this._options.connTimeout); }; ImapConnection.prototype.isAuthenticated = function() {