diff --git a/lib/Connection.js b/lib/Connection.js index 2aa7e15..537f6be 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -473,13 +473,8 @@ Connection.prototype._store = function(which, uids, flags, isAdding, cb) { flags = [flags]; for (var i = 0, len = flags.length; i < len; ++i) { if (!isKeywords) { - if (flags[i][0] === '\\') - flags[i] = flags[i].substr(1); - if (this._box.permFlags.indexOf(flags[i].toLowerCase()) === -1 - || flags[i] === '*') - throw new Error('The flag "' + flags[i] - + '" is not allowed by the server for this mailbox'); - flags[i] = '\\' + flags[i]; + if (flags[i][0] !== '\\') + flags[i] = '\\' + flags[i]; } else { // keyword contains any char except control characters (%x00-1F and %x7F) // and: '(', ')', '{', ' ', '%', '*', '\', '"', ']'