]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 16 Mar 2017 17:48:26 +0000 (19:48 +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 c1cf8895e2f9972cadfb318a62b80d2d26bfc384..b9383fb126b780c11fd8d705d066afb36b068b4b 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 81c05d64eef706436ce772c47b1c7efcdef3d271..489613b828be530328ff1c69b70eab15e66cc988 100644 (file)
@@ -26,6 +26,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) */