if (ctx->cur_username == NULL)
i_fatal_status(EX_USAGE, "USER environment is missing and -u option not used");
+ if (!ctx->cli) {
+ /* we may access multiple users */
+ ctx->service_flags |= MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP;
+ }
memset(&cctx, 0, sizeof(cctx));
cctx.username = ctx->cur_username;
ctx = doveadm_mail_cmdline_init(cmd);
ctx->full_args = (const void *)(argv + 1);
+ ctx->cli = TRUE;
getopt_args = "AF:S:u:";
/* keep context's getopt_args first in case it contains '+' */
array_append_zero(&pargv);
mctx->args = array_idx(&pargv, 0);
mctx->full_args = mctx->args;
+ mctx->cli = cctx->cli;
doveadm_mail_cmd_exec(mctx, wildcard_user);
doveadm_mail_cmd_free(mctx);
unsigned int iterate_single_user:1;
/* We're going through all users (not set for wildcard usernames) */
unsigned int iterate_all_users:1;
+ /* Running from CLI doveadm (not doveadm-server) */
+ unsigned int cli:1;
};
struct doveadm_mail_cmd {