p_strdup(mail_user->pool, user->input.session_id);
mail_user->userdb_fields = user->input.userdb_fields == NULL ? NULL :
p_strarray_dup(mail_user->pool, user->input.userdb_fields);
+ mail_user->autoexpunge_enabled =
+ (user->flags & MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE) != 0;
mail_set = mail_user_set_get_storage_set(mail_user);
/* When executing doveconf, tell it to use sysexits codes */
MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS = 0x400,
/* Don't create namespaces, only the user. */
- MAIL_STORAGE_SERVICE_FLAG_NO_NAMESPACES = 0x800
+ MAIL_STORAGE_SERVICE_FLAG_NO_NAMESPACES = 0x800,
+ /* Enable autoexpunging at deinit. */
+ MAIL_STORAGE_SERVICE_FLAG_AUTOEXPUNGE = 0x1000
};
struct mail_storage_service_input {
return;
}
- mail_user_autoexpunge(user);
+ if (user->autoexpunge_enabled)
+ mail_user_autoexpunge(user);
user->deinitializing = TRUE;
unsigned int admin:1;
/* Enable all statistics gathering */
unsigned int stats_enabled:1;
+ /* Enable autoexpunging at deinit. */
+ unsigned int autoexpunge_enabled:1;
};
struct mail_user_module_register {