1
/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */
4
#include "settings-parser.h"
5
#include "mail-storage-settings.h"
6
#include "mbox-settings.h"
11
#define DEF(type, name) \
12
{ type, #name, offsetof(struct mbox_settings, name), NULL }
14
static const struct setting_define mbox_setting_defines[] = {
15
DEF(SET_STR, mbox_read_locks),
16
DEF(SET_STR, mbox_write_locks),
17
DEF(SET_TIME, mbox_lock_timeout),
18
DEF(SET_TIME, mbox_dotlock_change_timeout),
19
DEF(SET_SIZE, mbox_min_index_size),
20
DEF(SET_BOOL, mbox_dirty_syncs),
21
DEF(SET_BOOL, mbox_very_dirty_syncs),
22
DEF(SET_BOOL, mbox_lazy_writes),
23
DEF(SET_ENUM, mbox_md5),
25
SETTING_DEFINE_LIST_END
28
static const struct mbox_settings mbox_default_settings = {
29
.mbox_read_locks = "fcntl",
30
.mbox_write_locks = "dotlock fcntl",
31
.mbox_lock_timeout = 5*60,
32
.mbox_dotlock_change_timeout = 2*60,
33
.mbox_min_index_size = 0,
34
.mbox_dirty_syncs = TRUE,
35
.mbox_very_dirty_syncs = FALSE,
36
.mbox_lazy_writes = TRUE,
37
.mbox_md5 = "apop3d:all"
40
static const struct setting_parser_info mbox_setting_parser_info = {
41
.module_name = "mbox",
42
.defines = mbox_setting_defines,
43
.defaults = &mbox_default_settings,
45
.type_offset = (size_t)-1,
46
.struct_size = sizeof(struct mbox_settings),
48
.parent_offset = (size_t)-1,
49
.parent = &mail_user_setting_parser_info
52
const struct setting_parser_info *mbox_get_setting_parser_info(void)
54
return &mbox_setting_parser_info;