]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Revert change to use [PARSE] in FETCH replies.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Feb 2017 12:07:23 +0000 (14:07 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Feb 2017 12:07:23 +0000 (14:07 +0200)
Lets leave this for v2.3. Apparently Roundcube has some workarounds that
assume [UNKNOWNCTE].

Partially reverts 8fe64e2af5b6ce7b6ffa6453beaf569dca089e59

src/imap/cmd-fetch.c

index 9b373a07ea3a83e5109979622cceabe004b3e2a4..739fcf218de12b020c865c7b64b6e33e5c6aa3e1 100644 (file)
@@ -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