]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lazy-expunge: Don't fail expunge if mail was already expunged.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 27 May 2016 18:34:26 +0000 (21:34 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 1 Jun 2016 09:03:39 +0000 (12:03 +0300)
src/plugins/lazy-expunge/lazy-expunge-plugin.c

index 580a8b002621349ff19736f48636465ac0295552..b9faf182e55061792b945d2dcc9c1917a12a7e55 100644 (file)
@@ -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);
 }