ctx = doveadm_mail_cmd_init(cmd, set);
ctx->full_args = (const void *)(argv + 1);
+ ctx->proxying = TRUE;
ctx->service_flags |=
MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT |
/* if non-zero, exit with this code */
int exit_code;
+ /* This command is being called by a remote doveadm client. */
+ unsigned int proxying:1;
/* We're handling only a single user */
unsigned int iterate_single_user:1;
/* We're going through all users (not set for wildcard usernames) */
if (expire_dict == NULL)
return;
- if (ctx->iterate_single_user) {
+ /* doveadm proxying uses expire database only locally. the remote
+ doveadm handles each user one at a time (even though
+ iterate_single_user=FALSE) */
+ if (ctx->iterate_single_user || ctx->proxying) {
if (doveadm_debug) {
i_debug("expire: Iterating only a single user, "
"ignoring expire database");