46 intptr_t value,
struct Buffer *err)
48 const struct Slist *imap_auth_methods = (
const struct Slist *) value;
49 if (!imap_auth_methods || (imap_auth_methods->
count == 0))
73 {
"imap_check_subscribed",
DT_BOOL,
false, 0, NULL,
74 "(imap) When opening a mailbox, ask the server for a list of subscribed folders"
76 {
"imap_condstore",
DT_BOOL,
false, 0, NULL,
77 "(imap) Enable the CONDSTORE extension"
80 "(imap) List of allowed IMAP authentication methods (colon-separated)"
83 "(imap) Characters that denote separators in IMAP folders"
86 "(imap) Download headers in blocks of this size"
89 "(imap) Additional email headers to download when getting index"
91 {
"imap_idle",
DT_BOOL,
false, 0, NULL,
92 "(imap) Use the IMAP IDLE extension to check for new mail"
95 "(imap) Login name for the IMAP server (defaults to `$imap_user`)"
98 "(imap) External command to generate OAUTH refresh token"
101 "(imap) Password for the IMAP server"
104 "(imap) Number of IMAP commands that may be queued up"
106 {
"imap_rfc5161",
DT_BOOL,
true, 0, NULL,
107 "(imap) Use the IMAP ENABLE extension to select capabilities"
109 {
"imap_server_noise",
DT_BOOL,
true, 0, NULL,
110 "(imap) Display server warnings as error messages"
113 "(imap) Time to wait before polling an open IMAP connection"
115 {
"imap_list_subscribed",
DT_BOOL,
false, 0, NULL,
116 "(imap) When browsing a mailbox, only display subscribed folders"
118 {
"imap_passive",
DT_BOOL,
true, 0, NULL,
119 "(imap) Reuse an existing IMAP connection to check for new mail"
121 {
"imap_peek",
DT_BOOL,
true, 0, NULL,
122 "(imap) Don't mark messages as read when fetching them from the server"
125 "(imap) Maximum time to wait for a server response"
127 {
"imap_qresync",
DT_BOOL,
false, 0, NULL,
128 "(imap) Enable the QRESYNC extension"
130 {
"imap_send_id",
DT_BOOL,
false, 0, NULL,
131 "(imap) Send ID command when logging in"
134 "(imap) Username for the IMAP server"
137 {
"imap_keepalive",
DT_SYNONYM,
IP "imap_keep_alive",
IP "2023-05-31" },
138 {
"imap_servernoise",
DT_SYNONYM,
IP "imap_server_noise",
IP "2021-02-11" },
149 {
"imap_deflate",
DT_BOOL,
true, 0, NULL,
150 "(imap) Compress network traffic"
IMAP authenticator multiplexor.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
#define CSR_ERR_INVALID
Value hasn't been set.
#define CSR_SUCCESS
Action completed successfully.
static int imap_auth_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "imap_authenticators" config variable - Implements ConfigDef::validator() -.
bool config_init_imap(struct ConfigSet *cs)
Register imap config variables - Implements module_init_config_t -.
bool imap_auth_is_valid(const char *authenticator)
Check if string is a valid imap authentication method.
static struct ConfigDef ImapVars[]
Config definitions for the IMAP library.
static struct ConfigDef ImapVarsZlib[]
Config definitions for IMAP compression.
Convenience wrapper for the library headers.
#define STAILQ_FOREACH(var, head, field)
bool sasl_auth_validator(const char *authenticator)
Validate an auth method against Cyrus SASL methods.
String manipulation buffer.
const char * name
User-visible name.
Container for lots of config items.
struct ListHead head
List containing values.
size_t count
Number of values in list.
#define D_SLIST_SEP_COLON
Slist items are colon-separated.
#define D_STRING_COMMAND
A command.
@ DT_SLIST
a list of strings
@ DT_SYNONYM
synonym for another variable
#define D_SENSITIVE
Contains sensitive value, e.g. password.
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.