44 intptr_t value,
struct Buffer *err)
46 const struct Slist *imap_auth_methods = (
const struct Slist *) value;
47 if (!imap_auth_methods || (imap_auth_methods->
count == 0))
71 {
"imap_check_subscribed",
DT_BOOL,
false, 0, NULL,
72 "(imap) When opening a mailbox, ask the server for a list of subscribed folders"
74 {
"imap_condstore",
DT_BOOL,
false, 0, NULL,
75 "(imap) Enable the CONDSTORE extension"
78 "(imap) List of allowed IMAP authentication methods (colon-separated)"
81 "(imap) Characters that denote separators in IMAP folders"
84 "(imap) Download headers in blocks of this size"
87 "(imap) Additional email headers to download when getting index"
89 {
"imap_idle",
DT_BOOL,
false, 0, NULL,
90 "(imap) Use the IMAP IDLE extension to check for new mail"
93 "(imap) Login name for the IMAP server (defaults to `$imap_user`)"
96 "(imap) External command to generate OAUTH refresh token"
99 "(imap) Password for the IMAP server"
102 "(imap) Number of IMAP commands that may be queued up"
104 {
"imap_rfc5161",
DT_BOOL,
true, 0, NULL,
105 "(imap) Use the IMAP ENABLE extension to select capabilities"
107 {
"imap_server_noise",
DT_BOOL,
true, 0, NULL,
108 "(imap) Display server warnings as error messages"
111 "(imap) Time to wait before polling an open IMAP connection"
113 {
"imap_list_subscribed",
DT_BOOL,
false, 0, NULL,
114 "(imap) When browsing a mailbox, only display subscribed folders"
116 {
"imap_passive",
DT_BOOL,
true, 0, NULL,
117 "(imap) Reuse an existing IMAP connection to check for new mail"
119 {
"imap_peek",
DT_BOOL,
true, 0, NULL,
120 "(imap) Don't mark messages as read when fetching them from the server"
123 "(imap) Maximum time to wait for a server response"
125 {
"imap_qresync",
DT_BOOL,
false, 0, NULL,
126 "(imap) Enable the QRESYNC extension"
128 {
"imap_send_id",
DT_BOOL,
false, 0, NULL,
129 "(imap) Send ID command when logging in"
132 "(imap) Username for the IMAP server"
135 {
"imap_servernoise",
DT_SYNONYM,
IP "imap_server_noise",
IP "2021-02-11" },
146 {
"imap_deflate",
DT_BOOL,
true, 0, NULL,
147 "(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[], uint32_t flags)
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 DT_SLIST
a list of strings
#define DT_LONG
a number (long)
#define DT_BOOL
boolean option
#define DT_STRING
a string
#define DT_COMMAND
A command.
#define R_INDEX
Redraw the index menu (MENU_INDEX)
#define DT_SYNONYM
synonym for another variable
#define DT_NO_FLAGS
No flags are set.
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
#define DT_SENSITIVE
Contains sensitive value, e.g. password.
#define DT_NUMBER
a number