mail-storage-settings.c revision b7179ed727ee6f7cef5f5b797d401f6c0df5b484
/* Copyright (c) 2005-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "var-expand.h"
#include "settings-parser.h"
#include "mail-index.h"
#include "mail-user.h"
#include "mail-namespace.h"
#include "mail-storage-private.h"
#include "mail-storage-settings.h"
#include <stddef.h>
#define MAIL_STORAGE_SET_DRIVER_NAME "MAIL"
static struct setting_define mail_storage_setting_defines[] = {
};
};
};
static struct setting_define mail_namespace_setting_defines[] = {
};
};
};
{ SET_DEFLIST, name, \
static struct setting_define mail_user_setting_defines[] = {
};
static struct mail_user_settings mail_user_default_settings = {
MEMBER(last_valid_uid) 0,
MEMBER(last_valid_gid) 0,
};
struct setting_parser_info mail_user_setting_parser_info = {
};
const void *
const char *driver)
{
const void *dset;
i_panic("Default settings not found for storage driver %s",
driver);
}
return dset;
}
const struct mail_storage_settings *
{
return mail_user_set_get_driver_settings(set,
}
{
}
{
enum mail_index_open_flags index_flags = 0;
if (set->fsync_disable)
#ifndef MMAP_CONFLICTS_WRITE
if (set->mmap_disable)
#endif
if (set->dotlock_use_excl)
if (set->mail_nfs_index)
return index_flags;
}
const struct dynamic_settings_parser *mail_storage_get_dynamic_parsers(void)
{
struct dynamic_settings_parser *parsers;
struct mail_storage *const *storages;
unsigned int i, j, count;
for (i = 0, j = 1; i < count; i++) {
continue;
j++;
}
return parsers;
}
static void
{
}
/* <settings checks> */
const char **error_r)
{
const char *p;
bool uidl_format_ok;
char c;
*error_r = "mail_nfs_index=yes requires mmap_disable=yes";
return FALSE;
}
*error_r = "mail_nfs_index=yes requires fsync_disable=no";
return FALSE;
}
if (p[0] != '%' || p[1] == '\0')
continue;
c = var_get_key(++p);
switch (c) {
case 'v':
case 'u':
case 'm':
case 'f':
break;
case '%':
break;
default:
"Unknown pop3_uidl_format variable: %%%c", c);
return FALSE;
}
}
if (!uidl_format_ok) {
*error_r = "pop3_uidl_format setting doesn't contain any "
"%% variables.";
return FALSE;
}
return TRUE;
}
const char **error_r)
{
struct mail_namespace_settings *const *namespaces;
const char *name;
unsigned int i, count;
"Hierarchy separator must be only one character long",
name);
return FALSE;
}
for (i = 0; i < count; i++) {
break;
}
if (i == count) {
"Namespace '%s': alias_for points to "
return FALSE;
}
"Namespace '%s': alias_for chaining isn't "
namespaces[i]->alias_for);
return FALSE;
}
}
return TRUE;
}
const char **error_r)
{
#ifndef CONFIG_BINARY
#endif
"mail_plugin_dir: access(%s) failed: %m",
return FALSE;
}
return TRUE;
}
/* </settings checks> */