}
void mail_storage_service_all_init(struct mail_storage_service_ctx *ctx)
+{
+ mail_storage_service_all_init_mask(ctx, "");
+}
+
+void mail_storage_service_all_init_mask(struct mail_storage_service_ctx *ctx,
+ const char *user_mask_hint)
{
enum auth_master_flags flags = 0;
flags |= AUTH_MASTER_FLAG_DEBUG;
ctx->iter_conn = auth_master_init(auth_master_get_socket_path(ctx->conn),
flags);
- ctx->auth_list = auth_master_user_list_init(ctx->iter_conn, "", NULL);
+ ctx->auth_list = auth_master_user_list_init(ctx->iter_conn,
+ user_mask_hint, NULL);
}
int mail_storage_service_all_next(struct mail_storage_service_ctx *ctx,
void mail_storage_service_user_free(struct mail_storage_service_user **user);
/* Initialize iterating through all users. */
void mail_storage_service_all_init(struct mail_storage_service_ctx *ctx);
+/* Same as mail_storage_service_all_init(), but give a user mask hint to the
+ userdb iteration lookup. This itself isn't yet guaranteed to filter out any
+ usernames. */
+void mail_storage_service_all_init_mask(struct mail_storage_service_ctx *ctx,
+ const char *user_mask_hint);
/* Iterate through all usernames. Returns 1 if username was returned, 0 if
there are no more users, -1 if error. */
int mail_storage_service_all_next(struct mail_storage_service_ctx *ctx,