pool_unref(&user->pool);
}
+void mail_user_deinit(struct mail_user **user)
+{
+ i_assert((*user)->refcount == 1);
+ mail_user_unref(user);
+}
+
struct mail_user *mail_user_find(struct mail_user *user, const char *name)
{
struct mail_namespace *ns;
void mail_user_ref(struct mail_user *user);
void mail_user_unref(struct mail_user **user);
+/* Assert that this is the last reference for the user and unref it. */
+void mail_user_deinit(struct mail_user **user);
/* Duplicate a mail_user. mail_user_init() and mail_namespaces_init() need to
be called before the user is usable. */