1026
1046
.parent = &mail_user_setting_parser_info
1028
1048
/* ../../src/lib-settings/settings.c */
1029
/* ../../src/lib-master/master-service-settings.c */
1030
/* <settings checks> */
1032
master_service_settings_check(void *_set, pool_t pool ATTR_UNUSED,
1033
const char **error_r ATTR_UNUSED)
1035
struct master_service_settings *set = _set;
1037
if (*set->log_path == '\0') {
1038
/* default to syslog logging */
1039
set->log_path = "syslog";
1043
/* </settings checks> */
1045
#define DEF(type, name) \
1046
{ type, #name, offsetof(struct master_service_settings, name), NULL }
1047
static const struct setting_define master_service_setting_defines[] = {
1048
DEF(SET_STR, log_path),
1049
DEF(SET_STR, info_log_path),
1050
DEF(SET_STR, debug_log_path),
1051
DEF(SET_STR, log_timestamp),
1052
DEF(SET_STR, syslog_facility),
1053
DEF(SET_SIZE, config_cache_size),
1054
DEF(SET_BOOL, version_ignore),
1055
DEF(SET_BOOL, shutdown_clients),
1056
DEF(SET_BOOL, verbose_proctitle),
1058
SETTING_DEFINE_LIST_END
1060
static const struct master_service_settings master_service_default_settings = {
1061
.log_path = "syslog",
1062
.info_log_path = "",
1063
.debug_log_path = "",
1064
.log_timestamp = DEFAULT_FAILURE_STAMP_FORMAT,
1065
.syslog_facility = "mail",
1066
.config_cache_size = 1024*1024,
1067
.version_ignore = FALSE,
1068
.shutdown_clients = TRUE,
1069
.verbose_proctitle = FALSE
1071
const struct setting_parser_info master_service_setting_parser_info = {
1072
.module_name = "master",
1073
.defines = master_service_setting_defines,
1074
.defaults = &master_service_default_settings,
1076
.type_offset = (size_t)-1,
1077
.struct_size = sizeof(struct master_service_settings),
1079
.parent_offset = (size_t)-1,
1080
.check_func = master_service_settings_check
1082
1049
/* ../../src/lib-lda/lda-settings.c */
2470
2470
/* ../../src/login-common/login-settings.c */
2471
2471
/* <settings checks> */
2472
static int ssl_settings_check(void *_set ATTR_UNUSED, const char **error_r)
2474
struct login_settings *set = _set;
2477
*error_r = t_strdup_printf("SSL support not compiled in but ssl=%s",
2481
if (*set->ssl_cert == '\0') {
2482
*error_r = "ssl enabled, but ssl_cert not set";
2485
if (*set->ssl_key == '\0') {
2486
*error_r = "ssl enabled, but ssl_key not set";
2489
if (set->ssl_verify_client_cert && *set->ssl_ca == '\0') {
2490
*error_r = "ssl_verify_client_cert set, but ssl_ca not";
2497
static bool login_settings_check(void *_set, pool_t pool, const char **error_r)
2472
static bool login_settings_check(void *_set, pool_t pool,
2473
const char **error_r ATTR_UNUSED)
2499
2475
struct login_settings *set = _set;
2501
2477
set->log_format_elements_split =
2502
2478
p_strsplit(pool, set->login_log_format_elements, " ");
2504
if (set->auth_ssl_require_client_cert ||
2505
set->auth_ssl_username_from_cert) {
2506
/* if we require valid cert, make sure we also ask for it */
2507
set->ssl_verify_client_cert = TRUE;
2510
2480
if (set->auth_debug_passwords)
2511
2481
set->auth_debug = TRUE;
2512
2482
if (set->auth_debug)
2513
2483
set->auth_verbose = TRUE;
2515
if (strcmp(set->ssl, "no") == 0) {
2517
} else if (strcmp(set->ssl, "yes") == 0) {
2518
if (!ssl_settings_check(set, error_r))
2520
} else if (strcmp(set->ssl, "required") == 0) {
2521
if (!ssl_settings_check(set, error_r))
2523
set->disable_plaintext_auth = TRUE;
2525
*error_r = t_strdup_printf("Unknown ssl setting value: %s",
2531
2486
/* </settings checks> */
2540
2495
DEF(SET_STR, login_access_sockets),
2541
2496
DEF(SET_STR, director_username_hash),
2544
DEF(SET_STR, ssl_ca),
2545
DEF(SET_STR, ssl_cert),
2546
DEF(SET_STR, ssl_key),
2547
DEF(SET_STR, ssl_key_password),
2548
DEF(SET_STR, ssl_cipher_list),
2549
DEF(SET_STR, ssl_protocols),
2550
DEF(SET_STR, ssl_cert_username_field),
2551
2498
DEF(SET_STR, ssl_client_cert),
2552
2499
DEF(SET_STR, ssl_client_key),
2553
DEF(SET_STR, ssl_crypto_device),
2554
DEF(SET_BOOL, ssl_verify_client_cert),
2555
2500
DEF(SET_BOOL, ssl_require_crl),
2556
2501
DEF(SET_BOOL, auth_ssl_require_client_cert),
2557
2502
DEF(SET_BOOL, auth_ssl_username_from_cert),
2558
DEF(SET_BOOL, verbose_ssl),
2560
2504
DEF(SET_BOOL, disable_plaintext_auth),
2561
2505
DEF(SET_BOOL, auth_verbose),
2974
2915
.check_func = imap_settings_verify,
2975
2916
.dependencies = imap_setting_dependencies
2918
/* ../../src/imap-urlauth/imap-urlauth-worker-settings.c */
2919
/* <settings checks> */
2920
static struct file_listener_settings imap_urlauth_worker_unix_listeners_array[] = {
2921
{ "imap-urlauth-worker", 0600, "$default_internal_user", "" }
2923
static struct file_listener_settings *imap_urlauth_worker_unix_listeners[] = {
2924
&imap_urlauth_worker_unix_listeners_array[0]
2926
static buffer_t imap_urlauth_worker_unix_listeners_buf = {
2927
imap_urlauth_worker_unix_listeners, sizeof(imap_urlauth_worker_unix_listeners), { 0, }
2929
/* </settings checks> */
2930
struct service_settings imap_urlauth_worker_service_settings = {
2931
.name = "imap-urlauth-worker",
2934
.executable = "imap-urlauth-worker",
2937
.privileged_group = "",
2941
.drop_priv_before_exec = FALSE,
2943
.process_min_avail = 0,
2944
.process_limit = 1024,
2948
.vsz_limit = (uoff_t)-1,
2950
.unix_listeners = { { &imap_urlauth_worker_unix_listeners_buf,
2951
sizeof(imap_urlauth_worker_unix_listeners[0]) } },
2952
.fifo_listeners = ARRAY_INIT,
2953
.inet_listeners = ARRAY_INIT
2956
#define DEF(type, name) \
2957
{ type, #name, offsetof(struct imap_urlauth_worker_settings, name), NULL }
2958
static const struct setting_define imap_urlauth_worker_setting_defines[] = {
2959
DEF(SET_BOOL, verbose_proctitle),
2961
DEF(SET_STR, imap_urlauth_host),
2962
DEF(SET_UINT, imap_urlauth_port),
2964
SETTING_DEFINE_LIST_END
2966
const struct imap_urlauth_worker_settings imap_urlauth_worker_default_settings = {
2967
.verbose_proctitle = FALSE,
2969
.imap_urlauth_host = "",
2970
.imap_urlauth_port = 143
2972
static const struct setting_parser_info *imap_urlauth_worker_setting_dependencies[] = {
2973
&mail_user_setting_parser_info,
2976
const struct setting_parser_info imap_urlauth_worker_setting_parser_info = {
2977
.module_name = "imap-urlauth-worker",
2978
.defines = imap_urlauth_worker_setting_defines,
2979
.defaults = &imap_urlauth_worker_default_settings,
2981
.type_offset = (size_t)-1,
2982
.struct_size = sizeof(struct imap_urlauth_worker_settings),
2984
.parent_offset = (size_t)-1,
2986
.dependencies = imap_urlauth_worker_setting_dependencies
2988
/* ../../src/imap-urlauth/imap-urlauth-settings.c */
2989
/* <settings checks> */
2990
static struct file_listener_settings imap_urlauth_unix_listeners_array[] = {
2991
{ "token-login/imap-urlauth", 0666, "", "" }
2993
static struct file_listener_settings *imap_urlauth_unix_listeners[] = {
2994
&imap_urlauth_unix_listeners_array[0]
2996
static buffer_t imap_urlauth_unix_listeners_buf = {
2997
imap_urlauth_unix_listeners, sizeof(imap_urlauth_unix_listeners), { 0, }
2999
/* </settings checks> */
3000
struct service_settings imap_urlauth_service_settings = {
3001
.name = "imap-urlauth",
3004
.executable = "imap-urlauth",
3005
.user = "$default_internal_user",
3007
.privileged_group = "",
3011
.drop_priv_before_exec = FALSE,
3013
.process_min_avail = 0,
3014
.process_limit = 1024,
3018
.vsz_limit = (uoff_t)-1,
3020
.unix_listeners = { { &imap_urlauth_unix_listeners_buf,
3021
sizeof(imap_urlauth_unix_listeners[0]) } },
3022
.fifo_listeners = ARRAY_INIT,
3023
.inet_listeners = ARRAY_INIT
3026
#define DEF(type, name) \
3027
{ type, #name, offsetof(struct imap_urlauth_settings, name), NULL }
3028
static const struct setting_define imap_urlauth_setting_defines[] = {
3029
DEF(SET_STR, base_dir),
3031
DEF(SET_BOOL, mail_debug),
3033
DEF(SET_BOOL, verbose_proctitle),
3035
DEF(SET_STR, imap_urlauth_logout_format),
3036
DEF(SET_STR, imap_urlauth_submit_user),
3037
DEF(SET_STR, imap_urlauth_stream_user),
3039
SETTING_DEFINE_LIST_END
3041
const struct imap_urlauth_settings imap_urlauth_default_settings = {
3042
.base_dir = PKG_RUNDIR,
3043
.mail_debug = FALSE,
3045
.verbose_proctitle = FALSE,
3047
.imap_urlauth_logout_format = "in=%i out=%o",
3048
.imap_urlauth_submit_user = NULL,
3049
.imap_urlauth_stream_user = NULL
3051
static const struct setting_parser_info *imap_urlauth_setting_dependencies[] = {
3054
const struct setting_parser_info imap_urlauth_setting_parser_info = {
3055
.module_name = "imap-urlauth",
3056
.defines = imap_urlauth_setting_defines,
3057
.defaults = &imap_urlauth_default_settings,
3059
.type_offset = (size_t)-1,
3060
.struct_size = sizeof(struct imap_urlauth_settings),
3062
.parent_offset = (size_t)-1,
3064
.dependencies = imap_urlauth_setting_dependencies
3066
/* ../../src/imap-urlauth/imap-urlauth-login-settings.c */
3067
/* <settings checks> */
3068
static struct file_listener_settings
3069
imap_urlauth_login_unix_listeners_array[] = {
3070
{ "imap-urlauth", 0666, "", "" }
3072
static struct file_listener_settings *imap_urlauth_login_unix_listeners[] = {
3073
&imap_urlauth_login_unix_listeners_array[0]
3075
static buffer_t imap_urlauth_login_unix_listeners_buf = {
3076
imap_urlauth_login_unix_listeners,
3077
sizeof(imap_urlauth_login_unix_listeners), { 0, }
3079
/* </settings checks> */
3080
struct service_settings imap_urlauth_login_service_settings = {
3081
.name = "imap-urlauth-login",
3084
.executable = "imap-urlauth-login",
3085
.user = "$default_login_user",
3087
.privileged_group = "",
3089
.chroot = "token-login",
3091
.drop_priv_before_exec = FALSE,
3093
.process_min_avail = 0,
3098
.vsz_limit = (uoff_t)-1,
3100
.unix_listeners = { { &imap_urlauth_login_unix_listeners_buf,
3101
sizeof(imap_urlauth_login_unix_listeners[0]) } },
3102
.fifo_listeners = ARRAY_INIT,
3103
.inet_listeners = ARRAY_INIT
3105
static const struct setting_define imap_urlauth_login_setting_defines[] = {
3106
SETTING_DEFINE_LIST_END
3108
static const struct setting_parser_info *imap_urlauth_login_setting_dependencies[] = {
3109
&login_setting_parser_info,
3112
const struct setting_parser_info imap_urlauth_login_setting_parser_info = {
3113
.module_name = "imap-urlauth-login",
3114
.defines = imap_urlauth_login_setting_defines,
3116
.type_offset = (size_t)-1,
3117
.parent_offset = (size_t)-1,
3119
.dependencies = imap_urlauth_login_setting_dependencies
3121
const struct setting_parser_info *imap_urlauth_login_setting_roots[] = {
3122
&login_setting_parser_info,
3123
&imap_urlauth_login_setting_parser_info,
2977
3126
/* ../../src/imap-login/imap-login-settings.c */
2978
3127
/* <settings checks> */
2979
3128
static struct inet_listener_settings imap_login_inet_listeners_array[] = {
3108
3260
DEF(SET_STR, mail_plugin_dir),
3109
3261
DEF(SET_STR, doveadm_socket_path),
3110
3262
DEF(SET_UINT, doveadm_worker_count),
3111
DEF(SET_UINT, doveadm_proxy_port),
3263
DEF(SET_UINT, doveadm_port),
3264
{ SET_ALIAS, "doveadm_proxy_port", 0, NULL },
3112
3265
DEF(SET_STR, doveadm_password),
3113
3266
DEF(SET_STR, doveadm_allowed_commands),
3114
3267
DEF(SET_STR, dsync_alt_char),
3115
3268
DEF(SET_STR, dsync_remote_cmd),
3269
DEF(SET_STR, ssl_client_ca_dir),
3270
DEF(SET_STR, ssl_client_ca_file),
3117
3272
{ SET_STRLIST, "plugin", offsetof(struct doveadm_settings, plugin_envs), NULL },