bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainenstatic bool lmtp_settings_check(void *_set, pool_t pool, const char **error_r);
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen/* <settings checks> */
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainenstatic struct file_listener_settings lmtp_unix_listeners_array[] = {
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainenstatic struct file_listener_settings *lmtp_unix_listeners[] = {
da7f1a07f583df8905684a7b78469960afd7c78dPhil Carmody lmtp_unix_listeners, sizeof(lmtp_unix_listeners), { NULL, }
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen/* </settings checks> */
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainenstruct service_settings lmtp_service_settings = {
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainen .unix_listeners = { { &lmtp_unix_listeners_buf,
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainen { type, #name, offsetof(struct lmtp_settings, name), NULL }
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainenstatic const struct setting_define lmtp_setting_defines[] = {
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainenstatic const struct lmtp_settings lmtp_default_settings = {
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen .lmtp_hdr_delivery_address = "final:none:original",
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainenstatic const struct setting_parser_info *lmtp_setting_dependencies[] = {
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainenconst struct setting_parser_info lmtp_setting_parser_info = {
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen/* <settings checks> */
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainenstatic bool lmtp_settings_check(void *_set, pool_t pool ATTR_UNUSED,
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen const char **error_r)
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen if (strcmp(set->lmtp_hdr_delivery_address, "none") == 0) {
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen } else if (strcmp(set->lmtp_hdr_delivery_address, "final") == 0) {
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen } else if (strcmp(set->lmtp_hdr_delivery_address, "original") == 0) {
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen *error_r = t_strdup_printf("Unknown lmtp_hdr_delivery_address: %s",
1ac7b6969120bfdb15497663229f0dd168ae4ab8Timo Sirainen/* </settings checks> */
5d03d9f439e41c90215a3c938ffebe4c2a8ae257Timo Sirainenvoid lmtp_settings_dup(const struct setting_parser_context *set_parser,
32b78da5dfbbf6a06b3dbdc9278c60b55714f9bcTimo Sirainen sets = master_service_settings_parser_get_others(master_service,
0f72f253d5a117dad2f28b2ce336190a5e6b79c8Stephan Bosch *lda_set_r = settings_dup(&lda_setting_parser_info, sets[2], pool);