master-settings.h revision a540926a125bf91fde6813413d8cf07922eed3d7
7cb128dc4cae2a03a742f63ba7afee23c78e3af0Phil Carmody#ifndef MASTER_SETTINGS_H
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen#define MASTER_SETTINGS_H
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen#include "network.h"
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
b87761f9bbef949f31dae297e619ac3f5e9c2b2eTimo Sirainenenum mail_protocol {
b87761f9bbef949f31dae297e619ac3f5e9c2b2eTimo Sirainen MAIL_PROTOCOL_ANY,
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen MAIL_PROTOCOL_IMAP,
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen MAIL_PROTOCOL_POP3,
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen MAIL_PROTOCOL_LDA
0371406d952fe51367c7be91703e5634b7d9d225Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainenstruct listener {
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen struct ip_addr ip;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen unsigned int port;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen int fd;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool wanted;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo SirainenARRAY_DEFINE_TYPE(listener, struct listener);
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
22627da0fb77c1d0d9a8e8bc485ef5540b6f2e69Timo Sirainenstruct settings {
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen struct server_settings *server;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen enum mail_protocol protocol;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen /* common */
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *base_dir;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *log_path;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *info_log_path;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *log_timestamp;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen const char *syslog_facility;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen /* general */
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen const char *protocols;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *listen;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *ssl_listen;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool ssl_disable;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *ssl_ca_file;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen const char *ssl_cert_file;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen const char *ssl_key_file;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen const char *ssl_key_password;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen unsigned int ssl_parameters_regenerate;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen const char *ssl_cipher_list;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *ssl_cert_username_field;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool ssl_verify_client_cert;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool disable_plaintext_auth;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool verbose_ssl;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool shutdown_clients;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool nfs_check;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool version_ignore;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen /* login */
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *login_dir;
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen const char *login_executable;
1ac19c5c2b66a12f5598792aad15114ee3eb62e2Timo Sirainen const char *login_user;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *login_greeting;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *login_log_format_elements;
68f0dfb4b2815ecbc1bd8d8a68adcfd577ec55aeTimo Sirainen const char *login_log_format;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool login_process_per_connection;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool login_chroot;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen bool login_greeting_capability;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen
9c2b0eb659540b9db8dd3a8a6a2515921fbe8eebTimo Sirainen unsigned int login_process_size;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen unsigned int login_processes_count;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen unsigned int login_max_processes_count;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen unsigned int login_max_connections;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen
892b3cbf0eba9ba455448adcf71864a409345c6dTimo Sirainen /* mail */
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen const char *valid_chroot_dirs;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen const char *mail_chroot;
f4c0b1874b0533bcf2df1d28d584ff02cfdae3faTimo Sirainen unsigned int max_mail_processes;
f4c0b1874b0533bcf2df1d28d584ff02cfdae3faTimo Sirainen unsigned int mail_max_userip_connections;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen bool verbose_proctitle;
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen
dc9de21d4375faeedbe5b7e941502ac578650da9Timo Sirainen unsigned int first_valid_uid, last_valid_uid;
0db5b158a00c08955bdacc99b1e2cd1ec07f4311Timo Sirainen unsigned int first_valid_gid, last_valid_gid;
0db5b158a00c08955bdacc99b1e2cd1ec07f4311Timo Sirainen const char *mail_extra_groups;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *mail_access_groups;
d16b506f5540e3407d256bda35624b38a5ecf88fTimo Sirainen const char *mail_privileged_group;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *mail_uid;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen const char *mail_gid;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen
554c1c792dc6fce1e25c74555c2da786bffde75fTimo Sirainen const char *mail_location;
554c1c792dc6fce1e25c74555c2da786bffde75fTimo Sirainen const char *mail_cache_fields;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen const char *mail_never_cache_fields;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen unsigned int mail_cache_min_mail_count;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen unsigned int mailbox_idle_check_interval;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool mail_debug;
6df2db16b3920346ed07cefb86e8bdcb7e1faec5Timo Sirainen bool mail_full_filesystem_access;
6df2db16b3920346ed07cefb86e8bdcb7e1faec5Timo Sirainen unsigned int mail_max_keyword_length;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool mail_save_crlf;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool mmap_disable;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool dotlock_use_excl;
35f3b7e05afecacd0332c210c6e253911c2813d8Timo Sirainen bool fsync_disable;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool mail_nfs_storage;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool mail_nfs_index;
35f3b7e05afecacd0332c210c6e253911c2813d8Timo Sirainen bool mailbox_list_index_disable;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen const char *lock_method;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool maildir_stat_dirs;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen bool maildir_copy_with_hardlinks;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen bool maildir_copy_preserve_filename;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen const char *mbox_read_locks;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen const char *mbox_write_locks;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen unsigned int mbox_lock_timeout;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen unsigned int mbox_dotlock_change_timeout;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen unsigned int mbox_min_index_size;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen bool mbox_dirty_syncs;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool mbox_very_dirty_syncs;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool mbox_lazy_writes;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int dbox_rotate_size;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen unsigned int dbox_rotate_min_size;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int dbox_rotate_days;
407caeb5d0c8a6b158e2caef48dd909011d40340Timo Sirainen unsigned int umask;
407caeb5d0c8a6b158e2caef48dd909011d40340Timo Sirainen bool mail_drop_priv_before_exec;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *mail_executable;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int mail_process_size;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *mail_plugins;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *mail_plugin_dir;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *mail_log_prefix;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen unsigned int mail_log_max_lines_per_sec;
a54fa00087ba926a3d966a8449d8d7579e89911cTimo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen /* imap */
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen unsigned int imap_max_line_length;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *imap_capability;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *imap_client_workarounds;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *imap_logout_format;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen /* pop3 */
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool pop3_no_flag_updates;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool pop3_enable_last;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool pop3_reuse_xuidl;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool pop3_lock_session;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *pop3_uidl_format;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *pop3_client_workarounds;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *pop3_logout_format;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen /* dict */
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *dict_db_config;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen /* .. */
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen ARRAY_TYPE(listener) listens;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen ARRAY_TYPE(listener) ssl_listens;
2cfe9983ce7a6280636ee12beccc2e865111967bTimo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen uid_t login_uid, mail_uid_t;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen gid_t mail_gid_t, mail_priv_gid_t;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *imap_generated_capability;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen ARRAY_DEFINE(plugin_envs, const char *);
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainenstruct socket_settings {
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *path;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int mode;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *user;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *group;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int used:1;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainenstruct auth_socket_settings {
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen struct auth_settings *parent;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen struct auth_socket_settings *next;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *type;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen struct socket_settings master;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen struct socket_settings client;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainenstruct auth_passdb_settings {
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen struct auth_settings *parent;
f6e301cb2060c4367d8145e2bf5d553ba87ceb34Timo Sirainen struct auth_passdb_settings *next;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *driver;
d16b506f5540e3407d256bda35624b38a5ecf88fTimo Sirainen const char *args;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool deny;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen bool pass;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool master;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen};
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainenstruct auth_userdb_settings {
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct auth_settings *parent;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct auth_userdb_settings *next;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *driver;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *args;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen};
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainenstruct auth_settings {
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct server_settings *parent;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct auth_settings *next;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *name;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *mechanisms;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *realms;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *default_realm;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int cache_size;
a0b89f3b1df99b3a32f44623f13ad1893118825bTimo Sirainen unsigned int cache_ttl;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int cache_negative_ttl;
a0b89f3b1df99b3a32f44623f13ad1893118825bTimo Sirainen const char *executable;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen const char *user;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen const char *chroot;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *username_chars;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *username_translation;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *username_format;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen const char *master_user_separator;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen const char *anonymous_username;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen const char *krb5_keytab;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen const char *gssapi_hostname;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen const char *winbind_helper_path;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen unsigned int failure_delay;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen bool verbose, debug, debug_passwords;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool ssl_require_client_cert;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen bool ssl_username_from_cert;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen bool ntlm_use_winbind;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int count;
a0b89f3b1df99b3a32f44623f13ad1893118825bTimo Sirainen unsigned int worker_max_count;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int worker_max_request_count;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen unsigned int process_size;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen /* .. */
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen uid_t uid;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen gid_t gid;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen struct auth_passdb_settings *passdbs;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen struct auth_userdb_settings *userdbs;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen struct auth_socket_settings *sockets;
a99b64f7d63812806ee40c2e8a347343fa3b84a7Timo Sirainen};
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainenstruct namespace_settings {
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct server_settings *parent;
5fbf8719b9ef072295c16bc4492f9f0ece92117dTimo Sirainen struct namespace_settings *next;
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *type;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *separator;
1d132fe27d010b73aacc605b4c6257b0079f9e97Timo Sirainen const char *prefix;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen const char *location;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen bool inbox;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool hidden;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool list;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen bool subscriptions;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen};
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainenstruct server_settings {
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct server_settings *next;
af98c413eebe0c8c49fbe785fc34915c92ebe8c1Timo Sirainen
af98c413eebe0c8c49fbe785fc34915c92ebe8c1Timo Sirainen const char *name;
af98c413eebe0c8c49fbe785fc34915c92ebe8c1Timo Sirainen struct settings *defaults;
af98c413eebe0c8c49fbe785fc34915c92ebe8c1Timo Sirainen struct settings *imap;
9349a0afffad990e45d3ad33081e1d2d9e68a753Timo Sirainen struct settings *pop3;
4c9c55e15f35474f53f11659e796c63b1c34e884Timo Sirainen struct auth_settings *auths;
6b2738c39a868ff9291867138c55029fc40cf105Timo Sirainen struct auth_settings auth_defaults;
4c9c55e15f35474f53f11659e796c63b1c34e884Timo Sirainen struct namespace_settings *namespaces;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen ARRAY_DEFINE(dicts, const char *);
a94936bafd127680184da114c6a177b37ff656e5Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen gid_t login_gid;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen unsigned int warned_mail_extra_groups:1;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen};
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainenextern struct server_settings *settings_root;
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0Timo Sirainen
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainenbool master_settings_read(const char *path, bool nochecks, bool nofixes);
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainenvoid master_settings_dump(struct server_settings *set, bool nondefaults);
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainenvoid master_settings_init(void);
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainenvoid master_settings_deinit(void);
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen#endif
ab1b9a793d57a60c230a41f65f1a25d52c026233Timo Sirainen