/* </settings checks> */
struct service_settings anvil_service_settings = {
- MEMBER(name) "anvil",
- MEMBER(protocol) "",
- MEMBER(type) "anvil",
- MEMBER(executable) "anvil",
- MEMBER(user) "dovecot",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "empty",
+ .name = "anvil",
+ .protocol = "",
+ .type = "anvil",
+ .executable = "anvil",
+ .user = "dovecot",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "empty",
- MEMBER(drop_priv_before_exec) FALSE,
+ .drop_priv_before_exec = FALSE,
- MEMBER(process_min_avail) 1,
- MEMBER(process_limit) 1,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
+ .process_min_avail = 1,
+ .process_limit = 1,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
- MEMBER(unix_listeners) { { &anvil_unix_listeners_buf,
- sizeof(anvil_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .unix_listeners = { { &anvil_unix_listeners_buf,
+ sizeof(anvil_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
/* </settings checks> */
struct service_settings auth_service_settings = {
- MEMBER(name) "auth",
- MEMBER(protocol) "",
- MEMBER(type) "",
- MEMBER(executable) "auth",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 1,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
-
- MEMBER(unix_listeners) { { &auth_unix_listeners_buf,
- sizeof(auth_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "auth",
+ .protocol = "",
+ .type = "",
+ .executable = "auth",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 1,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
+
+ .unix_listeners = { { &auth_unix_listeners_buf,
+ sizeof(auth_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
/* <settings checks> */
/* </settings checks> */
struct service_settings auth_worker_service_settings = {
- MEMBER(name) "auth-worker",
- MEMBER(protocol) "",
- MEMBER(type) "",
- MEMBER(executable) "auth -w",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 1,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
-
- MEMBER(unix_listeners) { { &auth_worker_unix_listeners_buf,
- sizeof(auth_worker_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "auth-worker",
+ .protocol = "",
+ .type = "",
+ .executable = "auth -w",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 1,
+ .service_count = 0,
+ .vsz_limit = -1U,
+
+ .unix_listeners = { { &auth_worker_unix_listeners_buf,
+ sizeof(auth_worker_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
const struct setting_parser_info auth_passdb_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) auth_passdb_setting_defines,
- MEMBER(defaults) NULL,
+ .defines = auth_passdb_setting_defines,
- MEMBER(type_offset) offsetof(struct auth_passdb_settings, driver),
- MEMBER(struct_size) sizeof(struct auth_passdb_settings),
+ .type_offset = offsetof(struct auth_passdb_settings, driver),
+ .struct_size = sizeof(struct auth_passdb_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &auth_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &auth_setting_parser_info
};
#undef DEF
};
const struct setting_parser_info auth_userdb_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) auth_userdb_setting_defines,
- MEMBER(defaults) NULL,
+ .defines = auth_userdb_setting_defines,
- MEMBER(type_offset) offsetof(struct auth_userdb_settings, driver),
- MEMBER(struct_size) sizeof(struct auth_userdb_settings),
+ .type_offset = offsetof(struct auth_userdb_settings, driver),
+ .struct_size = sizeof(struct auth_userdb_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &auth_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &auth_setting_parser_info
};
/* we're kind of kludging here to avoid "auth_" prefix in the struct fields */
};
static const struct auth_settings auth_default_settings = {
- MEMBER(mechanisms) "plain",
- MEMBER(realms) "",
- MEMBER(default_realm) "",
- MEMBER(cache_size) 0,
- MEMBER(cache_ttl) 60*60,
- MEMBER(cache_negative_ttl) 0,
- MEMBER(username_chars) "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@",
- MEMBER(username_translation) "",
- MEMBER(username_format) "",
- MEMBER(master_user_separator) "",
- MEMBER(anonymous_username) "anonymous",
- MEMBER(krb5_keytab) "",
- MEMBER(gssapi_hostname) "",
- MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth",
- MEMBER(failure_delay) 2,
-
- MEMBER(verbose) FALSE,
- MEMBER(debug) FALSE,
- MEMBER(debug_passwords) FALSE,
- MEMBER(ssl_require_client_cert) FALSE,
- MEMBER(ssl_username_from_cert) FALSE,
- MEMBER(use_winbind) FALSE,
-
- MEMBER(worker_max_count) 30,
-
- MEMBER(passdbs) ARRAY_INIT,
- MEMBER(userdbs) ARRAY_INIT
+ .mechanisms = "plain",
+ .realms = "",
+ .default_realm = "",
+ .cache_size = 0,
+ .cache_ttl = 60*60,
+ .cache_negative_ttl = 0,
+ .username_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@",
+ .username_translation = "",
+ .username_format = "",
+ .master_user_separator = "",
+ .anonymous_username = "anonymous",
+ .krb5_keytab = "",
+ .gssapi_hostname = "",
+ .winbind_helper_path = "/usr/bin/ntlm_auth",
+ .failure_delay = 2,
+
+ .verbose = FALSE,
+ .debug = FALSE,
+ .debug_passwords = FALSE,
+ .ssl_require_client_cert = FALSE,
+ .ssl_username_from_cert = FALSE,
+ .use_winbind = FALSE,
+
+ .worker_max_count = 30,
+
+ .passdbs = ARRAY_INIT,
+ .userdbs = ARRAY_INIT
};
const struct setting_parser_info auth_setting_parser_info = {
- MEMBER(module_name) "auth",
- MEMBER(defines) auth_setting_defines,
- MEMBER(defaults) &auth_default_settings,
+ .module_name = "auth",
+ .defines = auth_setting_defines,
+ .defaults = &auth_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct auth_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct auth_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) auth_settings_check
+ .check_func = auth_settings_check
};
/* <settings checks> */
#define AUTH_PENALTY_ANVIL_PATH "anvil-auth-penalty"
struct auth_userdb_settings userdb_dummy_set = {
- MEMBER(driver) "static",
- MEMBER(args) ""
+ .driver = "static",
+ .args = ""
};
struct auth *auth_preinit(struct auth_settings *set)
};
static struct ldap_settings default_ldap_settings = {
- MEMBER(hosts) NULL,
- MEMBER(uris) NULL,
- MEMBER(dn) NULL,
- MEMBER(dnpass) NULL,
- MEMBER(auth_bind) FALSE,
- MEMBER(auth_bind_userdn) NULL,
- MEMBER(tls) FALSE,
- MEMBER(sasl_bind) FALSE,
- MEMBER(sasl_mech) NULL,
- MEMBER(sasl_realm) NULL,
- MEMBER(sasl_authz_id) NULL,
- MEMBER(tls_ca_cert_file) NULL,
- MEMBER(tls_ca_cert_dir) NULL,
- MEMBER(tls_cert_file) NULL,
- MEMBER(tls_key_file) NULL,
- MEMBER(tls_cipher_suite) NULL,
- MEMBER(tls_require_cert) NULL,
- MEMBER(deref) "never",
- MEMBER(scope) "subtree",
- MEMBER(base) NULL,
- MEMBER(ldap_version) 3,
- MEMBER(debug_level) "0",
- MEMBER(ldaprc_path) "",
- MEMBER(user_attrs) "homeDirectory=home,uidNumber=uid,gidNumber=gid",
- MEMBER(user_filter) "(&(objectClass=posixAccount)(uid=%u))",
- MEMBER(pass_attrs) "uid=user,userPassword=password",
- MEMBER(pass_filter) "(&(objectClass=posixAccount)(uid=%u))",
- MEMBER(iterate_attrs) "uid=user",
- MEMBER(iterate_filter) "(objectClass=posixAccount)",
- MEMBER(default_pass_scheme) "crypt"
+ .hosts = NULL,
+ .uris = NULL,
+ .dn = NULL,
+ .dnpass = NULL,
+ .auth_bind = FALSE,
+ .auth_bind_userdn = NULL,
+ .tls = FALSE,
+ .sasl_bind = FALSE,
+ .sasl_mech = NULL,
+ .sasl_realm = NULL,
+ .sasl_authz_id = NULL,
+ .tls_ca_cert_file = NULL,
+ .tls_ca_cert_dir = NULL,
+ .tls_cert_file = NULL,
+ .tls_key_file = NULL,
+ .tls_cipher_suite = NULL,
+ .tls_require_cert = NULL,
+ .deref = "never",
+ .scope = "subtree",
+ .base = NULL,
+ .ldap_version = 3,
+ .debug_level = "0",
+ .ldaprc_path = "",
+ .user_attrs = "homeDirectory=home,uidNumber=uid,gidNumber=gid",
+ .user_filter = "(&(objectClass=posixAccount)(uid=%u))",
+ .pass_attrs = "uid=user,userPassword=password",
+ .pass_filter = "(&(objectClass=posixAccount)(uid=%u))",
+ .iterate_attrs = "uid=user",
+ .iterate_filter = "(objectClass=posixAccount)",
+ .default_pass_scheme = "crypt"
};
static struct ldap_connection *ldap_connections = NULL;
};
static struct sql_settings default_sql_settings = {
- MEMBER(driver) NULL,
- MEMBER(connect) NULL,
- MEMBER(password_query) "SELECT username, domain, password FROM users WHERE username = '%n' AND domain = '%d'",
- MEMBER(user_query) "SELECT home, uid, gid FROM users WHERE username = '%n' AND domain = '%d'",
- MEMBER(update_query) "UPDATE users SET password = '%w' WHERE username = '%n' AND domain = '%d'",
- MEMBER(iterate_query) "SELECT username, domain FROM users",
- MEMBER(default_pass_scheme) "MD5"
+ .driver = NULL,
+ .connect = NULL,
+ .password_query = "SELECT username, domain, password FROM users WHERE username = '%n' AND domain = '%d'",
+ .user_query = "SELECT home, uid, gid FROM users WHERE username = '%n' AND domain = '%d'",
+ .update_query = "UPDATE users SET password = '%w' WHERE username = '%n' AND domain = '%d'",
+ .iterate_query = "SELECT username, domain FROM users",
+ .default_pass_scheme = "MD5"
};
static struct sql_connection *connections = NULL;
const struct mech_module mech_anonymous = {
"ANONYMOUS",
- MEMBER(flags) MECH_SEC_ANONYMOUS,
- MEMBER(passdb_need) MECH_PASSDB_NEED_NOTHING,
+ .flags = MECH_SEC_ANONYMOUS,
+ .passdb_need = MECH_PASSDB_NEED_NOTHING,
mech_anonymous_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_apop = {
"APOP",
- MEMBER(flags) MECH_SEC_PRIVATE | MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_VERIFY_RESPONSE,
+ .flags = MECH_SEC_PRIVATE | MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_VERIFY_RESPONSE,
mech_apop_auth_new,
mech_apop_auth_initial,
const struct mech_module mech_cram_md5 = {
"CRAM-MD5",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_VERIFY_RESPONSE,
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_VERIFY_RESPONSE,
mech_cram_md5_auth_new,
mech_cram_md5_auth_initial,
const struct mech_module mech_digest_md5 = {
"DIGEST-MD5",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
MECH_SEC_MUTUAL_AUTH,
- MEMBER(passdb_need) MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+ .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
mech_digest_md5_auth_new,
mech_digest_md5_auth_initial,
const struct mech_module mech_external = {
"EXTERNAL",
- MEMBER(flags) 0,
- MEMBER(passdb_need) MECH_PASSDB_NEED_VERIFY_PLAIN,
+ .flags = 0,
+ .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
mech_external_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_gssapi = {
"GSSAPI",
- MEMBER(flags) 0,
- MEMBER(passdb_need) MECH_PASSDB_NEED_NOTHING,
+ .flags = 0,
+ .passdb_need = MECH_PASSDB_NEED_NOTHING,
mech_gssapi_auth_new,
mech_gssapi_auth_initial,
const struct mech_module mech_gssapi_spnego = {
"GSS-SPNEGO",
- MEMBER(flags) 0,
- MEMBER(passdb_need) MECH_PASSDB_NEED_NOTHING,
+ .flags = 0,
+ .passdb_need = MECH_PASSDB_NEED_NOTHING,
mech_gssapi_auth_new,
mech_gssapi_auth_initial,
const struct mech_module mech_login = {
"LOGIN",
- MEMBER(flags) MECH_SEC_PLAINTEXT,
- MEMBER(passdb_need) MECH_PASSDB_NEED_VERIFY_PLAIN,
+ .flags = MECH_SEC_PLAINTEXT,
+ .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
mech_login_auth_new,
mech_login_auth_initial,
const struct mech_module mech_ntlm = {
"NTLM",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
mech_ntlm_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_otp = {
"OTP",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_SET_CREDENTIALS,
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_SET_CREDENTIALS,
mech_otp_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_plain = {
"PLAIN",
- MEMBER(flags) MECH_SEC_PLAINTEXT,
- MEMBER(passdb_need) MECH_PASSDB_NEED_VERIFY_PLAIN,
+ .flags = MECH_SEC_PLAINTEXT,
+ .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
mech_plain_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_rpa = {
"RPA",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
MECH_SEC_MUTUAL_AUTH,
- MEMBER(passdb_need) MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+ .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
mech_rpa_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_skey = {
"SKEY",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_SET_CREDENTIALS,
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_SET_CREDENTIALS,
mech_skey_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_winbind_ntlm = {
"NTLM",
- MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
- MEMBER(passdb_need) MECH_PASSDB_NEED_NOTHING,
+ .flags = MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
+ .passdb_need = MECH_PASSDB_NEED_NOTHING,
mech_winbind_ntlm_auth_new,
mech_generic_auth_initial,
const struct mech_module mech_winbind_spnego = {
"GSS-SPNEGO",
- MEMBER(flags) 0,
- MEMBER(passdb_need) MECH_PASSDB_NEED_NOTHING,
+ .flags = 0,
+ .passdb_need = MECH_PASSDB_NEED_NOTHING,
mech_winbind_spnego_auth_new,
mech_winbind_auth_initial,
};
#else
struct passdb_module_interface passdb_bsdauth = {
- MEMBER(name) "bsdauth"
+ .name = "bsdauth"
};
#endif
};
#else
struct passdb_module_interface passdb_checkpassword = {
- MEMBER(name) "checkpassword"
+ .name = "checkpassword"
};
#endif
};
#else
struct passdb_module_interface passdb_ldap = {
- MEMBER(name) "ldap"
+ .name = "ldap"
};
#endif
};
#else
struct passdb_module_interface passdb_pam = {
- MEMBER(name) "pam"
+ .name = "pam"
};
#endif
};
#else
struct passdb_module_interface passdb_passwd_file = {
- MEMBER(name) "passwd-file"
+ .name = "passwd-file"
};
#endif
#else
struct passdb_module_interface passdb_passwd = {
- MEMBER(name) "passwd"
+ .name = "passwd"
};
#endif
};
#else
struct passdb_module_interface passdb_shadow = {
- MEMBER(name) "shadow"
+ .name = "shadow"
};
#endif
};
#else
struct passdb_module_interface passdb_sia = {
- MEMBER(name) "sia"
+ .name = "sia"
};
#endif
};
#else
struct passdb_module_interface passdb_sql = {
- MEMBER(name) "sql"
+ .name = "sql"
};
#endif
};
#else
struct passdb_module_interface passdb_vpopmail = {
- MEMBER(name) "vpopmail"
+ .name = "vpopmail"
};
#endif
};
#else
struct userdb_module_interface userdb_checkpassword = {
- MEMBER(name) "checkpassword"
+ .name = "checkpassword"
};
#endif
};
#else
struct userdb_module_interface userdb_ldap = {
- MEMBER(name) "ldap"
+ .name = "ldap"
};
#endif
};
#else
struct userdb_module_interface userdb_nss = {
- MEMBER(name) "nss"
+ .name = "nss"
};
#endif
};
#else
struct userdb_module_interface userdb_passwd_file = {
- MEMBER(name) "passwd-file"
+ .name = "passwd-file"
};
#endif
};
#else
struct userdb_module_interface userdb_passwd = {
- MEMBER(name) "passwd"
+ .name = "passwd"
};
#endif
};
#else
struct userdb_module_interface userdb_prefetch = {
- MEMBER(name) "prefetch"
+ .name = "prefetch"
};
#endif
};
#else
struct userdb_module_interface userdb_sql = {
- MEMBER(name) "sql"
+ .name = "sql"
};
#endif
};
#else
struct userdb_module_interface userdb_static = {
- MEMBER(name) "static"
+ .name = "static"
};
#endif
};
#else
struct userdb_module_interface userdb_vpopmail = {
- MEMBER(name) "vpopmail"
+ .name = "vpopmail"
};
#endif
/* </settings checks> */
struct service_settings config_service_settings = {
- MEMBER(name) "config",
- MEMBER(protocol) "",
- MEMBER(type) "config",
- MEMBER(executable) "config",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
+ .name = "config",
+ .protocol = "",
+ .type = "config",
+ .executable = "config",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
- MEMBER(drop_priv_before_exec) FALSE,
+ .drop_priv_before_exec = FALSE,
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
- MEMBER(unix_listeners) { { &config_unix_listeners_buf,
- sizeof(config_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .unix_listeners = { { &config_unix_listeners_buf,
+ sizeof(config_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
/* </settings checks> */
struct service_settings dict_service_settings = {
- MEMBER(name) "dict",
- MEMBER(protocol) "",
- MEMBER(type) "",
- MEMBER(executable) "dict",
- MEMBER(user) "dovecot",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
+ .name = "dict",
+ .protocol = "",
+ .type = "",
+ .executable = "dict",
+ .user = "dovecot",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
- MEMBER(drop_priv_before_exec) FALSE,
+ .drop_priv_before_exec = FALSE,
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
- MEMBER(unix_listeners) { { &dict_unix_listeners_buf,
- sizeof(dict_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .unix_listeners = { { &dict_unix_listeners_buf,
+ sizeof(dict_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
const struct dict_settings dict_default_settings = {
- MEMBER(base_dir) PKG_RUNDIR,
- MEMBER(dict_db_config) "",
- MEMBER(dicts) ARRAY_INIT
+ .base_dir = PKG_RUNDIR,
+ .dict_db_config = "",
+ .dicts = ARRAY_INIT
};
const struct setting_parser_info dict_setting_parser_info = {
- MEMBER(module_name) "dict",
- MEMBER(defines) dict_setting_defines,
- MEMBER(defaults) &dict_default_settings,
+ .module_name = "dict",
+ .defines = dict_setting_defines,
+ .defaults = &dict_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct dict_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct dict_settings),
- MEMBER(parent_offset) (size_t)-1
+ .parent_offset = (size_t)-1
};
const struct dict_settings *dict_settings;
#include <stddef.h>
struct service_settings imap_login_service_settings = {
- MEMBER(name) "imap-login",
- MEMBER(protocol) "imap",
- MEMBER(type) "login",
- MEMBER(executable) "imap-login",
- MEMBER(user) "dovecot",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "login",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 1,
- MEMBER(vsz_limit) 64,
-
- MEMBER(unix_listeners) ARRAY_INIT,
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "imap-login",
+ .protocol = "imap",
+ .type = "login",
+ .executable = "imap-login",
+ .user = "dovecot",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "login",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 1,
+ .vsz_limit = 64,
+
+ .unix_listeners = ARRAY_INIT,
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
static const struct imap_login_settings imap_login_default_settings = {
- MEMBER(imap_capability) ""
+ .imap_capability = ""
};
static const struct setting_parser_info *imap_login_setting_dependencies[] = {
};
static const struct setting_parser_info imap_login_setting_parser_info = {
- MEMBER(module_name) "imap-login",
- MEMBER(defines) imap_login_setting_defines,
- MEMBER(defaults) &imap_login_default_settings,
-
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct imap_login_settings),
+ .module_name = "imap-login",
+ .defines = imap_login_setting_defines,
+ .defaults = &imap_login_default_settings,
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct imap_login_settings),
- MEMBER(check_func) NULL,
- MEMBER(dependencies) imap_login_setting_dependencies
+ .parent_offset = (size_t)-1,
+ .dependencies = imap_login_setting_dependencies
};
const struct setting_parser_info *imap_login_setting_roots[] = {
/* </settings checks> */
struct service_settings imap_service_settings = {
- MEMBER(name) "imap",
- MEMBER(protocol) "imap",
- MEMBER(type) "",
- MEMBER(executable) "imap",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 1,
- MEMBER(vsz_limit) -1U,
-
- MEMBER(unix_listeners) { { &imap_unix_listeners_buf,
- sizeof(imap_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "imap",
+ .protocol = "imap",
+ .type = "",
+ .executable = "imap",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 1,
+ .vsz_limit = -1U,
+
+ .unix_listeners = { { &imap_unix_listeners_buf,
+ sizeof(imap_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
static const struct imap_settings imap_default_settings = {
- MEMBER(mail_debug) FALSE,
- MEMBER(verbose_proctitle) FALSE,
+ .mail_debug = FALSE,
+ .verbose_proctitle = FALSE,
/* RFC-2683 recommends at least 8000 bytes. Some clients however don't
break large message sets to multiple commands, so we're pretty
liberal by default. */
- MEMBER(imap_max_line_length) 64*1024,
- MEMBER(imap_idle_notify_interval) 2*60,
- MEMBER(imap_capability) "",
- MEMBER(imap_client_workarounds) "outlook-idle",
- MEMBER(imap_logout_format) "bytes=%i/%o",
- MEMBER(imap_id_send) "",
- MEMBER(imap_id_log) ""
+ .imap_max_line_length = 64*1024,
+ .imap_idle_notify_interval = 2*60,
+ .imap_capability = "",
+ .imap_client_workarounds = "outlook-idle",
+ .imap_logout_format = "bytes=%i/%o",
+ .imap_id_send = "",
+ .imap_id_log = ""
};
static const struct setting_parser_info *imap_setting_dependencies[] = {
};
const struct setting_parser_info imap_setting_parser_info = {
- MEMBER(module_name) "imap",
- MEMBER(defines) imap_setting_defines,
- MEMBER(defaults) &imap_default_settings,
+ .module_name = "imap",
+ .defines = imap_setting_defines,
+ .defaults = &imap_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct imap_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct imap_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) imap_settings_verify,
- MEMBER(dependencies) imap_setting_dependencies
+ .check_func = imap_settings_verify,
+ .dependencies = imap_setting_dependencies
};
/* <settings checks> */
}
struct dict dict_driver_client = {
- MEMBER(name) "proxy",
+ .name = "proxy",
{
client_dict_init,
}
struct dict dict_driver_db = {
- MEMBER(name) "db",
+ .name = "db",
{
db_dict_init,
db_dict_deinit,
};
static struct dotlock_settings file_dict_dotlock_settings = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 30,
- MEMBER(stale_timeout) 5
+ .timeout = 30,
+ .stale_timeout = 5
};
static struct dict *file_dict_init(struct dict *driver, const char *uri,
}
struct dict dict_driver_file = {
- MEMBER(name) "file",
+ .name = "file",
{
file_dict_init,
file_dict_deinit,
}
static struct dict sql_dict = {
- MEMBER(name) "sql",
+ .name = "sql",
{
sql_dict_init,
#define MAIL_INDEX_STRMAP_TIMEOUT_SECS 10
const struct dotlock_settings default_dotlock_settings = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) MAIL_INDEX_STRMAP_TIMEOUT_SECS,
- MEMBER(stale_timeout) 30
+ .timeout = MAIL_INDEX_STRMAP_TIMEOUT_SECS,
+ .stale_timeout = 30
};
struct mail_index_strmap *
};
static const struct dotlock_settings default_dotlock_set = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 60,
- MEMBER(stale_timeout) 30
+ .timeout = 60,
+ .stale_timeout = 30
};
int mailbox_list_index_set_syscall_error(struct mailbox_list_index *index,
};
static const struct dotlock_settings default_duplicate_dotlock_set = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 20,
- MEMBER(stale_timeout) 10,
-
- MEMBER(callback) NULL,
- MEMBER(context) NULL,
-
- MEMBER(use_excl_lock) FALSE
+ .timeout = 20,
+ .stale_timeout = 10,
};
static int duplicate_cmp(const void *p1, const void *p2)
};
static const struct lda_settings lda_default_settings = {
- MEMBER(postmaster_address) "",
- MEMBER(hostname) "",
- MEMBER(sendmail_path) "/usr/lib/sendmail",
- MEMBER(rejection_subject) "Rejected: %s",
- MEMBER(rejection_reason)
+ .postmaster_address = "",
+ .hostname = "",
+ .sendmail_path = "/usr/lib/sendmail",
+ .rejection_subject = "Rejected: %s",
+ .rejection_reason =
"Your message to <%t> was automatically rejected:%n%r",
- MEMBER(deliver_log_format) "msgid=%m: %$",
- MEMBER(recipient_delimiter) "",
- MEMBER(quota_full_tempfail) FALSE,
- MEMBER(lda_mailbox_autocreate) FALSE,
- MEMBER(lda_mailbox_autosubscribe) FALSE
+ .deliver_log_format = "msgid=%m: %$",
+ .recipient_delimiter = "",
+ .quota_full_tempfail = FALSE,
+ .lda_mailbox_autocreate = FALSE,
+ .lda_mailbox_autosubscribe = FALSE
};
static const struct setting_parser_info *lda_setting_dependencies[] = {
};
const struct setting_parser_info lda_setting_parser_info = {
- MEMBER(module_name) "lda",
- MEMBER(defines) lda_setting_defines,
- MEMBER(defaults) &lda_default_settings,
+ .module_name = "lda",
+ .defines = lda_setting_defines,
+ .defaults = &lda_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct lda_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct lda_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
-#ifdef CONFIG_BINARY
- MEMBER(check_func) NULL,
-#else
- MEMBER(check_func) lda_settings_check,
+#ifndef CONFIG_BINARY
+ .check_func = lda_settings_check,
#endif
- MEMBER(dependencies) lda_setting_dependencies
+ .dependencies = lda_setting_dependencies
};
static bool lda_settings_check(void *_set, pool_t pool ATTR_UNUSED,
};
static const struct master_service_settings master_service_default_settings = {
- MEMBER(log_path) "",
- MEMBER(info_log_path) "",
- MEMBER(debug_log_path) "",
- MEMBER(log_timestamp) DEFAULT_FAILURE_STAMP_FORMAT,
- MEMBER(syslog_facility) "mail",
- MEMBER(version_ignore) FALSE,
- MEMBER(shutdown_clients) TRUE
+ .log_path = "",
+ .info_log_path = "",
+ .debug_log_path = "",
+ .log_timestamp = DEFAULT_FAILURE_STAMP_FORMAT,
+ .syslog_facility = "mail",
+ .version_ignore = FALSE,
+ .shutdown_clients = TRUE
};
const struct setting_parser_info master_service_setting_parser_info = {
- MEMBER(module_name) "master",
- MEMBER(defines) master_service_setting_defines,
- MEMBER(defaults) &master_service_default_settings,
+ .module_name = "master",
+ .defines = master_service_setting_defines,
+ .defaults = &master_service_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct master_service_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct master_service_settings),
- MEMBER(parent_offset) (size_t)-1
+ .parent_offset = (size_t)-1
};
static void ATTR_NORETURN
};
static const struct setting_parser_info strlist_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) NULL,
- MEMBER(defaults) NULL,
+ .module_name = NULL,
+ .defines = NULL,
+ .defaults = NULL,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) 0,
+ .type_offset = (size_t)-1,
+ .struct_size = 0,
- MEMBER(parent_offset) (size_t)-1
+ .parent_offset = (size_t)-1
};
static void
struct sql_db driver_mysql_db = {
"mysql",
- MEMBER(v) {
+ .v = {
driver_mysql_init_v,
driver_mysql_deinit_v,
driver_mysql_get_flags,
};
struct sql_result driver_mysql_result = {
- MEMBER(v) {
+ .v = {
driver_mysql_result_free,
driver_mysql_result_next_row,
driver_mysql_result_get_fields_count,
}
struct sql_result driver_mysql_error_result = {
- MEMBER(v) {
+ .v = {
driver_mysql_result_free,
driver_mysql_result_error_next_row,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
struct sql_db driver_pgsql_db = {
"pgsql",
- MEMBER(v) {
+ .v = {
driver_pgsql_init_v,
driver_pgsql_deinit_v,
driver_pgsql_get_flags,
};
struct sql_result driver_pgsql_result = {
- MEMBER(v) {
+ .v = {
driver_pgsql_result_free,
driver_pgsql_result_next_row,
driver_pgsql_result_get_fields_count,
struct sql_db driver_sqlite_db = {
"sqlite",
- MEMBER(v) {
+ .v = {
driver_sqlite_init_v,
driver_sqlite_deinit_v,
driver_sqlite_get_flags,
};
struct sql_result driver_sqlite_result = {
- MEMBER(v) {
+ .v = {
driver_sqlite_result_free,
driver_sqlite_result_next_row,
driver_sqlite_result_get_fields_count,
}
struct sql_result driver_sqlite_error_result = {
- MEMBER(v) {
+ .v = {
driver_sqlite_result_free,
driver_sqlite_result_error_next_row,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
}
struct sql_result sql_not_connected_result = {
- MEMBER(v) {
+ .v = {
sql_result_not_connected_free,
sql_result_not_connected_next_row,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
}
struct mail_storage cydir_storage = {
- MEMBER(name) CYDIR_STORAGE_NAME,
- MEMBER(class_flags) 0,
+ .name = CYDIR_STORAGE_NAME,
+ .class_flags = 0,
- {
+ .v = {
NULL,
cydir_storage_alloc,
NULL,
};
struct mailbox cydir_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
};
static const struct mdbox_settings mdbox_default_settings = {
- MEMBER(mdbox_rotate_size) 2*1024*1024,
- MEMBER(mdbox_rotate_min_size) 16*1024,
- MEMBER(mdbox_rotate_days) 0,
- MEMBER(mdbox_max_open_files) 64,
- MEMBER(mdbox_purge_min_percentage) 0
+ .mdbox_rotate_size = 2*1024*1024,
+ .mdbox_rotate_min_size = 16*1024,
+ .mdbox_rotate_days = 0,
+ .mdbox_max_open_files = 64,
+ .mdbox_purge_min_percentage = 0
};
static const struct setting_parser_info mdbox_setting_parser_info = {
- MEMBER(module_name) "mdbox",
- MEMBER(defines) mdbox_setting_defines,
- MEMBER(defaults) &mdbox_default_settings,
+ .module_name = "mdbox",
+ .defines = mdbox_setting_defines,
+ .defaults = &mdbox_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct mdbox_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct mdbox_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &mail_user_setting_parser_info,
+ .parent_offset = (size_t)-1,
+ .parent = &mail_user_setting_parser_info,
- MEMBER(check_func) mdbox_settings_verify
+ .check_func = mdbox_settings_verify
};
/* <settings checks> */
}
struct mail_storage mdbox_storage = {
- MEMBER(name) MDBOX_STORAGE_NAME,
- MEMBER(class_flags) MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT,
+ .name = MDBOX_STORAGE_NAME,
+ .class_flags = MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT,
- {
+ .v = {
mdbox_get_setting_parser_info,
mdbox_storage_alloc,
mdbox_storage_create,
};
struct mailbox mdbox_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
}
struct mail_storage dbox_storage = {
- MEMBER(name) SDBOX_STORAGE_NAME,
- MEMBER(class_flags) 0,
+ .name = SDBOX_STORAGE_NAME,
+ .class_flags = 0,
- {
+ .v = {
NULL,
sdbox_storage_alloc,
NULL,
};
struct mailbox sdbox_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
};
static const struct maildir_settings maildir_default_settings = {
- MEMBER(maildir_stat_dirs) FALSE,
- MEMBER(maildir_copy_with_hardlinks) TRUE,
- MEMBER(maildir_copy_preserve_filename) FALSE,
- MEMBER(maildir_very_dirty_syncs) FALSE
+ .maildir_stat_dirs = FALSE,
+ .maildir_copy_with_hardlinks = TRUE,
+ .maildir_copy_preserve_filename = FALSE,
+ .maildir_very_dirty_syncs = FALSE
};
static const struct setting_parser_info maildir_setting_parser_info = {
- MEMBER(module_name) "maildir",
- MEMBER(defines) maildir_setting_defines,
- MEMBER(defaults) &maildir_default_settings,
+ .module_name = "maildir",
+ .defines = maildir_setting_defines,
+ .defaults = &maildir_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct maildir_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct maildir_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &mail_user_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &mail_user_setting_parser_info
};
const struct setting_parser_info *maildir_get_setting_parser_info(void)
}
struct mail_storage maildir_storage = {
- MEMBER(name) MAILDIR_STORAGE_NAME,
- MEMBER(class_flags) 0,
+ .name = MAILDIR_STORAGE_NAME,
+ .class_flags = 0,
- {
+ .v = {
maildir_get_setting_parser_info,
maildir_storage_alloc,
maildir_storage_create,
};
struct mailbox maildir_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
};
static const struct mbox_settings mbox_default_settings = {
- MEMBER(mbox_read_locks) "fcntl",
- MEMBER(mbox_write_locks) "dotlock fcntl",
- MEMBER(mbox_lock_timeout) 5*60,
- MEMBER(mbox_dotlock_change_timeout) 2*60,
- MEMBER(mbox_min_index_size) 0,
- MEMBER(mbox_dirty_syncs) TRUE,
- MEMBER(mbox_very_dirty_syncs) FALSE,
- MEMBER(mbox_lazy_writes) TRUE
+ .mbox_read_locks = "fcntl",
+ .mbox_write_locks = "dotlock fcntl",
+ .mbox_lock_timeout = 5*60,
+ .mbox_dotlock_change_timeout = 2*60,
+ .mbox_min_index_size = 0,
+ .mbox_dirty_syncs = TRUE,
+ .mbox_very_dirty_syncs = FALSE,
+ .mbox_lazy_writes = TRUE
};
static const struct setting_parser_info mbox_setting_parser_info = {
- MEMBER(module_name) "mbox",
- MEMBER(defines) mbox_setting_defines,
- MEMBER(defaults) &mbox_default_settings,
+ .module_name = "mbox",
+ .defines = mbox_setting_defines,
+ .defaults = &mbox_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct mbox_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct mbox_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &mail_user_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &mail_user_setting_parser_info
};
const struct setting_parser_info *mbox_get_setting_parser_info(void)
}
struct mail_storage mbox_storage = {
- MEMBER(name) MBOX_STORAGE_NAME,
- MEMBER(class_flags) MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE,
+ .name = MBOX_STORAGE_NAME,
+ .class_flags = MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE,
- {
+ .v = {
mbox_get_setting_parser_info,
mbox_storage_alloc,
mbox_storage_create,
};
struct mailbox mbox_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
}
struct mail_storage raw_storage = {
- MEMBER(name) RAW_STORAGE_NAME,
- MEMBER(class_flags) MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE,
+ .name = RAW_STORAGE_NAME,
+ .class_flags = MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE,
- {
+ .v = {
NULL,
raw_storage_alloc,
NULL,
};
struct mailbox raw_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
}
struct mailbox_list shared_mailbox_list = {
- MEMBER(name) "shared",
- MEMBER(hierarchy_sep) '/',
- MEMBER(props) 0,
- MEMBER(mailbox_name_max_length) PATH_MAX,
+ .name = "shared",
+ .hierarchy_sep = '/',
+ .props = 0,
+ .mailbox_name_max_length = PATH_MAX,
{
shared_list_alloc,
}
struct mail_storage shared_storage = {
- MEMBER(name) SHARED_STORAGE_NAME,
- MEMBER(class_flags) 0, /* unknown at this point */
+ .name = SHARED_STORAGE_NAME,
+ .class_flags = 0, /* unknown at this point */
- {
+ .v = {
NULL,
shared_storage_alloc,
shared_storage_create,
}
struct mailbox_list fs_mailbox_list = {
- MEMBER(name) MAILBOX_LIST_NAME_FS,
- MEMBER(hierarchy_sep) '/',
- MEMBER(props) 0,
- MEMBER(mailbox_name_max_length) PATH_MAX,
+ .name = MAILBOX_LIST_NAME_FS,
+ .hierarchy_sep = '/',
+ .props = 0,
+ .mailbox_name_max_length = PATH_MAX,
{
fs_list_alloc,
}
struct mailbox_list maildir_mailbox_list = {
- MEMBER(name) MAILBOX_LIST_NAME_MAILDIRPLUSPLUS,
- MEMBER(hierarchy_sep) '.',
- MEMBER(props) MAILBOX_LIST_PROP_NO_MAILDIR_NAME,
- MEMBER(mailbox_name_max_length) PATH_MAX,
+ .name = MAILBOX_LIST_NAME_MAILDIRPLUSPLUS,
+ .hierarchy_sep = '.',
+ .props = MAILBOX_LIST_PROP_NO_MAILDIR_NAME,
+ .mailbox_name_max_length = PATH_MAX,
{
maildir_list_alloc,
};
struct mailbox_list imapdir_mailbox_list = {
- MEMBER(name) MAILBOX_LIST_NAME_IMAPDIR,
- MEMBER(hierarchy_sep) '.',
- MEMBER(props) MAILBOX_LIST_PROP_NO_MAILDIR_NAME,
- MEMBER(mailbox_name_max_length) PATH_MAX,
+ .name = MAILBOX_LIST_NAME_IMAPDIR,
+ .hierarchy_sep = '.',
+ .props = MAILBOX_LIST_PROP_NO_MAILDIR_NAME,
+ .mailbox_name_max_length = PATH_MAX,
{
imapdir_list_alloc,
};
const struct mail_storage_settings mail_storage_default_settings = {
- MEMBER(mail_location) "",
- MEMBER(mail_cache_fields) "flags",
- MEMBER(mail_never_cache_fields) "imap.envelope",
- MEMBER(mail_cache_min_mail_count) 0,
- MEMBER(mailbox_idle_check_interval) 30,
- MEMBER(mail_max_keyword_length) 50,
- MEMBER(mail_save_crlf) FALSE,
- MEMBER(fsync_disable) FALSE,
- MEMBER(mmap_disable) FALSE,
- MEMBER(dotlock_use_excl) FALSE,
- MEMBER(mail_nfs_storage) FALSE,
- MEMBER(mail_nfs_index) FALSE,
- MEMBER(mailbox_list_index_disable) FALSE,
- MEMBER(mail_debug) FALSE,
- MEMBER(mail_full_filesystem_access) FALSE,
- MEMBER(lock_method) "fcntl:flock:dotlock",
- MEMBER(pop3_uidl_format) "%08Xu%08Xv"
+ .mail_location = "",
+ .mail_cache_fields = "flags",
+ .mail_never_cache_fields = "imap.envelope",
+ .mail_cache_min_mail_count = 0,
+ .mailbox_idle_check_interval = 30,
+ .mail_max_keyword_length = 50,
+ .mail_save_crlf = FALSE,
+ .fsync_disable = FALSE,
+ .mmap_disable = FALSE,
+ .dotlock_use_excl = FALSE,
+ .mail_nfs_storage = FALSE,
+ .mail_nfs_index = FALSE,
+ .mailbox_list_index_disable = FALSE,
+ .mail_debug = FALSE,
+ .mail_full_filesystem_access = FALSE,
+ .lock_method = "fcntl:flock:dotlock",
+ .pop3_uidl_format = "%08Xu%08Xv"
};
const struct setting_parser_info mail_storage_setting_parser_info = {
- MEMBER(module_name) "mail",
- MEMBER(defines) mail_storage_setting_defines,
- MEMBER(defaults) &mail_storage_default_settings,
+ .module_name = "mail",
+ .defines = mail_storage_setting_defines,
+ .defaults = &mail_storage_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct mail_storage_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct mail_storage_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &mail_user_setting_parser_info,
+ .parent_offset = (size_t)-1,
+ .parent = &mail_user_setting_parser_info,
- MEMBER(check_func) mail_storage_settings_check
+ .check_func = mail_storage_settings_check
};
#undef DEF
};
const struct mail_namespace_settings mail_namespace_default_settings = {
- MEMBER(type) "private:shared:public",
- MEMBER(separator) "",
- MEMBER(prefix) "",
- MEMBER(location) "",
- MEMBER(alias_for) NULL,
-
- MEMBER(inbox) FALSE,
- MEMBER(hidden) FALSE,
- MEMBER(list) "yes:no:children",
- MEMBER(subscriptions) TRUE
+ .type = "private:shared:public",
+ .separator = "",
+ .prefix = "",
+ .location = "",
+ .alias_for = NULL,
+
+ .inbox = FALSE,
+ .hidden = FALSE,
+ .list = "yes:no:children",
+ .subscriptions = TRUE
};
const struct setting_parser_info mail_namespace_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) mail_namespace_setting_defines,
- MEMBER(defaults) &mail_namespace_default_settings,
+ .defines = mail_namespace_setting_defines,
+ .defaults = &mail_namespace_default_settings,
- MEMBER(type_offset) offsetof(struct mail_namespace_settings, prefix),
- MEMBER(struct_size) sizeof(struct mail_namespace_settings),
+ .type_offset = offsetof(struct mail_namespace_settings, prefix),
+ .struct_size = sizeof(struct mail_namespace_settings),
- MEMBER(parent_offset) offsetof(struct mail_namespace_settings, user_set),
- MEMBER(parent) &mail_user_setting_parser_info,
+ .parent_offset = offsetof(struct mail_namespace_settings, user_set),
+ .parent = &mail_user_setting_parser_info,
- MEMBER(check_func) namespace_settings_check
+ .check_func = namespace_settings_check
};
#undef DEF
};
static const struct mail_user_settings mail_user_default_settings = {
- MEMBER(base_dir) PKG_RUNDIR,
- MEMBER(auth_socket_path) "auth-userdb",
+ .base_dir = PKG_RUNDIR,
+ .auth_socket_path = "auth-userdb",
- MEMBER(mail_uid) "",
- MEMBER(mail_gid) "",
- MEMBER(mail_home) "",
- MEMBER(mail_chroot) "",
- MEMBER(mail_access_groups) "",
- MEMBER(mail_privileged_group) "",
- MEMBER(valid_chroot_dirs) "",
+ .mail_uid = "",
+ .mail_gid = "",
+ .mail_home = "",
+ .mail_chroot = "",
+ .mail_access_groups = "",
+ .mail_privileged_group = "",
+ .valid_chroot_dirs = "",
- MEMBER(first_valid_uid) 500,
- MEMBER(last_valid_uid) 0,
- MEMBER(first_valid_gid) 1,
- MEMBER(last_valid_gid) 0,
+ .first_valid_uid = 500,
+ .last_valid_uid = 0,
+ .first_valid_gid = 1,
+ .last_valid_gid = 0,
- MEMBER(mail_plugins) "",
- MEMBER(mail_plugin_dir) MODULEDIR,
+ .mail_plugins = "",
+ .mail_plugin_dir = MODULEDIR,
- MEMBER(mail_log_prefix) "%s(%u): ",
+ .mail_log_prefix = "%s(%u): ",
- MEMBER(namespaces) ARRAY_INIT,
- MEMBER(plugin_envs) ARRAY_INIT
+ .namespaces = ARRAY_INIT,
+ .plugin_envs = ARRAY_INIT
};
const struct setting_parser_info mail_user_setting_parser_info = {
- MEMBER(module_name) "mail",
- MEMBER(defines) mail_user_setting_defines,
- MEMBER(defaults) &mail_user_default_settings,
+ .module_name = "mail",
+ .defines = mail_user_setting_defines,
+ .defaults = &mail_user_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct mail_user_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct mail_user_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) mail_user_settings_check
+ .check_func = mail_user_settings_check
};
const void *
}
struct mail_storage test_storage = {
- MEMBER(name) "test",
- MEMBER(class_flags) 0,
+ .name = "test",
+ .class_flags = 0,
- {
+ .v = {
NULL,
test_storage_alloc,
NULL,
}
struct mailbox test_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
test_mailbox_is_readonly,
test_mailbox_allow_new_keywords,
test_mailbox_enable,
# define ATTR_COLD
#endif
-/* C99-style struct member definitions */
-#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L && \
- !defined(_HPUX_SOURCE)) || __GNUC__ > 2
-# define MEMBER(name) .name =
-#else
-# define MEMBER(name)
-#endif
-
/* Macros to provide type safety for callback functions' context parameters */
#ifdef __GNUC__
# define CONTEXT_TYPE_SAFETY
};
static const struct pool static_alloconly_pool = {
- MEMBER(v) &static_alloconly_pool_vfuncs,
+ .v = &static_alloconly_pool_vfuncs,
- MEMBER(alloconly_pool) TRUE,
- MEMBER(datastack_pool) FALSE
+ .alloconly_pool = TRUE,
+ .datastack_pool = FALSE
};
#ifdef DEBUG
};
static const struct pool static_data_stack_pool = {
- MEMBER(v) &static_data_stack_pool_vfuncs,
+ .v = &static_data_stack_pool_vfuncs,
- MEMBER(alloconly_pool) TRUE,
- MEMBER(datastack_pool) TRUE
+ .alloconly_pool = TRUE,
+ .datastack_pool = TRUE
};
struct datastack_pool {
};
static struct pool static_system_clean_pool = {
- MEMBER(v) &static_system_clean_pool_vfuncs,
+ .v = &static_system_clean_pool_vfuncs,
- MEMBER(alloconly_pool) FALSE,
- MEMBER(datastack_pool) FALSE
+ .alloconly_pool = FALSE,
+ .datastack_pool = FALSE
};
pool_t system_clean_pool = &static_system_clean_pool;
};
struct pool static_system_pool = {
- MEMBER(v) &static_system_pool_vfuncs,
+ .v = &static_system_pool_vfuncs,
- MEMBER(alloconly_pool) FALSE,
- MEMBER(datastack_pool) FALSE
+ .alloconly_pool = FALSE,
+ .datastack_pool = FALSE
};
pool_t system_pool = &static_system_pool;
};
static struct pool static_unsafe_data_stack_pool = {
- MEMBER(v) &static_unsafe_data_stack_pool_vfuncs,
+ .v = &static_unsafe_data_stack_pool_vfuncs,
- MEMBER(alloconly_pool) TRUE,
- MEMBER(datastack_pool) TRUE
+ .alloconly_pool = TRUE,
+ .datastack_pool = TRUE
};
pool_t unsafe_data_stack_pool = &static_unsafe_data_stack_pool;
/* </settings checks> */
struct service_settings lmtp_login_service_settings = {
- MEMBER(name) "lmtp",
- MEMBER(protocol) "lmtp",
- MEMBER(type) "",
- MEMBER(executable) "lmtp",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) 0,
-
- MEMBER(unix_listeners) { { &lmtp_login_unix_listeners_buf,
- sizeof(lmtp_login_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "lmtp",
+ .protocol = "lmtp",
+ .type = "",
+ .executable = "lmtp",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = 0,
+
+ .unix_listeners = { { &lmtp_login_unix_listeners_buf,
+ sizeof(lmtp_login_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
static const struct lmtp_settings lmtp_default_settings = {
- MEMBER(lmtp_proxy) FALSE
+ .lmtp_proxy = FALSE
};
static const struct setting_parser_info *lmtp_setting_dependencies[] = {
};
const struct setting_parser_info lmtp_setting_parser_info = {
- MEMBER(module_name) "lmtp",
- MEMBER(defines) lmtp_setting_defines,
- MEMBER(defaults) &lmtp_default_settings,
+ .module_name = "lmtp",
+ .defines = lmtp_setting_defines,
+ .defaults = &lmtp_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct lmtp_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct lmtp_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) NULL,
- MEMBER(dependencies) lmtp_setting_dependencies
+ .dependencies = lmtp_setting_dependencies
};
void lmtp_settings_dup(pool_t pool, const struct lmtp_settings **lmtp_set_r,
#include <stddef.h>
struct service_settings log_service_settings = {
- MEMBER(name) "log",
- MEMBER(protocol) "",
- MEMBER(type) "log",
- MEMBER(executable) "log",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
+ .name = "log",
+ .protocol = "",
+ .type = "log",
+ .executable = "log",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
- MEMBER(drop_priv_before_exec) FALSE,
+ .drop_priv_before_exec = FALSE,
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 1,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
+ .process_min_avail = 0,
+ .process_limit = 1,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
- MEMBER(unix_listeners) ARRAY_INIT,
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .unix_listeners = ARRAY_INIT,
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
};
static const struct login_settings login_default_settings = {
- MEMBER(login_trusted_networks) "",
- MEMBER(login_greeting) PACKAGE_NAME" ready.",
- MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c",
- MEMBER(login_log_format) "%$: %s",
-
- MEMBER(ssl) "yes:no:required",
- MEMBER(ssl_ca_file) "",
- MEMBER(ssl_cert) "",
- MEMBER(ssl_key) "",
- MEMBER(ssl_key_password) "",
- MEMBER(ssl_parameters_file) "ssl-parameters.dat",
- MEMBER(ssl_cipher_list) "ALL:!LOW:!SSLv2:!EXP:!aNULL",
- MEMBER(ssl_cert_username_field) "commonName",
- MEMBER(ssl_verify_client_cert) FALSE,
- MEMBER(ssl_require_client_cert) FALSE,
- MEMBER(ssl_username_from_cert) FALSE,
- MEMBER(verbose_ssl) FALSE,
-
- MEMBER(disable_plaintext_auth) TRUE,
- MEMBER(verbose_auth) FALSE,
- MEMBER(auth_debug) FALSE,
- MEMBER(verbose_proctitle) FALSE,
-
- MEMBER(mail_max_userip_connections) 10
+ .login_trusted_networks = "",
+ .login_greeting = PACKAGE_NAME" ready.",
+ .login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l %c",
+ .login_log_format = "%$: %s",
+
+ .ssl = "yes:no:required",
+ .ssl_ca_file = "",
+ .ssl_cert = "",
+ .ssl_key = "",
+ .ssl_key_password = "",
+ .ssl_parameters_file = "ssl-parameters.dat",
+ .ssl_cipher_list = "ALL:!LOW:!SSLv2:!EXP:!aNULL",
+ .ssl_cert_username_field = "commonName",
+ .ssl_verify_client_cert = FALSE,
+ .ssl_require_client_cert = FALSE,
+ .ssl_username_from_cert = FALSE,
+ .verbose_ssl = FALSE,
+
+ .disable_plaintext_auth = TRUE,
+ .verbose_auth = FALSE,
+ .auth_debug = FALSE,
+ .verbose_proctitle = FALSE,
+
+ .mail_max_userip_connections = 10
};
const struct setting_parser_info login_setting_parser_info = {
- MEMBER(module_name) "login",
- MEMBER(defines) login_setting_defines,
- MEMBER(defaults) &login_default_settings,
+ .module_name = "login",
+ .defines = login_setting_defines,
+ .defaults = &login_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct login_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct login_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) login_settings_check
+ .check_func = login_settings_check
};
static const struct setting_parser_info *default_login_set_roots[] = {
};
static const struct file_listener_settings file_listener_default_settings = {
- MEMBER(path) "",
- MEMBER(mode) 0600,
- MEMBER(user) "",
- MEMBER(group) "",
+ .path = "",
+ .mode = 0600,
+ .user = "",
+ .group = "",
};
static const struct setting_parser_info file_listener_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) file_listener_setting_defines,
- MEMBER(defaults) &file_listener_default_settings,
+ .defines = file_listener_setting_defines,
+ .defaults = &file_listener_default_settings,
- MEMBER(type_offset) offsetof(struct file_listener_settings, path),
- MEMBER(struct_size) sizeof(struct file_listener_settings),
+ .type_offset = offsetof(struct file_listener_settings, path),
+ .struct_size = sizeof(struct file_listener_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &service_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &service_setting_parser_info
};
#undef DEF
};
static const struct inet_listener_settings inet_listener_default_settings = {
- MEMBER(address) "",
- MEMBER(port) 0,
- MEMBER(ssl) FALSE
+ .address = "",
+ .port = 0,
+ .ssl = FALSE
};
static const struct setting_parser_info inet_listener_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) inet_listener_setting_defines,
- MEMBER(defaults) &inet_listener_default_settings,
+ .defines = inet_listener_setting_defines,
+ .defaults = &inet_listener_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct inet_listener_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct inet_listener_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) &service_setting_parser_info
+ .parent_offset = (size_t)-1,
+ .parent = &service_setting_parser_info
};
#undef DEF
};
static const struct service_settings service_default_settings = {
- MEMBER(name) "",
- MEMBER(protocol) "",
- MEMBER(type) "",
- MEMBER(executable) "",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) -1U,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) (uoff_t)-1,
-
- MEMBER(unix_listeners) ARRAY_INIT,
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "",
+ .protocol = "",
+ .type = "",
+ .executable = "",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = -1U,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = (uoff_t)-1,
+
+ .unix_listeners = ARRAY_INIT,
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
const struct setting_parser_info service_setting_parser_info = {
- MEMBER(module_name) NULL,
- MEMBER(defines) service_setting_defines,
- MEMBER(defaults) &service_default_settings,
+ .defines = service_setting_defines,
+ .defaults = &service_default_settings,
- MEMBER(type_offset) offsetof(struct service_settings, name),
- MEMBER(struct_size) sizeof(struct service_settings),
+ .type_offset = offsetof(struct service_settings, name),
+ .struct_size = sizeof(struct service_settings),
- MEMBER(parent_offset) offsetof(struct service_settings, master_set),
- MEMBER(parent) &master_setting_parser_info
+ .parent_offset = offsetof(struct service_settings, master_set),
+ .parent = &master_setting_parser_info
};
#undef DEF
};
static const struct master_settings master_default_settings = {
- MEMBER(base_dir) PKG_RUNDIR,
- MEMBER(libexec_dir) PKG_LIBEXECDIR,
- MEMBER(protocols) "imap pop3 lmtp",
- MEMBER(listen) "*, ::",
- MEMBER(ssl) "yes:no:required",
- MEMBER(default_process_limit) 100,
- MEMBER(default_client_limit) 1000,
- MEMBER(default_vsz_limit) 256*1024*1024,
-
- MEMBER(version_ignore) FALSE,
- MEMBER(mail_debug) FALSE,
- MEMBER(auth_debug) FALSE,
-
- MEMBER(first_valid_uid) 500,
- MEMBER(last_valid_uid) 0,
- MEMBER(first_valid_gid) 1,
- MEMBER(last_valid_gid) 0,
+ .base_dir = PKG_RUNDIR,
+ .libexec_dir = PKG_LIBEXECDIR,
+ .protocols = "imap pop3 lmtp",
+ .listen = "*, ::",
+ .ssl = "yes:no:required",
+ .default_process_limit = 100,
+ .default_client_limit = 1000,
+ .default_vsz_limit = 256*1024*1024,
+
+ .version_ignore = FALSE,
+ .mail_debug = FALSE,
+ .auth_debug = FALSE,
+
+ .first_valid_uid = 500,
+ .last_valid_uid = 0,
+ .first_valid_gid = 1,
+ .last_valid_gid = 0,
#ifndef CONFIG_BINARY
- MEMBER(services) ARRAY_INIT
+ .services = ARRAY_INIT
#else
- MEMBER(services) { { &config_all_services_buf,
+ .services = { { &config_all_services_buf,
sizeof(struct service_settings *) } },
#endif
};
const struct setting_parser_info master_setting_parser_info = {
- MEMBER(module_name) "master",
- MEMBER(defines) master_setting_defines,
- MEMBER(defaults) &master_default_settings,
+ .module_name = "master",
+ .defines = master_setting_defines,
+ .defaults = &master_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct master_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct master_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) master_settings_verify
+ .check_func = master_settings_verify
};
/* <settings checks> */
};
static struct dotlock_settings dotlock_set = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 30,
- MEMBER(stale_timeout) 120
+ .timeout = 30,
+ .stale_timeout = 120
};
static struct acl_backend *acl_backend_vfile_alloc(void)
#define CONVERT_LOCK_FILENAME ".dovecot.convert"
static struct dotlock_settings dotlock_settings = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 60*5,
- MEMBER(stale_timeout) 60*5
+ .timeout = 60*5,
+ .stale_timeout = 60*5
};
static const char *storage_error(struct mail_storage *storage)
}
struct fts_backend fts_backend_lucene = {
- MEMBER(name) "lucene",
- MEMBER(flags) 0,
+ .name = "lucene",
+ .flags = 0,
{
fts_backend_lucene_init,
}
struct fts_backend fts_backend_solr = {
- MEMBER(name) "solr",
- MEMBER(flags) FTS_BACKEND_FLAG_VIRTUAL_LOOKUPS,
+ .name = "solr",
+ .flags = FTS_BACKEND_FLAG_VIRTUAL_LOOKUPS,
{
fts_backend_solr_init,
}
struct fts_backend fts_backend_squat = {
- MEMBER(name) "squat",
- MEMBER(flags) FTS_BACKEND_FLAG_SUBSTRING_LOOKUPS,
+ .name = "squat",
+ .flags = FTS_BACKEND_FLAG_SUBSTRING_LOOKUPS,
{
fts_backend_squat_init,
extern struct quota_backend quota_backend_maildir;
static struct dotlock_settings dotlock_settings = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
-
- MEMBER(timeout) 0,
- MEMBER(stale_timeout) 30
+ .timeout = 0,
+ .stale_timeout = 30
};
static int maildir_sum_dir(const char *dir, uint64_t *total_bytes,
}
struct mail_storage virtual_storage = {
- MEMBER(name) VIRTUAL_STORAGE_NAME,
- MEMBER(class_flags) 0,
+ .name = VIRTUAL_STORAGE_NAME,
+ .class_flags = 0,
- {
+ .v = {
NULL,
virtual_storage_alloc,
NULL,
};
struct mailbox virtual_mailbox = {
- MEMBER(name) NULL,
- MEMBER(storage) NULL,
- MEMBER(list) NULL,
-
- {
+ .v = {
index_storage_is_readonly,
index_storage_allow_new_keywords,
index_storage_mailbox_enable,
#include <stddef.h>
struct service_settings pop3_login_service_settings = {
- MEMBER(name) "pop3-login",
- MEMBER(protocol) "pop3",
- MEMBER(type) "login",
- MEMBER(executable) "pop3-login",
- MEMBER(user) "dovecot",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "login",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 1,
- MEMBER(vsz_limit) 64,
-
- MEMBER(unix_listeners) ARRAY_INIT,
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "pop3-login",
+ .protocol = "pop3",
+ .type = "login",
+ .executable = "pop3-login",
+ .user = "dovecot",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "login",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 1,
+ .vsz_limit = 64,
+
+ .unix_listeners = ARRAY_INIT,
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
static const struct setting_define pop3_login_setting_defines[] = {
};
const struct setting_parser_info pop3_login_setting_parser_info = {
- MEMBER(module_name) "pop3-login",
- MEMBER(defines) pop3_login_setting_defines,
- MEMBER(defaults) NULL,
+ .module_name = "pop3-login",
+ .defines = pop3_login_setting_defines,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) 0,
+ .type_offset = (size_t)-1,
+ .parent_offset = (size_t)-1,
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
-
- MEMBER(check_func) NULL,
- MEMBER(dependencies) pop3_login_setting_dependencies
+ .dependencies = pop3_login_setting_dependencies
};
const struct setting_parser_info *pop3_login_setting_roots[] = {
/* </settings checks> */
struct service_settings pop3_service_settings = {
- MEMBER(name) "pop3",
- MEMBER(protocol) "pop3",
- MEMBER(type) "",
- MEMBER(executable) "pop3",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 1,
- MEMBER(vsz_limit) -1U,
-
- MEMBER(unix_listeners) { { &pop3_unix_listeners_buf,
- sizeof(pop3_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "pop3",
+ .protocol = "pop3",
+ .type = "",
+ .executable = "pop3",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 1,
+ .vsz_limit = -1U,
+
+ .unix_listeners = { { &pop3_unix_listeners_buf,
+ sizeof(pop3_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
static const struct pop3_settings pop3_default_settings = {
- MEMBER(mail_debug) FALSE,
- MEMBER(verbose_proctitle) FALSE,
-
- MEMBER(pop3_no_flag_updates) FALSE,
- MEMBER(pop3_enable_last) FALSE,
- MEMBER(pop3_reuse_xuidl) FALSE,
- MEMBER(pop3_save_uidl) FALSE,
- MEMBER(pop3_lock_session) FALSE,
- MEMBER(pop3_client_workarounds) "",
- MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s"
+ .mail_debug = FALSE,
+ .verbose_proctitle = FALSE,
+
+ .pop3_no_flag_updates = FALSE,
+ .pop3_enable_last = FALSE,
+ .pop3_reuse_xuidl = FALSE,
+ .pop3_save_uidl = FALSE,
+ .pop3_lock_session = FALSE,
+ .pop3_client_workarounds = "",
+ .pop3_logout_format = "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s"
};
static const struct setting_parser_info *pop3_setting_dependencies[] = {
};
const struct setting_parser_info pop3_setting_parser_info = {
- MEMBER(module_name) "pop3",
- MEMBER(defines) pop3_setting_defines,
- MEMBER(defaults) &pop3_default_settings,
+ .module_name = "pop3",
+ .defines = pop3_setting_defines,
+ .defaults = &pop3_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct pop3_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct pop3_settings),
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(parent) NULL,
+ .parent_offset = (size_t)-1,
- MEMBER(check_func) pop3_settings_verify,
- MEMBER(dependencies) pop3_setting_dependencies
+ .check_func = pop3_settings_verify,
+ .dependencies = pop3_setting_dependencies
};
/* <settings checks> */
/* </settings checks> */
struct service_settings ssl_params_service_settings = {
- MEMBER(name) "ssl-params",
- MEMBER(protocol) "",
- MEMBER(type) "",
- MEMBER(executable) "ssl-params",
- MEMBER(user) "",
- MEMBER(group) "",
- MEMBER(privileged_group) "",
- MEMBER(extra_groups) "",
- MEMBER(chroot) "",
-
- MEMBER(drop_priv_before_exec) FALSE,
-
- MEMBER(process_min_avail) 0,
- MEMBER(process_limit) 0,
- MEMBER(client_limit) 0,
- MEMBER(service_count) 0,
- MEMBER(vsz_limit) -1U,
-
- MEMBER(unix_listeners) { { &ssl_params_unix_listeners_buf,
- sizeof(ssl_params_unix_listeners[0]) } },
- MEMBER(fifo_listeners) ARRAY_INIT,
- MEMBER(inet_listeners) ARRAY_INIT
+ .name = "ssl-params",
+ .protocol = "",
+ .type = "",
+ .executable = "ssl-params",
+ .user = "",
+ .group = "",
+ .privileged_group = "",
+ .extra_groups = "",
+ .chroot = "",
+
+ .drop_priv_before_exec = FALSE,
+
+ .process_min_avail = 0,
+ .process_limit = 0,
+ .client_limit = 0,
+ .service_count = 0,
+ .vsz_limit = -1U,
+
+ .unix_listeners = { { &ssl_params_unix_listeners_buf,
+ sizeof(ssl_params_unix_listeners[0]) } },
+ .fifo_listeners = ARRAY_INIT,
+ .inet_listeners = ARRAY_INIT
};
#undef DEF
};
static const struct ssl_params_settings ssl_params_default_settings = {
- MEMBER(ssl_parameters_regenerate) 24*7
+ .ssl_parameters_regenerate = 24*7
};
const struct setting_parser_info ssl_params_setting_parser_info = {
- MEMBER(module_name) "ssl-params",
- MEMBER(defines) ssl_params_setting_defines,
- MEMBER(defaults) &ssl_params_default_settings,
+ .module_name = "ssl-params",
+ .defines = ssl_params_setting_defines,
+ .defaults = &ssl_params_default_settings,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct ssl_params_settings),
+ .type_offset = (size_t)-1,
+ .struct_size = sizeof(struct ssl_params_settings),
- MEMBER(parent_offset) (size_t)-1
+ .parent_offset = (size_t)-1
};
struct ssl_params_settings *
#include <signal.h>
static struct dotlock_settings dotlock_settings = {
- MEMBER(temp_prefix) NULL,
- MEMBER(lock_suffix) NULL,
- MEMBER(timeout) 0,
- MEMBER(stale_timeout) MAILDIR_UIDLIST_LOCK_STALE_TIMEOUT,
- MEMBER(use_excl_lock) FALSE,
- MEMBER(nfs_flush) FALSE,
- MEMBER(use_io_notify) TRUE
+ .stale_timeout = MAILDIR_UIDLIST_LOCK_STALE_TIMEOUT,
+ .use_io_notify = TRUE
};
static struct ioloop *ioloop;