{
struct mail_storage_service_user *user;
struct mail_user *mail_user;
- struct mail_namespace *ns;
struct client *client;
struct imap_settings *imap_set;
struct lda_settings *lda_set;
- const char *errstr;
- enum mail_error mail_error;
if (mail_storage_service_lookup_next(storage_service, input,
&user, &mail_user, error_r) <= 0)
return -1;
restrict_access_allow_coredumps(TRUE);
- /* this is mainly for imapc: make sure we can do at least minimal
- access to the mailbox list or fail immediately. otherwise the IMAP
- client could be trying a lot of commands and we'd return failures
- for all of them. FIXME: There should be a bit less kludgy way to
- check this, but I'm not sure if it's worth the trouble just for
- imapc. */
- ns = mail_namespace_find_inbox(mail_user->namespaces);
- (void)mailbox_list_get_hierarchy_sep(ns->list);
- errstr = mailbox_list_get_last_internal_error(ns->list, &mail_error);
- if (mail_error != MAIL_ERROR_NONE) {
- *error_r = t_strdup(errstr);
- mail_user_unref(&mail_user);
- mail_storage_service_user_unref(&user);
- return -1;
- }
-
imap_set = mail_storage_service_user_get_set(user)[1];
if (imap_set->verbose_proctitle)
verbose_proctitle = TRUE;