From: Timo Sirainen Date: Mon, 20 Feb 2017 12:07:23 +0000 (+0200) Subject: imap: Revert change to use [PARSE] in FETCH replies. X-Git-Tag: 2.2.29.rc1~265 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc036db1a472d46671807283cc0d7661ec7e3914;p=thirdparty%2Fdovecot%2Fcore.git imap: Revert change to use [PARSE] in FETCH replies. Lets leave this for v2.3. Apparently Roundcube has some workarounds that assume [UNKNOWNCTE]. Partially reverts 8fe64e2af5b6ce7b6ffa6453beaf569dca089e59 --- diff --git a/src/imap/cmd-fetch.c b/src/imap/cmd-fetch.c index 9b373a07ea..739fcf218d 100644 --- a/src/imap/cmd-fetch.c +++ b/src/imap/cmd-fetch.c @@ -229,14 +229,12 @@ static bool cmd_fetch_finish(struct imap_fetch_context *ctx, } errstr = mailbox_get_last_error(cmd->client->mailbox, &error); - if (error == MAIL_ERROR_CONVERSION) { - /* BINARY found unsupported Content-Transfer-Encoding */ + if (error == MAIL_ERROR_CONVERSION || + error == MAIL_ERROR_INVALIDDATA) { + /* a) BINARY found unsupported Content-Transfer-Encoding + b) Content was invalid */ tagged_reply = t_strdup_printf( "NO ["IMAP_RESP_CODE_UNKNOWN_CTE"] %s", errstr); - } else if (error == MAIL_ERROR_INVALIDDATA) { - /* Content was invalid */ - tagged_reply = t_strdup_printf( - "NO ["IMAP_RESP_CODE_PARSE"] %s", errstr); } else if (cmd->client->set->parsed_fetch_failure != IMAP_CLIENT_FETCH_FAILURE_NO_AFTER || imap_fetch_is_failed_retry(ctx)) { /* By default we never want to reply NO to FETCH