]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE]
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Mon, 27 Feb 2017 23:13:54 +0000 (18:13 -0500)
committerGitLab <gitlab@git.dovecot.net>
Thu, 16 Mar 2017 10:05:38 +0000 (12:05 +0200)
[UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_*
constant to make use of it.

src/doveadm/doveadm-mail.c
src/imap/imap-commands-util.c
src/lib-storage/mail-error.h

index f11be1ecf59f109eabdb64f1ae87aff20035ee21..db64d4a3ac8b961d98218ebf08051533192aa352 100644 (file)
@@ -59,6 +59,7 @@ void doveadm_mail_failed_error(struct doveadm_mail_cmd_context *ctx,
        case MAIL_ERROR_NONE:
                i_unreached();
        case MAIL_ERROR_TEMP:
+       case MAIL_ERROR_UNAVAILABLE:
                break;
        case MAIL_ERROR_NOTPOSSIBLE:
        case MAIL_ERROR_EXISTS:
index 39dfb5ae70d9d5c9882781fc3a854bc211e97512..8e8c04d8f141f6d7fc6b441d0e10e015534acfc7 100644 (file)
@@ -144,6 +144,9 @@ imap_get_error_string(struct client_command_context *cmd,
        case MAIL_ERROR_LOOKUP_ABORTED: /* BUG: shouldn't be visible here */
                resp_code = IMAP_RESP_CODE_SERVERBUG;
                break;
+       case MAIL_ERROR_UNAVAILABLE:
+               resp_code = IMAP_RESP_CODE_UNAVAILABLE;
+               break;
        case MAIL_ERROR_NOTPOSSIBLE:
        case MAIL_ERROR_PARAMS:
                resp_code = IMAP_RESP_CODE_CANNOT;
index ed0108f5ba9bfda55247b6d878fc0b8ec3c9ff15..9a0b08de9d4bb76fad67c5392741022bcfffda56 100644 (file)
@@ -24,6 +24,8 @@ enum mail_error {
 
        /* Temporary internal error */
        MAIL_ERROR_TEMP,
+       /* Temporary failure because a subsystem is down */
+       MAIL_ERROR_UNAVAILABLE,
        /* It's not possible to do the wanted operation */
        MAIL_ERROR_NOTPOSSIBLE,
        /* Invalid parameters (eg. mailbox name not valid) */