#ifndef MAIL_STORAGE_SETTINGS_H
#define MAIL_STORAGE_SETTINGS_H
#include "file-lock.h"
#include "fsync-mode.h"
struct mail_user;
struct mail_namespace;
struct mail_storage;
struct message_address;
struct mail_storage_settings {
const char *mail_location;
const char *mail_attachment_fs;
const char *mail_attachment_dir;
const char *mail_attachment_hash;
const char *mail_attribute_dict;
unsigned int mail_prefetch_count;
const char *mail_cache_fields;
const char *mail_always_cache_fields;
const char *mail_never_cache_fields;
const char *mail_server_comment;
const char *mail_server_admin;
unsigned int mail_cache_min_mail_count;
unsigned int mail_cache_unaccessed_field_drop;
unsigned int mail_cache_compress_delete_percentage;
unsigned int mail_cache_compress_continued_percentage;
unsigned int mail_cache_compress_header_continue_count;
unsigned int mail_index_log_rotate_min_age;
unsigned int mail_index_log2_max_age;
unsigned int mailbox_idle_check_interval;
unsigned int mail_max_keyword_length;
unsigned int mail_max_lock_timeout;
unsigned int mail_temp_scan_interval;
unsigned int mail_vsize_bg_after_count;
unsigned int mail_sort_max_read_count;
bool mail_save_crlf;
const char *mail_fsync;
bool mmap_disable;
bool dotlock_use_excl;
bool mail_nfs_storage;
bool mail_nfs_index;
bool mailbox_list_index;
bool mail_debug;
bool maildir_stat_dirs;
const char *lock_method;
const char *pop3_uidl_format;
const char *postmaster_address;
const char *hostname;
const char *recipient_delimiter;
const char *ssl_client_ca_dir;
const char *ssl_client_ca_file;
const char *ssl_crypto_device;
const char *mail_attachment_detection_options;
/* May be NULL - use mail_storage_get_postmaster_address() instead of
directly accessing this. */
const char *const *parsed_mail_attachment_content_type_filter;
};
struct mail_namespace_settings {
const char *name;
const char *type;
const char *separator;
const char *prefix;
const char *location;
const char *alias_for;
bool inbox;
bool hidden;
const char *list;
bool subscriptions;
bool ignore_on_failure;
bool disabled;
unsigned int order;
};
/* <settings checks> */
/* </settings checks> */
struct mailbox_settings {
const char *name;
const char *autocreate;
const char *special_use;
const char *driver;
const char *comment;
unsigned int autoexpunge;
unsigned int autoexpunge_max_mails;
};
struct mail_user_settings {
const char *base_dir;
const char *auth_socket_path;
const char *mail_temp_dir;
const char *mail_uid;
const char *mail_gid;
const char *mail_home;
const char *mail_chroot;
const char *mail_access_groups;
const char *mail_privileged_group;
const char *valid_chroot_dirs;
const char *mail_plugins;
const char *mail_plugin_dir;
const char *mail_log_prefix;
};
extern const struct setting_parser_info mail_user_setting_parser_info;
extern const struct setting_parser_info mail_namespace_setting_parser_info;
extern const struct setting_parser_info mail_storage_setting_parser_info;
extern const struct mail_namespace_settings mail_namespace_default_settings;
extern const struct mailbox_settings mailbox_default_settings;
const void *
const struct mail_user_settings *set,
const char *driver);
const struct mail_storage_settings *
/* Get storage-specific settings, which may be namespace-specific. */
struct mail_storage *storage);
const struct dynamic_settings_parser *
const struct message_address **address_r,
const char **error_r);
#endif