From: Timo Sirainen Date: Wed, 3 Dec 2025 00:31:51 +0000 (+0200) Subject: imapc: Handle SEARCH NO replies by forwarding the error X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bcc4cf88aacaa8a89c50f2fd3922eca136e734f;p=thirdparty%2Fdovecot%2Fcore.git imapc: Handle SEARCH NO replies by forwarding the error This is how most of the other commands already work. It just wasn't done for SEARCH. --- diff --git a/src/lib-storage/index/imapc/imapc-search.c b/src/lib-storage/index/imapc/imapc-search.c index 22b279c248..fc52a6035e 100644 --- a/src/lib-storage/index/imapc/imapc-search.c +++ b/src/lib-storage/index/imapc/imapc-search.c @@ -202,6 +202,9 @@ static void imapc_search_callback(const struct imapc_command_reply *reply, if (reply->state == IMAPC_COMMAND_STATE_OK) { seq_range_array_iter_init(&ictx->iter, &ictx->rseqs); ictx->success = TRUE; + } else if (reply->state == IMAPC_COMMAND_STATE_NO) { + imapc_copy_error_from_reply(mbox->storage, MAIL_ERROR_PARAMS, + reply); } else if (reply->state == IMAPC_COMMAND_STATE_DISCONNECTED) { mail_storage_set_internal_error(mbox->box.storage); } else {