return 0;
}
+const struct dict_op_settings *
+mail_user_get_dict_op_settings(struct mail_user *user)
+{
+ if (user->dict_op_set == NULL) {
+ user->dict_op_set = p_new(user->pool, struct dict_op_settings, 1);
+ user->dict_op_set->username = p_strdup(user->pool, user->username);
+ if (mail_user_get_home(user, &user->dict_op_set->home_dir) <= 0)
+ user->dict_op_set->home_dir = NULL;
+ }
+ return user->dict_op_set;
+}
+
static const struct var_expand_func_table mail_user_var_expand_func_table_arr[] = {
{ "userdb", mail_user_var_expand_func_userdb },
{ NULL, NULL }
struct fs_settings;
struct ssl_iostream_settings;
struct mail_user;
+struct dict_op_settings;
struct mail_user_vfuncs {
void (*deinit)(struct mail_user *user);
struct mail_user_settings *set;
struct mail_namespace *namespaces;
struct mail_storage *storages;
+ struct dict_op_settings *dict_op_set;
ARRAY(const struct mail_storage_hooks *) hooks;
normalizer_func_t *default_normalizer;
with ENOENT. This way it avoids unnecessary disk IO to the home. */
int mail_user_home_mkdir(struct mail_user *user);
+/* Return dict_op_settings for the user. The returned settings are valid until
+ the user is freed. */
+const struct dict_op_settings *
+mail_user_get_dict_op_settings(struct mail_user *user);
+
+
/* Obtain the postmaster address to be used for this user as an RFC 5322 (IMF)
address. Returns false if the configured postmaster address is invalid in
which case error_r contains the error message. */