From: Timo Sirainen Date: Thu, 3 Feb 2022 19:59:46 +0000 (+0100) Subject: indexer: Log MAIL_ERROR_INTERRUPTED with info-level instead of error X-Git-Tag: 2.4.0~4375 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=454ddcd75baa8e060be7ba78beb28e823539d77d;p=thirdparty%2Fdovecot%2Fcore.git indexer: Log MAIL_ERROR_INTERRUPTED with info-level instead of error --- diff --git a/src/indexer/master-connection.c b/src/indexer/master-connection.c index eeb7a04e2d..897e95d4fd 100644 --- a/src/indexer/master-connection.c +++ b/src/indexer/master-connection.c @@ -141,9 +141,16 @@ index_mailbox_precache(struct master_connection *conn, struct mailbox *box) } } if (mailbox_search_deinit(&ctx) < 0) { - e_error(index_event, "Mail search failed: %s%s", - mailbox_get_last_internal_error(box, NULL), - get_attempt_error(counter, first_uid, last_uid)); + enum mail_error error; + const char *errstr = mailbox_get_last_internal_error(box, &error); + + if (error == MAIL_ERROR_INTERRUPTED) { + e_info(index_event, "Mail search interrupted: %s%s", errstr, + get_attempt_error(counter, first_uid, last_uid)); + } else { + e_error(index_event, "Mail search failed: %s%s", errstr, + get_attempt_error(counter, first_uid, last_uid)); + } ret = -1; } const char *uids = first_uid == 0 ? "" :