From: Timo Sirainen Date: Fri, 27 May 2016 18:34:26 +0000 (+0300) Subject: lazy-expunge: Don't fail expunge if mail was already expunged. X-Git-Tag: 2.2.25.rc1~260 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=137dcd83227d4d7e82c537fafbe8d457160a112f;p=thirdparty%2Fdovecot%2Fcore.git lazy-expunge: Don't fail expunge if mail was already expunged. --- diff --git a/src/plugins/lazy-expunge/lazy-expunge-plugin.c b/src/plugins/lazy-expunge/lazy-expunge-plugin.c index 580a8b0026..b9faf182e5 100644 --- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c +++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c @@ -248,9 +248,15 @@ static void lazy_expunge_set_error(struct lazy_expunge_transaction *lt, const char *errstr; enum mail_error error; + errstr = mail_storage_get_last_error(storage, &error); + if (error == MAIL_ERROR_EXPUNGED) { + /* expunging failed because the mail was already expunged. + we don't want to fail because of that. */ + return; + } + if (lt->delayed_error != MAIL_ERROR_NONE) return; - errstr = mail_storage_get_last_error(storage, &error); lt->delayed_error = error; lt->delayed_errstr = i_strdup(errstr); }