diff --git a/lib/imap.js b/lib/imap.js index be6f87e..aa3c535 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -650,7 +650,7 @@ ImapConnection.prototype.connect = function(loginCb) { err.request = cmdstr; } else return requests[0].callback(); - } else if (m = /^A\d+ (NO|BAD) (?:\[(.+)\] )?(.+)$/i.exec(line)) { + } else if (m = /^A\d+ (NO|BAD) (?:\[(.+?)\] )?(.+)$/i.exec(line)) { // m[1]: error type // m[2]: resp-text-code // m[3]: message