From 9bcc4cf88aacaa8a89c50f2fd3922eca136e734f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 3 Dec 2025 02:31:51 +0200 Subject: [PATCH] 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. --- src/lib-storage/index/imapc/imapc-search.c | 3 +++ 1 file changed, 3 insertions(+) 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 { -- 2.47.3