]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: doveadm-mail - Always perform userdb lookup
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 15 Aug 2022 07:16:48 +0000 (10:16 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 2 Sep 2022 06:22:32 +0000 (06:22 +0000)
src/doveadm/doveadm-mail.c

index b0c6cc1106ce47f0d385de254ae370e81ce6f9d3..413ea62b9bb464fcbc912fc266a2250a8a852269 100644 (file)
@@ -811,15 +811,13 @@ doveadm_cmdv2_wrapper_parse_common_options(struct doveadm_mail_cmd_context *mctx
        bool tcp_server = cctx->conn_type == DOVEADM_CONNECTION_TYPE_TCP;
        const char *value_str;
 
+       mctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP;
        *wildcard_user_r = NULL;
        if (doveadm_cmd_param_flag(cctx, "all-users")) {
-               mctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP;
                *wildcard_user_r = "*";
        } else if (doveadm_cmd_param_istream(cctx, "user-file", &mctx->users_list_input)) {
                i_stream_ref(mctx->users_list_input);
-               mctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP;
        } else if (doveadm_cmd_param_str(cctx, "user", &value_str)) {
-               mctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP;
                if (!tcp_server)
                        cctx->username = value_str;