imap-settings.c revision 13eb655174f3857b38f4e3ac8658c82184715fd4
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek/* Copyright (c) 2005-2012 Dovecot authors, see the included COPYING file */
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozekstatic bool imap_settings_verify(void *_set, pool_t pool,
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek const char **error_r);
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek/* <settings checks> */
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozekstatic struct file_listener_settings imap_unix_listeners_array[] = {
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozekstatic struct file_listener_settings *imap_unix_listeners[] = {
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek imap_unix_listeners, sizeof(imap_unix_listeners), { 0, }
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek/* </settings checks> */
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinastruct service_settings imap_service_settings = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina .unix_listeners = { { &imap_unix_listeners_buf,
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozek { type, #name, offsetof(struct imap_settings, name), NULL }
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina { SET_DEFLIST, name, offsetof(struct imap_settings, field), defines }
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinastatic const struct setting_define imap_setting_defines[] = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinastatic const struct imap_settings imap_default_settings = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina /* RFC-2683 recommends at least 8000 bytes. Some clients however don't
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina break large message sets to multiple commands, so we're pretty
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina liberal by default. */
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozekstatic const struct setting_parser_info *imap_setting_dependencies[] = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinaconst struct setting_parser_info imap_setting_parser_info = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina/* <settings checks> */
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinastatic const struct imap_client_workaround_list imap_client_workaround_list[] = {
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina { "delay-newmail", WORKAROUND_DELAY_NEWMAIL },
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina { "tb-extra-mailbox-sep", WORKAROUND_TB_EXTRA_MAILBOX_SEP },
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina { "tb-lsub-flags", WORKAROUND_TB_LSUB_FLAGS },
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březinaimap_settings_parse_workarounds(struct imap_settings *set,
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina const char **error_r)
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina enum imap_client_workarounds client_workarounds = 0;
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina const struct imap_client_workaround_list *list;
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina const char *const *str;
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina str = t_strsplit_spaces(set->imap_client_workarounds, " ,");
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina *error_r = t_strdup_printf("imap_client_workarounds: "
da33a9d7742d45975bd97d33dd8ad04a843e7656Jakub Hrozekimap_settings_verify(void *_set, pool_t pool ATTR_UNUSED, const char **error_r)
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina if (imap_settings_parse_workarounds(set, error_r) < 0)
dbb990fb29e7178a3cce53474e48ce69ab3a97a0Pavel Březina/* </settings checks> */