/dovecot/src/plugins/acl/ |
H A D | acl-shared-storage.h | 4 int acl_shared_namespaces_add(struct mail_namespace *ns);
|
H A D | acl-shared-storage.c | 15 static bool acl_ns_prefix_exists(struct mail_namespace *ns) argument 22 if (ns->list->mail_set->mail_shared_explicit_inbox) 25 vname = t_strndup(ns->prefix, ns->prefix_len-1); 26 box = mailbox_alloc(ns->list, vname, 0); 34 acl_shared_namespace_add(struct mail_namespace *ns, argument 38 struct mail_namespace *new_ns = ns; 44 if (strcmp(ns->user->username, userdomain) == 0) { 79 int acl_shared_namespaces_add(struct mail_namespace *ns) argument 81 struct acl_user *auser = ACL_USER_CONTEXT(ns [all...] |
/dovecot/src/lib-storage/ |
H A D | mail-namespace.c | 33 void mail_namespace_add_storage(struct mail_namespace *ns, argument 36 if (ns->storage == NULL) 37 ns->storage = storage; 38 array_append(&ns->all_storages, &storage, 1); 41 storage->v.add_list(storage, ns->list); 42 hook_mail_namespace_storage_added(ns); 45 void mail_namespace_finish_list_init(struct mail_namespace *ns, argument 48 ns->list = list; 49 ns->prefix_len = strlen(ns 52 mail_namespace_free(struct mail_namespace *ns) argument 92 struct mail_namespace *ns; local 151 struct mail_namespace *ns; local 206 namespace_is_valid_alias_storage(struct mail_namespace *ns, const char **error_r) argument 230 namespace_set_alias_for(struct mail_namespace *ns, struct mail_namespace *all_namespaces, const char **error_r) argument 261 get_listindex_path(struct mail_namespace *ns, const char **path_r) argument 276 namespace_has_duplicate_listindex(struct mail_namespace *ns, const char **error_r) argument 314 struct mail_namespace *ns, *inbox_ns = NULL; local 399 struct mail_namespace *ns; local 506 struct mail_namespace *ns; local 580 struct mail_namespace *ns; local 597 struct mail_namespace *ns, *next; local 615 struct mail_namespace *ns; local 624 mail_namespace_ref(struct mail_namespace *ns) argument 633 struct mail_namespace *ns = *_ns; local 646 mail_namespace_destroy(struct mail_namespace *ns) argument 665 mail_namespace_get_default_storage(struct mail_namespace *ns) argument 670 mail_namespace_get_sep(struct mail_namespace *ns) argument 683 mail_namespace_is_usable_prefix(struct mail_namespace *ns, const char *mailbox, bool inbox) argument 713 struct mail_namespace *ns = namespaces; local 743 mail_namespace_find_shared(struct mail_namespace *ns, const char *mailbox) argument 757 struct mail_namespace *ns; local 774 struct mail_namespace *ns; local 829 struct mail_namespace *ns; local 844 struct mail_namespace *ns; local 856 mail_namespace_is_shared_user_root(struct mail_namespace *ns) argument [all...] |
H A D | mail-autoexpunge.c | 133 mailbox_autoexpunge_set(struct mail_namespace *ns, const char *vname, argument 143 box = mailbox_alloc(ns->list, vname, MAILBOX_FLAG_IGNORE_ACLS); 155 mailbox_autoexpunge_wildcards(struct mail_namespace *ns, argument 163 iter_name = t_strconcat(ns->prefix, set->name, NULL); 164 iter = mailbox_list_iter_init(ns->list, iter_name, 169 mailbox_autoexpunge_set(ns, info->vname, set->autoexpunge, 175 iter_name, mailbox_list_get_last_internal_error(ns->list, NULL)); 180 mail_namespace_autoexpunge(struct mail_namespace *ns, struct file_lock **lock, argument 186 if (!array_is_created(&ns->set->mailboxes)) 189 array_foreach(&ns 216 struct mail_namespace *ns; local [all...] |
H A D | mail-namespace.h | 123 void mail_namespace_ref(struct mail_namespace *ns); 124 void mail_namespace_unref(struct mail_namespace **ns); 132 void mail_namespace_add_storage(struct mail_namespace *ns, 135 void mail_namespace_destroy(struct mail_namespace *ns); 139 mail_namespace_get_default_storage(struct mail_namespace *ns); 142 char mail_namespace_get_sep(struct mail_namespace *ns); 185 void mail_namespace_finish_list_init(struct mail_namespace *ns, 191 bool mail_namespace_is_shared_user_root(struct mail_namespace *ns); 198 mail_namespace_is_inbox_noinferiors(struct mail_namespace *ns) argument 200 return (ns [all...] |
/dovecot/src/lib-storage/index/shared/ |
H A D | shared-list.c | 43 struct mail_namespace *ns = (*list)->ns; local 47 if (*name == '\0' && (ns->flags & NAMESPACE_FLAG_AUTOCREATED) == 0) { 49 *storage_r = ns->storage; 53 if (shared_storage_get_namespace(&ns, &name) < 0) 55 *list = ns->list; 68 struct mail_namespace *ns = list->ns; local 70 if (mail_namespace_get_default_storage(list->ns) == NULL || 72 shared_storage_get_namespace(&ns, 91 struct mail_namespace *ns = list->ns; local 114 struct mail_namespace *ns; local 195 struct mail_namespace *ns = list->ns; local 209 struct mail_namespace *ns = list->ns; local 223 struct mail_namespace *ns = list->ns; local 237 struct mail_namespace *ns = list->ns; local 272 struct mail_namespace *ns; local [all...] |
H A D | shared-storage.c | 31 shared_storage_create(struct mail_storage *_storage, struct mail_namespace *ns, argument 40 p = strchr(ns->set->location, ':'); 45 driver = t_strdup_until(ns->set->location, p); 46 storage->location = p_strdup(_storage->pool, ns->set->location); 48 p_strdup(_storage->pool, ns->unexpanded_set->location); 58 wildcardp = strchr(ns->prefix, '%'); 84 if (p[-1] != mail_namespace_get_sep(ns) && 85 (ns->flags & (NAMESPACE_FLAG_LIST_PREFIX | 94 ns->prefix_len = strlen(ns 120 shared_namespace_exists(struct mail_namespace *ns) argument 140 struct mail_namespace *new_ns, *ns = *_ns; local [all...] |
/dovecot/src/imap/ |
H A D | cmd-namespace.c | 12 struct mail_namespace *ns; member in struct:namespace_order 18 if (no1->ns->set->order < no2->ns->set->order) 20 if (no1->ns->set->order > no2->ns->set->order) 30 static void list_namespaces(struct mail_namespace *ns, argument 41 while (ns != NULL) { 42 if (ns->type == type && 43 (ns->flags & NAMESPACE_FLAG_HIDDEN) == 0) { 45 no->ns [all...] |
H A D | cmd-create.c | 10 struct mail_namespace *ns; local 21 ns = client_find_namespace(cmd, &mailbox); 22 if (ns == NULL) 26 if (len == 0 || orig_mailbox[len-1] != mail_namespace_get_sep(ns)) 40 box = mailbox_alloc(ns->list, mailbox, 0);
|
H A D | cmd-status.c | 15 struct mail_namespace *ns; local 34 ns = client_find_namespace(cmd, &mailbox); 35 if (ns == NULL) 39 mailbox_equals(client->mailbox, ns, mailbox); 40 if (imap_status_get(cmd, ns, mailbox, &items, &result) < 0) {
|
H A D | cmd-delete.c | 9 struct mail_namespace *ns; local 19 ns = client_find_namespace(cmd, &name); 20 if (ns == NULL) 23 box = mailbox_alloc(ns->list, name, 0);
|
H A D | cmd-subscribe.c | 36 struct mail_namespace *ns; local 47 ns = client_find_namespace(cmd, &mailbox); 48 if (ns == NULL) 51 box = mailbox_alloc(ns->list, mailbox, 0); 60 sep = mail_namespace_get_sep(ns); 67 box2 = mailbox_alloc(ns->list, name2, 0);
|
H A D | cmd-resetkey.c | 23 struct mail_namespace *ns; local 46 ns = client_find_namespace(cmd, &mailbox); 47 if (ns == NULL) 51 box = mailbox_alloc(ns->list, mailbox, flags);
|
H A D | cmd-notify.c | 112 struct mail_namespace *ns) 117 if (notify_ns->ns == ns) 122 notify_ns->ns = ns; 148 struct mail_namespace *ns, const char *name, 157 char ns_sep = mail_namespace_get_sep(ns); 159 if ((ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0 && 168 notify_ns = imap_notify_namespace_get(ctx, ns); 208 struct mail_namespace *ns; local 111 imap_notify_namespace_get(struct imap_notify_context *ctx, struct mail_namespace *ns) argument 147 cmd_notify_add_mailbox(struct imap_notify_context *ctx, struct mail_namespace *ns, const char *name, enum imap_notify_type type, enum imap_notify_event events) argument 223 struct mail_namespace *ns; local 243 struct mail_namespace *ns; local 258 struct mail_namespace *ns; local [all...] |
H A D | imap-status.h | 20 struct mail_namespace *ns, const char *mailbox,
|
/dovecot/src/doveadm/dsync/ |
H A D | dsync-brain-mailbox-tree.c | 14 struct mail_namespace *ns, *first_ns = NULL; local 19 for (ns = brain->user->namespaces; ns != NULL; ns = ns->next) { 20 if (!dsync_brain_want_namespace(brain, ns)) 23 sep = mail_namespace_get_sep(ns); 26 first_ns = ns; 31 sep, ns->prefix); 44 struct mail_namespace *ns; local 123 dsync_namespace_match_parts(struct mail_namespace *ns, const char *const *name_parts) argument 158 struct mail_namespace *ns, *best_ns = NULL; local 178 dsync_is_valid_name(struct mail_namespace *ns, const char *vname) argument 190 dsync_fix_mailbox_name(struct mail_namespace *ns, string_t *vname_str, char alt_char) argument 257 struct mail_namespace *ns; local 326 struct mail_namespace *ns; local [all...] |
H A D | dsync-mailbox-tree-fill.c | 23 if (node->ns == info->ns) 25 else if (node->ns == NULL) { 26 i_assert(tree->root.ns == NULL); 27 node->ns = info->ns; 30 info->vname, node->ns->prefix, info->ns->prefix); 96 box = mailbox_alloc(info->ns->list, info->vname, MAILBOX_FLAG_READONLY); 133 struct mail_namespace *ns, cons 132 dsync_mailbox_tree_find_sha(struct dsync_mailbox_tree *tree, struct mail_namespace *ns, const guid_128_t sha128) argument 145 dsync_mailbox_tree_add_change_timestamps(struct dsync_mailbox_tree *tree, struct mail_namespace *ns) argument 319 dsync_mailbox_tree_fill(struct dsync_mailbox_tree *tree, struct mail_namespace *ns, const char *box_name, const guid_128_t box_guid, const char *const *exclude_mailboxes, enum mail_error *error_r) argument [all...] |
/dovecot/src/lib-storage/list/ |
H A D | mailbox-list-iter.c | 42 struct mail_namespace *ns, const char *pattern); 44 struct mail_namespace *ns, 62 struct mail_namespace *ns = list->ns; local 64 if ((ns->flags & NAMESPACE_FLAG_SUBSCRIPTIONS) == 0) { 66 ns = mail_namespace_find_subscribable(ns->user->namespaces, 67 ns->prefix); 68 if (ns == NULL) { 72 char sep = mail_namespace_get_sep(list->ns); 82 mailbox_settings_add_ns_prefix(pool_t pool, struct mail_namespace *ns, struct mailbox_settings *in_set) argument 105 struct mail_namespace *ns = ctx->list->ns; local 172 ns_match_simple(struct ns_list_iterate_context *ctx, struct mail_namespace *ns) argument 185 ns_is_match_within_ns(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, const char *prefix_without_sep, const char *pattern, enum imap_match_result result) argument 241 ns_match_next(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, const char *pattern) argument 284 struct mail_namespace *ns = ctx->cur_ns; local 304 iter_next_try_prefix_pattern(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, const char *pattern) argument 330 mailbox_list_ns_prefix_match(struct ns_list_iterate_context *ctx, struct mail_namespace *ns) argument 348 ns_prefix_is_visible(struct ns_list_iterate_context *ctx, struct mail_namespace *ns) argument 366 struct mail_namespace *ns; local 382 mailbox_ns_prefix_is_shared_inbox(struct mail_namespace *ns) argument 390 mailbox_is_shared_inbox(struct mail_namespace *ns, const char *vname) argument 398 mailbox_list_match_anything(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, const char *prefix) argument 442 mailbox_list_ns_prefix_return(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, bool has_children) argument 568 struct mail_namespace *ns; local 710 struct mail_namespace *ns = mail_namespace_find_inbox(namespaces); local 1095 struct mail_namespace *ns = ctx->iter_ctx->list->ns; local [all...] |
H A D | mailbox-list-subscriptions.c | 27 struct mail_namespace *ns, *default_ns = list->ns; local 40 if (src_list->ns->prefix_len == 0) 43 /* we could have two-level namespace: ns/ns2/ */ 44 ns_name = t_strconcat(src_list->ns->prefix, name, NULL); 46 ns = mail_namespace_find_unsubscribable(namespaces, ns_name); 47 if (ns != NULL && ns != default_ns) { 48 if (ns->prefix_len > 0) 52 ns [all...] |
/dovecot/src/plugins/autocreate/ |
H A D | autocreate-plugin.c | 15 mailbox_settings_find(struct mail_namespace *ns, const char *vname) argument 19 array_foreach(&ns->set->mailboxes, box_set) { 29 struct mail_namespace *ns; local 39 ns = mail_namespace_find(user->namespaces, vname); 40 if ((ns->flags & NAMESPACE_FLAG_UNUSABLE) != 0) { 46 if (array_is_created(&ns->set->mailboxes)) 47 tmp_ns_set.mailboxes = ns->set->mailboxes; 50 /* work around ns->set being a const pointer. pretty ugly, but 52 memcpy((void *)&ns->set->mailboxes.arr, &tmp_ns_set.mailboxes.arr, 53 sizeof(ns [all...] |
/dovecot/src/lib-storage/index/ |
H A D | index-attribute.c | 19 struct mail_namespace *ns; local 21 ns = mail_namespace_find_inbox(user->namespaces); 22 if (ns != NULL) 23 return ns; 25 for (ns = user->namespaces; ns != NULL; ns = ns->next) { 26 if (ns->type == MAIL_NAMESPACE_TYPE_PRIVATE) 27 return ns; 37 struct mail_namespace *ns; local 85 struct mail_namespace *ns; local [all...] |
/dovecot/src/doveadm/ |
H A D | doveadm-mail-altmove.c | 43 ns_purge(struct doveadm_mail_cmd_context *ctx, struct mail_namespace *ns, argument 47 i_error("Purging namespace '%s' failed: %s", ns->prefix, 64 struct mail_namespace *ns, *prev_ns = NULL; local 74 ns_storage = mail_namespace_get_default_storage(info->ns); 83 prev_ns = info->ns; 99 for (ns = user->namespaces; ns != NULL; ns = ns->next) { 100 if (ns [all...] |
/dovecot/src/plugins/quota/ |
H A D | quota-count.c | 17 struct mail_namespace *ns; member in struct:quota_mailbox_iter 27 quota_count_mailbox(struct quota_root *root, struct mail_namespace *ns, argument 46 box = mailbox_alloc(ns->list, vname, MAILBOX_FLAG_READONLY); 109 iter->ns->prefix, 110 mailbox_list_get_last_internal_error(iter->ns->list, NULL)); 137 iter->ns = namespaces[iter->ns_idx++]; 138 } while (!quota_root_is_namespace_visible(iter->root, iter->ns)); 139 iter->iter = mailbox_list_iter_init(iter->ns->list, "*", 152 iter->ns->prefix, 153 mailbox_list_get_last_internal_error(iter->ns [all...] |
/dovecot/src/plugins/fts-solr/ |
H A D | fts-backend-solr-old.c | 174 struct mail_namespace *ns = backend->backend.ns; local 175 struct fts_solr_user *fuser = FTS_SOLR_USER_CONTEXT_REQUIRE(ns->user); 184 mail_namespace_find_prefix(ns->user->namespaces, 193 mail_namespace_find_inbox(ns->user->namespaces); 198 if (ns != backend->default_ns) { 199 str = solr_escape_id_str(ns->prefix); 204 static void fts_box_name_get_root(struct mail_namespace **ns, const char **name) argument 206 struct mail_namespace *orig_ns = *ns; 208 while ((*ns) 222 struct mail_namespace *ns = mailbox_get_namespace(box); local 279 solr_add_ns_query(string_t *str, struct solr_fts_backend *backend, struct mail_namespace *ns, bool neg) argument 300 solr_add_ns_query_http(string_t *str, struct solr_fts_backend *backend, struct mail_namespace *ns) argument 315 struct mail_namespace *ns; local 423 struct mail_namespace *ns; local 494 struct mail_namespace *ns; local 698 struct mail_namespace *ns; local 744 mailbox_get_id(struct solr_fts_backend *backend, struct mail_namespace *ns, const char *mailbox, uint32_t uidvalidity) argument 765 struct mail_namespace *ns; local [all...] |
/dovecot/src/plugins/listescape/ |
H A D | listescape-plugin.c | 17 env = mail_user_plugin_getenv(list->ns->user, "listescape_char");
|