Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
212 KB
Referenced Files
None
Subscribers
None
diff --git a/imap/jmap_api.h b/imap/jmap_api.h
index 044b78988..77d597c5b 100644
--- a/imap/jmap_api.h
+++ b/imap/jmap_api.h
@@ -1,586 +1,587 @@
/* http_api.h -- Routines for handling JMAP API requests
*
* Copyright (c) 1994-2019 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any legal
* details, please contact
* Carnegie Mellon University
* Center for Technology Transfer and Enterprise Creation
* 4615 Forbes Avenue
* Suite 302
* Pittsburgh, PA 15213
* (412) 268-7393, fax: (412) 268-7395
* innovation@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef JMAP_API_H
#define JMAP_API_H
#include "acl.h"
#include "auth.h"
#include "conversations.h"
#include "dav_db.h"
#include "hash.h"
#include "jmap_util.h"
#include "json_support.h"
#include "mailbox.h"
#include "mboxname.h"
#include "msgrecord.h"
#include "ptrarray.h"
#include "strarray.h"
#define JMAP_URN_CORE "urn:ietf:params:jmap:core"
#define JMAP_URN_MAIL "urn:ietf:params:jmap:mail"
#define JMAP_URN_SUBMISSION "urn:ietf:params:jmap:submission"
#define JMAP_URN_VACATION "urn:ietf:params:jmap:vacationresponse"
#define JMAP_URN_WEBSOCKET "urn:ietf:params:jmap:websocket"
#define JMAP_URN_MDN "urn:ietf:params:jmap:mdn"
#define JMAP_BLOB_EXTENSION "https://cyrusimap.org/ns/jmap/blob"
#define JMAP_CONTACTS_EXTENSION "https://cyrusimap.org/ns/jmap/contacts"
#define JMAP_CALENDARS_EXTENSION "https://cyrusimap.org/ns/jmap/calendars"
#define JMAP_MAIL_EXTENSION "https://cyrusimap.org/ns/jmap/mail"
#define JMAP_PERFORMANCE_EXTENSION "https://cyrusimap.org/ns/jmap/performance"
#define JMAP_DEBUG_EXTENSION "https://cyrusimap.org/ns/jmap/debug"
#define JMAP_QUOTA_EXTENSION "https://cyrusimap.org/ns/jmap/quota"
#define JMAP_BACKUP_EXTENSION "https://cyrusimap.org/ns/jmap/backup"
#define JMAP_NOTES_EXTENSION "https://cyrusimap.org/ns/jmap/notes"
#define JMAP_SIEVE_EXTENSION "https://cyrusimap.org/ns/jmap/sieve"
#define JMAP_USERCOUNTERS_EXTENSION "https://cyrusimap.org/ns/jmap/usercounters"
enum {
MAX_SIZE_REQUEST = 0,
MAX_CALLS_IN_REQUEST,
MAX_CONCURRENT_REQUESTS,
MAX_OBJECTS_IN_GET,
MAX_OBJECTS_IN_SET,
MAX_SIZE_UPLOAD,
MAX_CONCURRENT_UPLOAD,
MAX_SIZE_BLOB_SET,
+ MAX_CATENATE_ITEMS,
JMAP_NUM_LIMITS /* MUST be last */
};
/* JMAP Mail (RFC 8621) privileges */
#define JACL_READITEMS (ACL_READ|ACL_LOOKUP)
#define JACL_ADDITEMS ACL_INSERT
#define JACL_REMOVEITEMS (ACL_DELETEMSG|ACL_EXPUNGE)
#define JACL_SETSEEN ACL_SETSEEN
#define JACL_SETKEYWORDS ACL_WRITE
#define JACL_CREATECHILD ACL_CREATE
#define JACL_DELETE ACL_DELETEMBOX
#define JACL_RENAME (JACL_CREATECHILD|JACL_DELETE)
#define JACL_SUBMIT ACL_POST
/* JMAP Calendar (draft-ietf-jmap-calendars) privileges */
#define JACL_READFB ACL_USER9 /* Keep sync'd with DACL_READFB */
#define JACL_RSVP ACL_USER7 /* Keep sync'd with DACL_REPLY */
#define JACL_UPDATEPRIVATE
#define JACL_UPDATEOWN
#define JACL_UPDATEALL
#define JACL_REMOVEOWN
#define JACL_REMOVEALL
/* Cyrus-specific privileges */
#define JACL_LOOKUP ACL_LOOKUP
#define JACL_ADMIN ACL_ADMIN
#define JACL_SETPROPERTIES ACL_ANNOTATEMSG
#define JACL_UPDATEITEMS (JACL_ADDITEMS|JACL_REMOVEITEMS)
#define JACL_SETMETADATA (JACL_SETKEYWORDS|JACL_SETPROPERTIES)
#define JACL_WRITE (JACL_UPDATEITEMS|JACL_SETSEEN|JACL_SETMETADATA)
#define JACL_ALL (JACL_READITEMS|JACL_WRITE|JACL_RENAME|JACL_SUBMIT\
|JACL_ADMIN|JACL_READFB|JACL_RSVP)
typedef struct jmap_req {
const char *method;
const char *userid;
const char *accountid;
struct conversations_state *cstate;
struct auth_state *authstate;
json_t *args;
json_t *response;
const char *tag;
struct transaction_t *txn;
struct mboxname_counters counters;
double real_start;
double user_start;
double sys_start;
json_t *perf_details;
/* The JMAP request keeps its own cache of opened mailboxes,
* which can be used by calling jmap_openmbox. If the
* force_openmboxrw is set, this causes all following
* mailboxes to be opened read-writeable, irrespective if
* the caller asked for a read-only lock. This allows to
* prevent lock promotion conflicts, in case a cached mailbox
* was opened read-only by a helper but it now asked to be
* locked exclusively. Since the mailbox lock does not
* support lock promition, this would currently abort with
* an error. */
int force_openmbox_rw;
/* Internal state */
ptrarray_t *mboxes;
hash_table *mbstates;
hash_table *created_ids;
hash_table *inmemory_blobs;
hash_table *mbentry_byid;
ptrarray_t *method_calls;
const strarray_t *using_capabilities;
} jmap_req_t;
/* Fetch the contents of the blob identified by blobid,
* optionally returning a content type and an error string.
*
* If not NULL, accept_mime defines the requested MIME type,
* either defined in the Accept header or {type} URI template
* parameter.
*
* Return HTTP_OK if the blob has been found or any other
* HTTP status on error.
* Return zero if the next blob handler should be called.
*/
typedef struct {
const char *from_accountid; // input to the handler
const char *blobid; // input to the handler
const char *accept_mime; // input to the handler
unsigned decode : 1; // input to the handler
struct buf blob; // output from the handler
struct buf content_type; // output from the handler
struct buf encoding; // output from the handler
const char *errstr; // output from the handler
} jmap_getblob_context_t;
void jmap_getblob_ctx_init(jmap_getblob_context_t *ctx,
const char *from_accountid, const char *blobid,
const char *accept_mime, unsigned decode);
void jmap_getblob_ctx_reset(jmap_getblob_context_t *ctx);
void jmap_getblob_ctx_fini(jmap_getblob_context_t *ctx);
typedef int jmap_getblob_handler(jmap_req_t *req, jmap_getblob_context_t *ctx);
typedef struct {
hash_table methods;
json_t *server_capabilities;
long limits[JMAP_NUM_LIMITS];
// internal state
ptrarray_t getblob_handlers; // array of jmap_getblob_handler
ptrarray_t event_handlers; // array of (malloced) jmap_handlers
} jmap_settings_t;
enum jmap_handler_event {
JMAP_HANDLE_SHUTDOWN = (1 << 0), /* executed when httpd is shutdown. req is NULL */
JMAP_HANDLE_CLOSE_CONN = (1 << 1), /* executed when connection is closed. req is NULL */
JMAP_HANDLE_BEFORE_METHOD = (1 << 2) /* executed before each method call. req is set */
};
struct jmap_handler {
int eventmask;
void(*handler)(enum jmap_handler_event event, jmap_req_t* req, void *rock);
void *rock;
};
enum jmap_method_flags {
JMAP_READ_WRITE = (1 << 0), /* user can change state with this method */
JMAP_NEED_CSTATE = (1 << 1), /* conv.db is required for this method
(lock type determined by r/w flag) */
};
typedef struct {
const char *name;
const char *capability;
int (*proc)(struct jmap_req *req);
enum jmap_method_flags flags;
} jmap_method_t;
extern int jmap_error_response(struct transaction_t *txn,
long code, json_t **res);
extern int jmap_api(struct transaction_t *txn,
const json_t *jreq, json_t **res,
jmap_settings_t *settings);
extern int jmap_initreq(jmap_req_t *req);
extern void jmap_finireq(jmap_req_t *req);
extern int jmap_is_using(jmap_req_t *req, const char *capa);
/* Protocol implementations */
extern void jmap_core_init(jmap_settings_t *settings);
extern void jmap_mail_init(jmap_settings_t *settings);
extern void jmap_mdn_init(jmap_settings_t *settings);
extern void jmap_contact_init(jmap_settings_t *settings);
extern void jmap_calendar_init(jmap_settings_t *settings);
extern void jmap_vacation_init(jmap_settings_t *settings);
extern void jmap_backup_init(jmap_settings_t *settings);
extern void jmap_notes_init(jmap_settings_t *settings);
extern void jmap_sieve_init(jmap_settings_t *settings);
extern void jmap_core_capabilities(json_t *account_capabilities);
extern void jmap_mail_capabilities(json_t *account_capabilities, int mayCreateTopLevel);
extern void jmap_emailsubmission_capabilities(json_t *account_capabilities);
extern void jmap_mdn_capabilities(json_t *account_capabilities);
extern void jmap_vacation_capabilities(json_t *account_capabilities);
extern void jmap_contact_capabilities(json_t *account_capabilities);
extern void jmap_calendar_capabilities(json_t *account_capabilities);
extern void jmap_vacation_capabilities(json_t *account_capabilities);
extern void jmap_backup_capabilities(json_t *account_capabilities);
extern void jmap_notes_capabilities(json_t *account_capabilities);
extern void jmap_sieve_capabilities(json_t *account_capabilities);
extern void jmap_accounts(json_t *accounts, json_t *primary_accounts);
/* Request-scoped mailbox cache */
extern int jmap_openmbox(jmap_req_t *req, const char *name,
struct mailbox **mboxp, int rw);
extern int jmap_openmbox_by_uniqueid(jmap_req_t *req, const char *id,
struct mailbox **mboxp, int rw);
extern int jmap_isopenmbox(jmap_req_t *req, const char *name);
extern void jmap_closembox(jmap_req_t *req, struct mailbox **mboxp);
extern int jmap_mboxlist_lookup(const char *name,
mbentry_t **entryptr, struct txn **tid);
/* Adds a JMAP sub request to be processed after req has
* finished. Method must be a regular JMAP method name,
* args the JSON-encoded method arguments. If client_id
* is NULL, the subrequest will use the same client id
* as req. The args argument will be unreferenced after
* completion. */
extern void jmap_add_subreq(jmap_req_t *req, const char *method,
json_t *args, const char *client_id);
/* Creation ids */
extern const char *jmap_lookup_id(jmap_req_t *req, const char *creation_id);
extern const char *jmap_id_string_value(jmap_req_t *req, json_t *item);
extern void jmap_add_id(jmap_req_t *req, const char *creation_id, const char *id);
extern int jmap_is_valid_id(const char *id);
/* Request-scoped cache of mailbox rights for authenticated user */
extern int jmap_myrights_mbentry(jmap_req_t *req, const mbentry_t *mbentry);
extern int jmap_hasrights_mbentry(jmap_req_t *req, const mbentry_t *mbentry,
int rights);
extern int jmap_myrights(jmap_req_t *req, const char *mboxname);
extern int jmap_hasrights(jmap_req_t *req, const char *mboxname, int rights);
extern int jmap_myrights_mboxid(jmap_req_t *req, const char *mboxid);
extern int jmap_hasrights_mboxid(jmap_req_t *req, const char *mboxid, int rights);
extern void jmap_myrights_delete(jmap_req_t *req, const char *mboxname);
extern int jmap_mbtype(jmap_req_t *req, const char *mboxname);
/* Blob services */
extern int jmap_findblob(jmap_req_t *req, const char *accountid,
const char *blobid,
struct mailbox **mbox, msgrecord_t **mr,
struct body **body, const struct body **part,
struct buf *blob);
extern int jmap_findblob_exact(jmap_req_t *req, const char *accountid,
const char *blobid,
struct mailbox **mbox, msgrecord_t **mr,
struct buf *blob);
/* JMAP states */
extern json_t* jmap_getstate(jmap_req_t *req, int mbtype, int refresh);
extern json_t *jmap_fmtstate(modseq_t modseq);
extern int jmap_cmpstate(jmap_req_t *req, json_t *state, int mbtype);
extern modseq_t jmap_highestmodseq(jmap_req_t *req, int mbtype);
/* Helpers for DAV-based JMAP types */
extern char *jmap_xhref(const char *mboxname, const char *resource);
/* Patch-object support */
extern void jmap_ok(jmap_req_t *req, json_t *res);
extern void jmap_error(jmap_req_t *req, json_t *err);
extern int jmap_parse_strings(json_t *arg,
struct jmap_parser *parser, const char *prop);
typedef struct jmap_property {
const char *name;
const char *capability;
unsigned flags;
} jmap_property_t;
enum {
JMAP_PROP_SERVER_SET = (1<<0),
JMAP_PROP_IMMUTABLE = (1<<1),
JMAP_PROP_SKIP_GET = (1<<2), // skip in Foo/get if not requested by client
JMAP_PROP_ALWAYS_GET = (1<<3) // always include in Foo/get
};
extern const jmap_property_t *jmap_property_find(const char *name,
const jmap_property_t props[]);
/* Foo/get */
struct jmap_get {
/* Request arguments */
json_t *ids;
json_t *properties;
hash_table *props;
/* Response fields */
char *state;
json_t *list;
json_t *not_found;
};
typedef int jmap_args_parse_cb(jmap_req_t *, struct jmap_parser *,
const char *arg, json_t *val, void *);
extern void jmap_get_parse(jmap_req_t *req, struct jmap_parser *parser,
const jmap_property_t valid_props[],
int allow_null_ids,
jmap_args_parse_cb args_parse, void *args_rock,
struct jmap_get *get,
json_t **err);
extern void jmap_get_fini(struct jmap_get *get);
extern json_t *jmap_get_reply(struct jmap_get *get);
/* Foo/set */
struct jmap_set {
/* Request arguments */
const char *if_in_state;
json_t *create;
json_t *update;
json_t *destroy;
/* Response fields */
char *old_state;
char *new_state;
json_t *created;
json_t *updated;
json_t *destroyed;
json_t *not_created;
json_t *not_updated;
json_t *not_destroyed;
};
extern void jmap_set_parse(jmap_req_t *req, struct jmap_parser *parser,
const jmap_property_t valid_props[],
jmap_args_parse_cb args_parse, void *args_rock,
struct jmap_set *set, json_t **err);
extern void jmap_set_fini(struct jmap_set *set);
extern json_t *jmap_set_reply(struct jmap_set *set);
/* Foo/changes */
struct jmap_changes {
/* Request arguments */
modseq_t since_modseq;
size_t max_changes;
/* Response fields */
modseq_t new_modseq;
short has_more_changes;
json_t *created;
json_t *updated;
json_t *destroyed;
};
extern void jmap_changes_parse(jmap_req_t *req, struct jmap_parser *parser,
modseq_t minmodseq,
jmap_args_parse_cb args_parse, void *args_rock,
struct jmap_changes *changes, json_t **err);
extern void jmap_changes_fini(struct jmap_changes *changes);
extern json_t *jmap_changes_reply(struct jmap_changes *changes);
/* Foo/copy */
struct jmap_copy {
/* Request arguments */
const char *from_account_id;
json_t *create;
int blob_copy;
int on_success_destroy_original;
/* Response fields */
json_t *created;
json_t *not_created;
};
extern void jmap_copy_parse(jmap_req_t *req, struct jmap_parser *parser,
jmap_args_parse_cb args_parse, void *args_rock,
struct jmap_copy *copy, json_t **err);
extern void jmap_copy_fini(struct jmap_copy *copy);
extern json_t *jmap_copy_reply(struct jmap_copy *copy);
/* Foo/query */
struct jmap_query {
/* Request arguments */
json_t *filter;
json_t *sort;
ssize_t position;
const char *anchor;
ssize_t anchor_offset;
size_t limit;
int have_limit;
int calculate_total;
int sort_savedate;
/* Response fields */
char *query_state;
int can_calculate_changes;
size_t result_position;
size_t server_limit;
size_t total;
int have_total; /* for calculateTotal: false partial */
json_t *ids;
};
enum jmap_filter_op {
JMAP_FILTER_OP_NONE = 0,
JMAP_FILTER_OP_AND,
JMAP_FILTER_OP_OR,
JMAP_FILTER_OP_NOT
};
typedef struct jmap_filter {
enum jmap_filter_op op;
ptrarray_t conditions;
} jmap_filter;
typedef void* jmap_buildfilter_cb(json_t* arg);
typedef int jmap_filtermatch_cb(void* cond, void* rock);
typedef void jmap_filterfree_cb(void* cond);
extern jmap_filter *jmap_buildfilter(json_t *arg, jmap_buildfilter_cb *parse);
extern int jmap_filter_match(jmap_filter *f,
jmap_filtermatch_cb *match, void *rock);
extern void jmap_filter_free(jmap_filter *f, jmap_filterfree_cb *freecond);
typedef void jmap_filter_parse_cb(jmap_req_t *req, struct jmap_parser *parser,
json_t *filter, json_t *unsupported,
void *rock, json_t **err);
extern void jmap_filter_parse(jmap_req_t *req, struct jmap_parser *parser,
json_t *filter, json_t *unsupported,
jmap_filter_parse_cb parse_condition, void *cond_rock,
json_t **err /* fatal, non-parsing error */);
struct jmap_comparator {
const char *property;
short is_ascending;
const char *collation;
};
typedef int jmap_comparator_parse_cb(jmap_req_t *req, struct jmap_comparator *comp,
void *rock, json_t **err);
extern void jmap_comparator_parse(jmap_req_t *req, struct jmap_parser *parser,
json_t *jsort, json_t *unsupported,
jmap_comparator_parse_cb comp_cb, void *comp_rock,
json_t **err);
extern void jmap_query_parse(jmap_req_t *req, struct jmap_parser *parser,
jmap_args_parse_cb args_parse, void *args_rock,
jmap_filter_parse_cb filter_cb, void *filter_rock,
jmap_comparator_parse_cb comp_cb, void *comp_rock,
struct jmap_query *query, json_t **err);
extern void jmap_query_fini(struct jmap_query *query);
extern json_t *jmap_query_reply(struct jmap_query *query);
/* Foo/queryChanges */
struct jmap_querychanges {
/* Request arguments */
json_t *filter;
json_t *sort;
const char *since_querystate;
size_t max_changes;
const char *up_to_id;
int calculate_total;
/* Response fields */
char *new_querystate;
size_t total;
json_t *removed;
json_t *added;
};
extern void jmap_querychanges_parse(jmap_req_t *req,
struct jmap_parser *parser,
jmap_args_parse_cb args_parse, void *args_rock,
jmap_filter_parse_cb filter_cb, void *filter_rock,
jmap_comparator_parse_cb comp_cb, void *sort_rock,
struct jmap_querychanges *query,
json_t **err);
extern void jmap_querychanges_fini(struct jmap_querychanges *query);
extern json_t *jmap_querychanges_reply(struct jmap_querychanges *query);
/* Foo/parse */
struct jmap_parse {
/* Request arguments */
const json_t *blob_ids;
/* Response fields */
json_t *parsed;
json_t *not_parsable;
json_t *not_found;
};
extern void jmap_parse_parse(jmap_req_t *req, struct jmap_parser *parser,
jmap_args_parse_cb args_parse, void *args_rock,
struct jmap_parse *parse,
json_t **err);
extern void jmap_parse_fini(struct jmap_parse *parse);
extern json_t *jmap_parse_reply(struct jmap_parse *parse);
extern json_t *jmap_get_sharewith(const mbentry_t *mbentry);
extern int jmap_set_sharewith(struct mailbox *mbox,
json_t *shareWith, int overwrite);
extern void jmap_parse_sharewith_patch(json_t *arg, json_t **shareWith);
extern void jmap_mbentry_cache_free(jmap_req_t *req);
extern const mbentry_t *jmap_mbentry_by_uniqueid(jmap_req_t *req, const char *id);
extern mbentry_t *jmap_mbentry_by_uniqueid_copy(jmap_req_t *req, const char *id);
extern mbentry_t *jmap_mbentry_from_dav(jmap_req_t *req, struct dav_data *dav);
#endif /* JMAP_API_H */
diff --git a/imap/jmap_core.c b/imap/jmap_core.c
index d78692993..5fa65bbec 100644
--- a/imap/jmap_core.c
+++ b/imap/jmap_core.c
@@ -1,1498 +1,1499 @@
/* jmap_core.c -- Routines for handling JMAP Core requests
*
* Copyright (c) 1994-2019 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any legal
* details, please contact
* Carnegie Mellon University
* Center for Technology Transfer and Enterprise Creation
* 4615 Forbes Avenue
* Suite 302
* Pittsburgh, PA 15213
* (412) 268-7393, fax: (412) 268-7395
* innovation@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#include <config.h>
#include <errno.h>
#include <string.h>
#include <syslog.h>
#include "acl.h"
#include "append.h"
#include "caldav_db.h"
#include "carddav_db.h"
#include "http_jmap.h"
#include "times.h"
/* generated headers are not necessarily in current directory */
#include "imap/http_err.h"
#include "imap/imap_err.h"
#include "imap/jmap_err.h"
/* JMAP Core API Methods */
static int jmap_blob_copy(jmap_req_t *req);
static int jmap_core_echo(jmap_req_t *req);
/* JMAP extension methods */
static int jmap_blob_get(jmap_req_t *req);
static int jmap_blob_lookup(jmap_req_t *req);
static int jmap_blob_set(jmap_req_t *req);
static int jmap_quota_get(jmap_req_t *req);
static int jmap_usercounters_get(jmap_req_t *req);
static jmap_method_t jmap_core_methods_standard[] = {
{
"Blob/copy",
JMAP_URN_CORE,
&jmap_blob_copy,
JMAP_NEED_CSTATE | JMAP_READ_WRITE
},
{
"Core/echo",
JMAP_URN_CORE,
&jmap_core_echo,
0/*flags*/
},
{ NULL, NULL, NULL, 0}
};
static jmap_method_t jmap_core_methods_nonstandard[] = {
{
"Blob/get",
JMAP_BLOB_EXTENSION,
&jmap_blob_get,
JMAP_NEED_CSTATE
},
{
"Blob/lookup",
JMAP_BLOB_EXTENSION,
&jmap_blob_lookup,
JMAP_NEED_CSTATE
},
{
"Blob/set",
JMAP_BLOB_EXTENSION,
&jmap_blob_set,
JMAP_NEED_CSTATE | JMAP_READ_WRITE
},
{
"Quota/get",
JMAP_QUOTA_EXTENSION,
&jmap_quota_get,
JMAP_NEED_CSTATE
},
{
"UserCounters/get",
JMAP_USERCOUNTERS_EXTENSION,
&jmap_usercounters_get,
JMAP_NEED_CSTATE
},
{ NULL, NULL, NULL, 0}
};
HIDDEN void jmap_core_init(jmap_settings_t *settings)
{
#define _read_opt(val, optkey) \
val = config_getint(optkey); \
if (val <= 0) { \
syslog(LOG_ERR, "jmap: invalid property value: %s", \
imapopts[optkey].optname); \
val = 0; \
}
_read_opt(settings->limits[MAX_SIZE_UPLOAD],
IMAPOPT_JMAP_MAX_SIZE_UPLOAD);
settings->limits[MAX_SIZE_UPLOAD] *= 1024;
_read_opt(settings->limits[MAX_CONCURRENT_UPLOAD],
IMAPOPT_JMAP_MAX_CONCURRENT_UPLOAD);
_read_opt(settings->limits[MAX_SIZE_REQUEST],
IMAPOPT_JMAP_MAX_SIZE_REQUEST);
settings->limits[MAX_SIZE_REQUEST] *= 1024;
_read_opt(settings->limits[MAX_CONCURRENT_REQUESTS],
IMAPOPT_JMAP_MAX_CONCURRENT_REQUESTS);
_read_opt(settings->limits[MAX_CALLS_IN_REQUEST],
IMAPOPT_JMAP_MAX_CALLS_IN_REQUEST);
_read_opt(settings->limits[MAX_OBJECTS_IN_GET],
IMAPOPT_JMAP_MAX_OBJECTS_IN_GET);
_read_opt(settings->limits[MAX_OBJECTS_IN_SET],
IMAPOPT_JMAP_MAX_OBJECTS_IN_SET);
_read_opt(settings->limits[MAX_SIZE_BLOB_SET],
IMAPOPT_JMAP_MAX_SIZE_BLOB_SET);
+ _read_opt(settings->limits[MAX_CATENATE_ITEMS],
+ IMAPOPT_JMAP_MAX_CATENATE_ITEMS);
#undef _read_opt
json_object_set_new(settings->server_capabilities,
JMAP_URN_CORE,
json_pack("{s:i s:i s:i s:i s:i s:i s:i s:o}",
"maxSizeUpload",
settings->limits[MAX_SIZE_UPLOAD],
"maxConcurrentUpload",
settings->limits[MAX_CONCURRENT_UPLOAD],
"maxSizeRequest",
settings->limits[MAX_SIZE_REQUEST],
"maxConcurrentRequests",
settings->limits[MAX_CONCURRENT_REQUESTS],
"maxCallsInRequest",
settings->limits[MAX_CALLS_IN_REQUEST],
"maxObjectsInGet",
settings->limits[MAX_OBJECTS_IN_GET],
"maxObjectsInSet",
settings->limits[MAX_OBJECTS_IN_SET],
"collationAlgorithms", json_array()));
jmap_method_t *mp;
for (mp = jmap_core_methods_standard; mp->name; mp++) {
hash_insert(mp->name, mp, &settings->methods);
}
if (config_getswitch(IMAPOPT_JMAP_NONSTANDARD_EXTENSIONS)) {
json_object_set_new(settings->server_capabilities,
JMAP_QUOTA_EXTENSION, json_object());
json_object_set_new(settings->server_capabilities,
JMAP_PERFORMANCE_EXTENSION, json_object());
json_object_set_new(settings->server_capabilities,
JMAP_DEBUG_EXTENSION, json_object());
json_t *typenames = json_array();
// XXX - have a way to register these from each object? Would
// also need to register the lookup logic at the same time though
json_array_append_new(typenames, json_string("Mailbox"));
json_array_append_new(typenames, json_string("Thread"));
json_array_append_new(typenames, json_string("Email"));
json_object_set_new(settings->server_capabilities,
JMAP_BLOB_EXTENSION,
json_pack("{s:i, s:i, s:o}",
"maxSizeBlobSet",
settings->limits[MAX_SIZE_BLOB_SET],
"maxCatenateItems",
- 100,
+ settings->limits[MAX_CATENATE_ITEMS],
"supportedTypeNames",
typenames));
json_object_set_new(settings->server_capabilities,
JMAP_USERCOUNTERS_EXTENSION, json_object());
for (mp = jmap_core_methods_nonstandard; mp->name; mp++) {
hash_insert(mp->name, mp, &settings->methods);
}
}
}
HIDDEN void jmap_core_capabilities(json_t *account_capabilities)
{
json_object_set_new(account_capabilities,
JMAP_URN_CORE, json_object());
if (config_getswitch(IMAPOPT_JMAP_NONSTANDARD_EXTENSIONS)) {
json_object_set_new(account_capabilities,
JMAP_QUOTA_EXTENSION, json_object());
json_object_set_new(account_capabilities,
JMAP_PERFORMANCE_EXTENSION, json_object());
json_object_set_new(account_capabilities,
JMAP_DEBUG_EXTENSION, json_object());
json_object_set_new(account_capabilities,
JMAP_BLOB_EXTENSION, json_object());
json_object_set_new(account_capabilities,
JMAP_USERCOUNTERS_EXTENSION, json_object());
}
}
/*
* JMAP Core API Methods
*/
/* Core/echo method */
static int jmap_core_echo(jmap_req_t *req)
{
json_array_append_new(req->response,
json_pack("[s,O,s]", "Core/echo", req->args, req->tag));
return 0;
}
static int jmap_copyblob(jmap_req_t *req,
const char *blobid,
const char *from_accountid,
struct mailbox *to_mbox)
{
struct mailbox *mbox = NULL;
msgrecord_t *mr = NULL;
struct body *body = NULL;
const struct body *part = NULL;
struct buf msg_buf = BUF_INITIALIZER;
FILE *to_fp = NULL;
struct stagemsg *stage = NULL;
int r = jmap_findblob(req, from_accountid, blobid,
&mbox, &mr, &body, &part, &msg_buf);
if (r) return r;
/* Create staging file */
time_t internaldate = time(NULL);
if (!(to_fp = append_newstage(mailbox_name(to_mbox), internaldate, 0, &stage))) {
syslog(LOG_ERR, "jmap_copyblob(%s): append_newstage(%s) failed",
blobid, mailbox_name(mbox));
r = IMAP_INTERNAL;
goto done;
}
/* Copy blob. Keep the original MIME headers, we wouldn't really
* know which ones are safe to rewrite for arbitrary blobs. */
if (part) {
fwrite(buf_base(&msg_buf) + part->header_offset,
part->header_size + part->content_size, 1, to_fp);
}
else {
fwrite(buf_base(&msg_buf), buf_len(&msg_buf), 1, to_fp);
}
if (ferror(to_fp)) {
syslog(LOG_ERR, "jmap_copyblob(%s): tofp=%s: %s",
blobid, append_stagefname(stage), strerror(errno));
r = IMAP_IOERROR;
goto done;
}
fclose(to_fp);
to_fp = NULL;
/* Append blob to mailbox */
struct body *to_body = NULL;
struct appendstate as;
r = append_setup_mbox(&as, to_mbox, httpd_userid, httpd_authstate,
0, /*quota*/NULL, 0, 0, /*event*/0);
if (r) {
syslog(LOG_ERR, "jmap_copyblob(%s): append_setup_mbox: %s",
blobid, error_message(r));
goto done;
}
strarray_t flags = STRARRAY_INITIALIZER;
strarray_append(&flags, "\\Deleted");
strarray_append(&flags, "\\Expunged"); // custom flag to insta-expunge!
r = append_fromstage(&as, &to_body, stage, 0, internaldate, &flags, 0, NULL);
strarray_fini(&flags);
if (r) {
syslog(LOG_ERR, "jmap_copyblob(%s): append_fromstage: %s",
blobid, error_message(r));
append_abort(&as);
goto done;
}
message_free_body(to_body);
free(to_body);
r = append_commit(&as);
if (r) {
syslog(LOG_ERR, "jmap_copyblob(%s): append_commit: %s",
blobid, error_message(r));
goto done;
}
done:
if (stage) append_removestage(stage);
if (to_fp) fclose(to_fp);
buf_free(&msg_buf);
message_free_body(body);
free(body);
msgrecord_unref(&mr);
jmap_closembox(req, &mbox);
return r;
}
/* Blob/copy method */
static int jmap_blob_copy(jmap_req_t *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_copy copy;
json_t *val, *err = NULL;
size_t i = 0;
int r = 0;
struct mailbox *to_mbox = NULL;
/* Parse request */
jmap_copy_parse(req, &parser, NULL, NULL, &copy, &err);
if (err) {
jmap_error(req, err);
goto cleanup;
}
/* Check if we can upload to toAccountId */
r = jmap_open_upload_collection(req->accountid, &to_mbox);
if (r == IMAP_PERMISSION_DENIED) {
json_array_foreach(copy.create, i, val) {
json_object_set(copy.not_created, json_string_value(val),
json_pack("{s:s}", "type", "toAccountNotFound"));
}
goto done;
} else if (r) {
syslog(LOG_ERR, "jmap_blob_copy: jmap_create_upload_collection(%s): %s",
req->accountid, error_message(r));
goto cleanup;
}
/* Copy blobs one by one. XXX should we batch copy here? */
json_array_foreach(copy.create, i, val) {
const char *blobid = json_string_value(val);
r = jmap_copyblob(req, blobid, copy.from_account_id, to_mbox);
if (r == IMAP_NOTFOUND || r == IMAP_PERMISSION_DENIED) {
json_object_set_new(copy.not_created, blobid,
json_pack("{s:s}", "type", "blobNotFound"));
}
else if (r) goto cleanup;
else json_object_set_new(copy.created, blobid, json_string(blobid));
}
done:
/* Build response */
jmap_ok(req, jmap_copy_reply(&copy));
r = 0;
cleanup:
jmap_parser_fini(&parser);
jmap_copy_fini(&copy);
mailbox_close(&to_mbox);
return r;
}
/* Blob/get method */
struct getblob_rec {
const char *blob_id;
uint32_t uid;
char *part;
};
struct getblob_cb_rock {
jmap_req_t *req;
const char *blob_id;
hash_table *getblobs_by_uniqueid;
};
static int getblob_cb(const conv_guidrec_t* rec, void* vrock)
{
struct getblob_cb_rock *rock = vrock;
const char *uniqueid = conv_guidrec_uniqueid(rec);
if (!uniqueid) return 0;
struct getblob_rec *getblob = xzmalloc(sizeof(struct getblob_rec));
getblob->blob_id = rock->blob_id;
getblob->uid = rec->uid;
getblob->part = xstrdupnull(rec->part);
ptrarray_t *getblobs = hash_lookup(uniqueid, rock->getblobs_by_uniqueid);
if (!getblobs) {
getblobs = ptrarray_new();
hash_insert(uniqueid, getblobs, rock->getblobs_by_uniqueid);
}
ptrarray_append(getblobs, getblob);
return 0;
}
static const jmap_property_t blob_xprops[] = {
{
"data:asText",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE | JMAP_PROP_SKIP_GET
},
{
"data:asHex",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE | JMAP_PROP_SKIP_GET
},
{
"data:asBase64",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE | JMAP_PROP_SKIP_GET
},
{
"data",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE
},
{
"size",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE
},
{ NULL, NULL, 0 }
};
struct blob_range {
size_t offset;
size_t length;
};
static int _parse_range(jmap_req_t *req __attribute__((unused)),
struct jmap_parser *parser,
const char *key,
json_t *arg,
void *rock)
{
struct blob_range *rangep = rock;
if (!strcmp(key, "offset")) {
long long val = -1;
if (json_is_integer(arg)) val = json_integer_value(arg);
if (val < 0) jmap_parser_invalid(parser, "offset");
else rangep->offset = val;
return 1;
}
if (!strcmp(key, "length")) {
long long val = -1;
if (json_is_integer(arg)) val = json_integer_value(arg);
if (val <= 0) jmap_parser_invalid(parser, "length");
else rangep->length = val;
return 1;
}
return 0;
}
static int jmap_blob_get(jmap_req_t *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_get get;
json_t *err = NULL;
json_t *jval;
size_t i;
/* Parse request */
struct blob_range range = { 0, 0 };
jmap_get_parse(req, &parser, blob_xprops, /*allow_null_ids*/0,
&_parse_range, &range, &get, &err);
if (err) {
jmap_error(req, err);
goto done;
}
/* Lookup the content for each blob */
json_array_foreach(get.ids, i, jval) {
int is_truncated = 0;
- int is_nonutf8 = 0;
const char *blob_id = json_string_value(jval);
jmap_getblob_context_t ctx;
jmap_getblob_ctx_init(&ctx, req->accountid, blob_id, NULL, 1);
int r = jmap_getblob(req, &ctx);
if (r) {
json_array_append_new(get.not_found, json_string(blob_id));
}
else {
const char *base = buf_base(&ctx.blob);
size_t len = buf_len(&ctx.blob);
if (range.offset) {
if (range.offset < len) {
base += range.offset;
len -= range.offset;
}
else {
is_truncated = 1;
len = 0;
}
}
if (range.length) {
if (len >= range.length) len = range.length;
else is_truncated = 1;
}
json_t *item = json_object();
json_array_append_new(get.list, item);
json_object_set_new(item, "id", json_string(blob_id));
if (is_truncated)
json_object_set_new(item, "isTruncated", json_true());
// the various data types, only output them if there's data to send
int want_text = 0;
int want_base64 = 0;
if (jmap_wantprop(get.props, "data:asText")) want_text = 1;
if (jmap_wantprop(get.props, "data:asBase64")) want_base64 = 1;
if (jmap_wantprop(get.props, "data")) want_text = 2;
if (want_text) {
struct char_counts guess_counts = charset_count_validutf8(base, len);
if (!guess_counts.invalid && !guess_counts.replacement) {
json_object_set_new(item, "data:asText", json_stringn(base, len));
}
else {
json_object_set_new(item, "isEncodingProblem", json_true());
// if we asked for 'data' then the encoding problem means we get base64
if (want_text == 2) want_base64 = 1;
}
}
if (want_base64) {
if (len) {
size_t len64 = 0;
charset_encode_mimebody(NULL, len, NULL, &len64, NULL, 0 /* no wrap */);
char *encbuf = xzmalloc(len64+1);
charset_encode_mimebody(base, len, encbuf, &len64, NULL, 0 /* no wrap */);
json_object_set_new(item, "data:asBase64", json_stringn(encbuf, len64));
free(encbuf);
}
else {
json_object_set_new(item, "data:asBase64", json_string(""));
}
}
if (jmap_wantprop(get.props, "data:asHex")) {
if (len) {
char *encbuf = xzmalloc(len*2);
bin_to_lchex(base, len, encbuf);
json_object_set_new(item, "data:asHex", json_stringn(encbuf, len*2));
free(encbuf);
}
else {
json_object_set_new(item, "data:asHex", json_string(""));
}
}
// always the size of the full blob
if (jmap_wantprop(get.props, "size")) {
json_object_set_new(item, "size", json_integer(buf_len(&ctx.blob)));
}
}
jmap_getblob_ctx_fini(&ctx);
}
/* Reply */
jmap_ok(req, jmap_get_reply(&get));
done:
jmap_parser_fini(&parser);
jmap_get_fini(&get);
return 0;
}
#define DATATYPE_MAILBOX (1<<0)
#define DATATYPE_THREAD (1<<1)
#define DATATYPE_EMAIL (1<<2)
#define DATATYPE_ADDRESSBOOK (1<<3)
#define DATATYPE_CONTACT (1<<4)
#define DATATYPE_CALENDAR (1<<5)
#define DATATYPE_CALENDAREVENT (1<<6)
#define NUM_DATATYPES 7
struct datatype_name {
const char *name;
uint32_t typenum;
uint32_t mbtype;
};
struct datatype_name known_datatypes[] = {
{ "Mailbox", DATATYPE_MAILBOX, MBTYPE_EMAIL },
{ "Thread", DATATYPE_THREAD, MBTYPE_EMAIL },
{ "Email", DATATYPE_EMAIL, MBTYPE_EMAIL },
{ "Addressbook", DATATYPE_ADDRESSBOOK, MBTYPE_ADDRESSBOOK },
{ "Contact", DATATYPE_CONTACT, MBTYPE_ADDRESSBOOK },
{ "Calendar", DATATYPE_CALENDAR, MBTYPE_CALENDAR },
{ "CalendarEvent", DATATYPE_CALENDAREVENT, MBTYPE_CALENDAR },
{ NULL, 0, 0 }
};
static int _parse_datatypes(jmap_req_t *req __attribute__((unused)),
struct jmap_parser *parser,
const char *key,
json_t *arg,
void *rock)
{
int32_t *datatypesp = rock;
// support both "types" and "typeNames" selectors for now
if (!strcmp(key, "types") || !strcmp(key, "typeNames")) {
if (!json_is_array(arg)) {
jmap_parser_invalid(parser, key);
// field known, type wrong
return 1;
}
size_t i;
json_t *v;
json_array_foreach(arg, i, v) {
const char *val = json_string_value(v);
const struct datatype_name *item;
int typenum = 0;
for (item = known_datatypes; item->name; item++) {
if (strcmpsafe(val, item->name))
continue;
typenum = item->typenum;
break;
}
if (typenum) {
*datatypesp |= typenum;
}
else {
jmap_parser_push_index(parser, key, i, NULL);
jmap_parser_invalid(parser, NULL);
jmap_parser_pop(parser);
}
}
return 1;
}
return 0;
}
static void _free_found(void *data)
{
int i;
strarray_t *values = data;
for (i = 0; i < NUM_DATATYPES; i++) {
strarray_t *ids = values + i;
strarray_fini(ids);
}
free(values);
}
static int jmap_blob_lookup(jmap_req_t *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_get get;
int32_t datatypes = 0;
json_t *err = NULL;
json_t *jval;
size_t i;
/* Parse request */
jmap_get_parse(req, &parser, NULL, /*allow_null_ids*/0,
_parse_datatypes, &datatypes, &get, &err);
if (err) {
jmap_error(req, err);
goto done;
}
if (!datatypes) {
err = json_pack("{s:s s:[s]}", "type", "invalidArguments", "arguments", "typeNames");
jmap_error(req, err);
goto done;
}
const char *resname = json_object_get(req->args, "typeNames") ? "matchedIds" : "types";
/* Sort blob lookups by mailbox */
hash_table getblobs_by_uniqueid = HASH_TABLE_INITIALIZER;
construct_hash_table(&getblobs_by_uniqueid, 128, 0);
json_array_foreach(get.ids, i, jval) {
const char *blob_id = json_string_value(jval);
if (*blob_id == 'G') {
struct getblob_cb_rock rock = { req, blob_id, &getblobs_by_uniqueid };
int r = conversations_guid_foreach(req->cstate, blob_id + 1, getblob_cb, &rock);
if (r) {
syslog(LOG_ERR, "jmap_blob_get: can't lookup guid %s: %s",
blob_id, error_message(r));
}
}
else if (*blob_id == 'I' || *blob_id == 'V') {
char *uniqueid = NULL;
uint32_t uid;
if (jmap_decode_rawdata_blobid(blob_id, &uniqueid, &uid, NULL, NULL, NULL)) {
struct getblob_rec *getblob = xzmalloc(sizeof(struct getblob_rec));
getblob->blob_id = blob_id;
getblob->uid = uid;
ptrarray_t *getblobs = hash_lookup(uniqueid, &getblobs_by_uniqueid);
if (!getblobs) {
getblobs = ptrarray_new();
hash_insert(uniqueid, getblobs, &getblobs_by_uniqueid);
}
ptrarray_append(getblobs, getblob);
}
free(uniqueid);
}
else {
// we don't know how to parse other blob types yet, e.g. sieve has no mailbox
}
}
hash_table found = HASH_TABLE_INITIALIZER;
construct_hash_table(&found, json_array_size(get.ids), 0);
/* Lookup blobs by mailbox */
hash_iter *iter = hash_table_iter(&getblobs_by_uniqueid);
while (hash_iter_next(iter)) {
const char *uniqueid = hash_iter_key(iter);
ptrarray_t *getblobs = hash_iter_val(iter);
struct mailbox *mbox = NULL;
const mbentry_t *mbentry = jmap_mbentry_by_uniqueid(req, uniqueid);
int r = 0;
/* Open mailbox */
if (!jmap_hasrights_mbentry(req, mbentry, JACL_READITEMS)) {
r = IMAP_PERMISSION_DENIED;
}
else {
r = jmap_openmbox(req, mbentry->name, &mbox, 0);
if (r) {
syslog(LOG_ERR, "jmap_blob_get: can't open mailbox %s: %s",
mbentry->name, error_message(r));
}
}
if (r) continue;
// these types both want to know the last item of the name
mbname_t *mbname = NULL;
const strarray_t *boxes = NULL;
if (datatypes & (DATATYPE_ADDRESSBOOK|DATATYPE_CALENDAR)) {
mbname = mbname_from_intname(mbentry->name);
boxes = mbname_boxes(mbname);
}
// XXX: cache if userid is unchanged? Should be always
struct caldav_db *caldav_db = NULL;
if (datatypes & DATATYPE_CALENDAREVENT)
caldav_db = caldav_open_mailbox(mbox);
struct carddav_db *carddav_db = NULL;
if (datatypes & DATATYPE_CONTACT)
carddav_db = carddav_open_mailbox(mbox);
int j;
for (j = 0; j < ptrarray_size(getblobs); j++) {
struct getblob_rec *getblob = ptrarray_nth(getblobs, j);
/* Read message record */
struct message_guid guid;
bit64 cid;
msgrecord_t *mr = NULL;
r = msgrecord_find(mbox, getblob->uid, &mr);
if (!r) r = msgrecord_get_guid(mr, &guid);
if (!r) r = msgrecord_get_cid(mr, &cid);
msgrecord_unref(&mr);
if (r) {
syslog(LOG_ERR, "jmap_blob_get: can't read msgrecord %s:%d: %s",
mailbox_name(mbox), getblob->uid, error_message(r));
continue;
}
const struct datatype_name *item;
int i = 0;
for (item = known_datatypes; item->name; item++) {
i++;
// if we don't want this datatype, skip
if (!(datatypes & item->typenum)) continue;
// if this isn't the right type, skip
if (mbtype_isa(mailbox_mbtype(mbox)) != item->mbtype) continue;
/* only create the values store if we have found at least
* one item for this blobid */
strarray_t *values = hash_lookup(getblob->blob_id, &found);
if (!values) {
values = xzmalloc(sizeof(strarray_t) * NUM_DATATYPES);
hash_insert(getblob->blob_id, values, &found);
}
strarray_t *ids = values + i;
switch (item->typenum) {
case DATATYPE_MAILBOX:
strarray_add(ids, uniqueid);
break;
case DATATYPE_THREAD: {
char threadid[JMAP_THREADID_SIZE];
jmap_set_threadid(cid, threadid);
strarray_add(ids, threadid);
break;
}
case DATATYPE_EMAIL: {
char emailid[JMAP_EMAILID_SIZE];
jmap_set_emailid(&guid, emailid);
strarray_add(ids, emailid);
break;
}
case DATATYPE_ADDRESSBOOK:
strarray_add(ids, strarray_nth(boxes, -1));
break;
case DATATYPE_CONTACT: {
struct carddav_data *cdata = NULL;
carddav_lookup_imapuid(carddav_db, mbentry, getblob->uid, &cdata, 0);
if (cdata) strarray_add(ids, cdata->vcard_uid);
break;
}
case DATATYPE_CALENDAR:
strarray_add(ids, strarray_nth(boxes, -1));
break;
case DATATYPE_CALENDAREVENT: {
struct caldav_data *cdata = NULL;
caldav_lookup_imapuid(caldav_db, mbentry, getblob->uid, &cdata, 0);
if (cdata) strarray_add(ids, cdata->ical_uid);
break;
}
}
}
}
if (caldav_db) caldav_close(caldav_db);
if (carddav_db) carddav_close(carddav_db);
mbname_free(&mbname);
jmap_closembox(req, &mbox);
}
/* Clean up memory */
hash_iter_reset(iter);
while (hash_iter_next(iter)) {
ptrarray_t *getblobs = hash_iter_val(iter);
struct getblob_rec *getblob;
while ((getblob = ptrarray_pop(getblobs))) {
free(getblob->part);
free(getblob);
}
ptrarray_free(getblobs);
}
hash_iter_free(&iter);
free_hash_table(&getblobs_by_uniqueid, NULL);
/* Report out blobs */
json_array_foreach(get.ids, i, jval) {
const char *blob_id = json_string_value(jval);
strarray_t *values = hash_lookup(blob_id, &found);
if (values) {
json_t *dtvalue = json_object();
const struct datatype_name *item;
int j = 0;
for (item = known_datatypes; item->name; item++) {
j++;
// if we don't want this datatype, skip
if (!(datatypes & item->typenum)) continue;
strarray_t *ids = values + j;
json_t *list = json_array();
int k = 0;
for (k = 0; k < strarray_size(ids); k++)
json_array_append_new(list, json_string(strarray_nth(ids, k)));
json_object_set_new(dtvalue, item->name, list);
}
// XXX: replace the following two lines with this one line:
json_array_append_new(get.list, json_pack("{s:s, s:o}", "id", blob_id, resname, dtvalue));
}
else {
json_array_append_new(get.not_found, json_string(blob_id));
}
}
// now clean all the found things!
free_hash_table(&found, _free_found);
/* Reply */
jmap_ok(req, jmap_get_reply(&get));
done:
jmap_parser_fini(&parser);
jmap_get_fini(&get);
return 0;
}
static const jmap_property_t blob_set_props[] = {
{
"id",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE | JMAP_PROP_ALWAYS_GET
},
{
"data:asText",
NULL,
0
},
{
"data:asBase64",
NULL,
0
},
{
"data:asHex",
NULL,
0
},
{
"catenate",
NULL,
0
},
{
"type",
NULL,
0
},
{ NULL, NULL, 0 }
};
static int _set_arg_to_buf(struct jmap_req *req, struct buf *buf, json_t *arg, int recurse, json_t **errp)
{
json_t *jitem;
int seen_one = 0;
// plain text only
jitem = json_object_get(arg, "data:asText");
if (JNOTNULL(jitem) && json_is_string(jitem)) {
buf_init_ro(buf, json_string_value(jitem), json_string_length(jitem));
}
// base64 text
jitem = json_object_get(arg, "data:asBase64");
if (JNOTNULL(jitem) && json_is_string(jitem)) {
if (seen_one++) return IMAP_MAILBOX_EXISTS;
int r = charset_decode(buf, json_string_value(jitem),
json_string_length(jitem), ENCODING_BASE64);
if (r) {
*errp = json_string("base64 decode failed");
return r;
}
}
// hex text
jitem = json_object_get(arg, "data:asHex");
if (JNOTNULL(jitem) && json_is_string(jitem)) {
if (seen_one++) return IMAP_MAILBOX_EXISTS;
char *out = xzmalloc(json_string_length(jitem)/2);
int done = hex_to_bin(json_string_value(jitem), json_string_length(jitem), out);
buf_initm(buf, out, json_string_length(jitem)/2);
if (done < 0) {
*errp = json_string("hex decode failed");
return done;
}
}
if (recurse) {
jitem = json_object_get(arg, "blobId");
if (JNOTNULL(jitem) && json_is_string(jitem)) {
if (seen_one++) return IMAP_MAILBOX_EXISTS;
const char *blobid = json_string_value(jitem);
if (blobid && blobid[0] == '#')
blobid = jmap_lookup_id(req, blobid + 1);
// map in the existing blob, if there is one
jmap_getblob_context_t ctx;
jmap_getblob_ctx_init(&ctx, req->accountid, blobid, NULL, 1);
int r = jmap_getblob(req, &ctx);
if (!r) {
const char *base = buf_base(&ctx.blob);
size_t len = buf_len(&ctx.blob);
json_t *joffset = json_object_get(arg, "offset");
if (JNOTNULL(joffset) && json_is_integer(joffset)) {
size_t add = json_integer_value(joffset);
if (add <= len) {
base += add;
len -= add;
}
else {
r = -1;
}
}
json_t *jlength = json_object_get(arg, "length");
if (JNOTNULL(jlength) && json_is_integer(jlength)) {
size_t limit = json_integer_value(jlength);
if (limit <= len) {
len = limit;
}
else {
r = -1;
}
}
if (!r) buf_appendmap(buf, base, len);
}
jmap_getblob_ctx_fini(&ctx);
if (r) {
*errp = json_string("blob lookup failed");
return r;
}
}
}
else {
jitem = json_object_get(arg, "catenate");
if (JNOTNULL(jitem) && json_is_array(jitem)) {
if (seen_one++) return IMAP_MAILBOX_EXISTS;
size_t i;
json_t *val;
json_array_foreach(jitem, i, val) {
struct buf subbuf = BUF_INITIALIZER;
// XXX: we might need to validate the properties here too?
int r = _set_arg_to_buf(req, &subbuf, val, 1, errp);
buf_appendmap(buf, buf_base(&subbuf), buf_len(&subbuf));
buf_free(&subbuf);
if (*errp) return r; // exact code doesn't matter, err will be checked
if (r) return r;
}
}
}
return 0;
}
static int jmap_blob_set(struct jmap_req *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_set set;
json_t *jerr = NULL;
int r = 0;
time_t now = time(NULL);
/* Parse arguments */
jmap_set_parse(req, &parser, blob_set_props, NULL, NULL, &set, &jerr);
if (jerr) {
jmap_error(req, jerr);
goto done;
}
/* create */
const char *key;
json_t *arg;
json_object_foreach(set.create, key, arg) {
json_t *err = NULL;
struct buf *buf = buf_new();
struct message_guid guidobj;
char datestr[RFC3339_DATETIME_MAX];
char blob_id[JMAP_BLOBID_SIZE];
int r = _set_arg_to_buf(req, buf, arg, 0, &err);
if (r || !buf_base(buf) || err) {
jerr = json_pack("{s:s}", "type", "invalidProperties");
if (!err && r == IMAP_MAILBOX_EXISTS)
err = json_string("Multiple properties provided");
if (err) json_object_set_new(jerr, "description", err);
json_object_set_new(set.not_created, key, jerr);
buf_destroy(buf);
continue;
}
json_t *jtype = json_object_get(arg, "type");
const char *type = json_string_value(jtype);
if (!type) type = "application/octet-stream";
message_guid_generate(&guidobj, buf_base(buf), buf_len(buf));
jmap_set_blobid(&guidobj, blob_id);
time_to_rfc3339(now, datestr, RFC3339_DATETIME_MAX);
// json_string_value into the request lasts the lifetime of the request, so it's
// safe to zerocopy these blobs!
hash_insert(blob_id, buf, req->inmemory_blobs);
json_object_set_new(set.created, key, json_pack("{s:s, s:s, s:i, s:s, s:s}",
"id", blob_id,
"blobId", blob_id,
"size", buf_len(buf),
"expires", datestr,
"type", type));
jmap_add_id(req, key, blob_id);
}
const char *uid;
json_object_foreach(set.update, uid, arg) {
jerr = json_pack("{s:s}", "type", "notFound");
json_object_set_new(set.not_updated, key, jerr);
}
size_t index;
json_t *juid;
json_array_foreach(set.destroy, index, juid) {
jerr = json_pack("{s:s}", "type", "notFound");
json_object_set_new(set.not_destroyed, json_string_value(juid), jerr);
}
set.old_state = set.new_state = 0;
jmap_ok(req, jmap_set_reply(&set));
done:
jmap_parser_fini(&parser);
jmap_set_fini(&set);
return r;
}
/* Quota/get method */
static const jmap_property_t quota_props[] = {
{
"id",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE
},
{
"used",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE
},
{
"total",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE
},
{ NULL, NULL, 0 }
};
static int jmap_quota_get(jmap_req_t *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_get get;
json_t *err = NULL;
char *inboxname = mboxname_user_mbox(req->accountid, NULL);
/* Parse request */
jmap_get_parse(req, &parser, quota_props, /*allow_null_ids*/1,
NULL, NULL, &get, &err);
if (err) {
jmap_error(req, err);
goto done;
}
int want_mail_quota = !get.ids || json_is_null(get.ids);
size_t i;
json_t *jval;
json_array_foreach(get.ids, i, jval) {
if (strcmp("mail", json_string_value(jval))) {
json_array_append(get.not_found, jval);
}
else want_mail_quota = 1;
}
if (want_mail_quota) {
struct quota quota;
quota_init(&quota, inboxname);
int r = quota_read_withconversations(&quota);
if (!r) {
quota_t total = quota.limits[QUOTA_STORAGE] * quota_units[QUOTA_STORAGE];
quota_t used = quota.useds[QUOTA_STORAGE];
json_t *jquota = json_object();
json_object_set_new(jquota, "id", json_string("mail"));
json_object_set_new(jquota, "used", json_integer(used));
json_object_set_new(jquota, "total", json_integer(total));
json_array_append_new(get.list, jquota);
}
else {
syslog(LOG_ERR, "jmap_quota_get: can't read quota for %s: %s",
inboxname, error_message(r));
json_array_append_new(get.not_found, json_string("mail"));
}
quota_free(&quota);
}
modseq_t quotamodseq = mboxname_readquotamodseq(inboxname);
struct buf buf = BUF_INITIALIZER;
buf_printf(&buf, MODSEQ_FMT, quotamodseq);
get.state = buf_release(&buf);
jmap_ok(req, jmap_get_reply(&get));
done:
jmap_parser_fini(&parser);
jmap_get_fini(&get);
free(inboxname);
return 0;
}
/* UserCounters/get method */
static const jmap_property_t usercounters_props[] = {
{
"id",
NULL,
JMAP_PROP_SERVER_SET | JMAP_PROP_IMMUTABLE | JMAP_PROP_ALWAYS_GET
},
{
"highestModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"mailModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"calendarModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"contactsModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"notesModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"submissionModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"sieveScriptModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"mailDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"calendarDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"contactsDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"notesDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"submissionDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"sieveScriptDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"mailFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"calendarFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"contactFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"notesFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"submissionFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"sieveScriptFoldersModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"mailFoldersDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"calendarFoldersDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"contactFoldersDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"notesFoldersDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"sieveScriptFoldersDeletedModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"quotaModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"raclModSeq",
NULL,
JMAP_PROP_SERVER_SET
},
{
"uidValidity",
NULL,
JMAP_PROP_SERVER_SET
},
{ NULL, NULL, 0 }
};
static void usercounters_get(jmap_req_t *req, struct jmap_get *get)
{
/* Read script */
json_t *res = json_pack("{s:s}", "id", "singleton");
if (jmap_wantprop(get->props, "highestModSeq"))
json_object_set_new(res, "highestModSeq",
json_integer(req->counters.highestmodseq));
if (jmap_wantprop(get->props, "mailModSeq"))
json_object_set_new(res, "mailModSeq",
json_integer(req->counters.mailmodseq));
if (jmap_wantprop(get->props, "calendarModSeq"))
json_object_set_new(res, "calendarModSeq",
json_integer(req->counters.caldavmodseq));
if (jmap_wantprop(get->props, "contactsModSeq"))
json_object_set_new(res, "contactsModSeq",
json_integer(req->counters.carddavmodseq));
if (jmap_wantprop(get->props, "notesModSeq"))
json_object_set_new(res, "notesModSeq",
json_integer(req->counters.notesmodseq));
if (jmap_wantprop(get->props, "sieveScriptModSeq"))
json_object_set_new(res, "sieveScriptModSeq",
json_integer(req->counters.sievemodseq));
if (jmap_wantprop(get->props, "mailDeletedModSeq"))
json_object_set_new(res, "mailDeletedModSeq",
json_integer(req->counters.maildeletedmodseq));
if (jmap_wantprop(get->props, "calendarDeletedModSeq"))
json_object_set_new(res, "calendarDeletedModSeq",
json_integer(req->counters.caldavdeletedmodseq));
if (jmap_wantprop(get->props, "contactsDeletedModSeq"))
json_object_set_new(res, "contactsDeletedModSeq",
json_integer(req->counters.carddavdeletedmodseq));
if (jmap_wantprop(get->props, "notesDeletedModSeq"))
json_object_set_new(res, "notesDeletedModSeq",
json_integer(req->counters.notesdeletedmodseq));
if (jmap_wantprop(get->props, "sieveScriptDeletedModSeq"))
json_object_set_new(res, "sieveScriptDeletedModSeq",
json_integer(req->counters.sievedeletedmodseq));
if (jmap_wantprop(get->props, "mailFoldersModSeq"))
json_object_set_new(res, "mailFoldersModSeq",
json_integer(req->counters.mailfoldersmodseq));
if (jmap_wantprop(get->props, "calendarFoldersModSeq"))
json_object_set_new(res, "calendarFoldersModSeq",
json_integer(req->counters.caldavfoldersmodseq));
if (jmap_wantprop(get->props, "contactsFoldersModSeq"))
json_object_set_new(res, "contactsFoldersModSeq",
json_integer(req->counters.carddavfoldersmodseq));
if (jmap_wantprop(get->props, "notesFoldersModSeq"))
json_object_set_new(res, "notesFoldersModSeq",
json_integer(req->counters.notesfoldersmodseq));
if (jmap_wantprop(get->props, "sieveScriptFoldersModSeq"))
json_object_set_new(res, "sieveScriptFoldersModSeq",
json_integer(req->counters.sievefoldersmodseq));
if (jmap_wantprop(get->props, "mailFoldersDeletedModSeq"))
json_object_set_new(res, "mailFoldersDeletedModSeq",
json_integer(req->counters.mailfoldersdeletedmodseq));
if (jmap_wantprop(get->props, "calendarFoldersDeletedModSeq"))
json_object_set_new(res, "calendarFoldersDeletedModSeq",
json_integer(req->counters.caldavfoldersdeletedmodseq));
if (jmap_wantprop(get->props, "contactsFoldersDeletedModSeq"))
json_object_set_new(res, "contactsFoldersDeletedModSeq",
json_integer(req->counters.carddavfoldersdeletedmodseq));
if (jmap_wantprop(get->props, "notesFoldersDeletedModSeq"))
json_object_set_new(res, "notesFoldersDeletedModSeq",
json_integer(req->counters.notesfoldersdeletedmodseq));
if (jmap_wantprop(get->props, "sieveScriptFoldersDeletedModSeq"))
json_object_set_new(res, "sieveScriptFoldersDeletedModSeq",
json_integer(req->counters.sievefoldersdeletedmodseq));
if (jmap_wantprop(get->props, "quotaModSeq"))
json_object_set_new(res, "quotaModSeq",
json_integer(req->counters.quotamodseq));
if (jmap_wantprop(get->props, "raclModSeq"))
json_object_set_new(res, "raclModSeq",
json_integer(req->counters.raclmodseq));
if (jmap_wantprop(get->props, "uidValidity"))
json_object_set_new(res, "uidValidity",
json_integer(req->counters.uidvalidity));
json_array_append_new(get->list, res);
}
static int jmap_usercounters_get(jmap_req_t *req)
{
struct jmap_parser parser = JMAP_PARSER_INITIALIZER;
struct jmap_get get;
json_t *err = NULL;
/* Parse request */
jmap_get_parse(req, &parser, usercounters_props, /*allow_null_ids*/1,
NULL, NULL, &get, &err);
if (err) {
jmap_error(req, err);
goto done;
}
/* Does the client request specific responses? */
if (JNOTNULL(get.ids)) {
json_t *jval;
size_t i;
json_array_foreach(get.ids, i, jval) {
const char *id = json_string_value(jval);
if (!strcmp(id, "singleton"))
usercounters_get(req, &get);
else
json_array_append(get.not_found, jval);
}
}
else usercounters_get(req, &get);
/* Build response */
struct buf buf = BUF_INITIALIZER;
buf_printf(&buf, MODSEQ_FMT, req->counters.highestmodseq);
get.state = buf_release(&buf);
jmap_ok(req, jmap_get_reply(&get));
done:
jmap_parser_fini(&parser);
jmap_get_fini(&get);
return 0;
}
diff --git a/lib/imapoptions b/lib/imapoptions
index c166ed918..219a79812 100644
--- a/lib/imapoptions
+++ b/lib/imapoptions
@@ -1,3171 +1,3177 @@
# things inside of C comments get copied to the manpage
# things starting with # are ignored
/* .\" -*- nroff -*-
.TH IMAPD.CONF 5 "Project Cyrus" CMU
.\"
.\" Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in
.\" the documentation and/or other materials provided with the
.\" distribution.
.\"
.\" 3. The name "Carnegie Mellon University" must not be used to
.\" endorse or promote products derived from this software without
.\" prior written permission. For permission or any legal
.\" details, please contact
.\" Carnegie Mellon University
.\" Center for Technology Transfer and Enterprise Creation
.\" 4615 Forbes Avenue
.\" Suite 302
.\" Pittsburgh, PA 15213
.\" (412) 268-7393, fax: (412) 268-7395
.\" innovation@andrew.cmu.edu
.\"
.\" 4. Redistributions of any form whatsoever must retain the following
.\" acknowledgment:
.\" "This product includes software developed by Computing Services
.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
.\"
.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.SH NAME
imapd.conf \- IMAP configuration file
.SH DESCRIPTION
\fB/etc/imapd.conf\fR
is the configuration file for the Cyrus IMAP server. It defines
local parameters for IMAP.
.PP
Each line of the \fB/etc/imapd.conf\fR file has the form
.IP
\fIoption\fR: \fIvalue\fR
.PP
where \fIoption\fR is the name of the configuration option being set
and \fIvalue\fR is the value that the configuration option is being
set to.
.PP
Although there is no limit to the length of a line, a ``\\''
(backslash) character may be used as the last character on a line to
force it to continue on the next one. No additional whitespace is
inserted before or after the ``\\''. Note that a line that is split
using ``\\'' character(s) is still considered a single line.
For example
.IP
\fIoption\fR:\\
.br
.in +1
\fIvalue\fR1 \fIvalue\fR2 \\
.br
.in +1
\fIvalue\fR3
.PP
is equivalent to
.IP
\fIoption\fR: \fIvalue\fR1 \fIvalue\fR2 \fIvalue\fR3
.PP
Blank lines and lines beginning with ``#'' are ignored.
.PP
For boolean and enumerated options, the values ``yes'', ``on'', ``t'',
``true'' and ``1'' turn the option on, the values ``no'', ``off'',
``f'', ``false'' and ``0'' turn the option off.
.PP
Duration options take the form of a number followed by a unit, for example
\fB32m\fR (32 minutes). Units are \fBd\fR (days), \fBh\fR (hours), \fBm\fR
(minutes) and \fBs\fR (seconds). Multiple units can be combined and will
be summed together, for example \fB1h30m\fR is equivalent to \fB90m\fR. If
no unit is specified, an option-specific backward-compatible default unit
is assumed (documented on an option-by-option basis). These are simple time
units: 1d=24h, 1h=60m, 1m=60s (daylight savings, timezones, leap adjustments,
etc are not considered).
.SH FIELD DESCRIPTIONS
.PP
The sections below detail options that can be placed in the
\fB/etc/imapd.conf\fR file, and show each option's default value.
Some options have no default value, these are listed with
``<no default>''. Some options default to the empty string, these
are listed with ``<none>''.
*/
# OPTIONS
{ "acl_admin_implies_write", 0, SWITCH, "3.5.2" }
/* If enabled, any user with the admin ACL on a mailbox implicitly
gets the ability to write to that mailbox as well. */
{ "addressbookprefix", "#addressbooks", STRING, "2.5.0" }
/* The prefix for the addressbook mailboxes hierarchies. The hierarchy
delimiter will be automatically appended. The public addressbook
hierarchy will be at the toplevel of the shared namespace. A
user's personal addressbook hierarchy will be a child of their Inbox. */
{ "admins", "", STRING, "2.3.17" }
/* The list of userids with administrative rights. Separate each userid
with a space. Sites using Kerberos authentication may use
separate "admin" instances.
.PP
Note that accounts used by users should not be administrators.
Administrative accounts should not receive mail. That is, if user
"jbRo" is a user reading mail, he should not also be in the admins line.
Some problems may occur otherwise, most notably the ability of
administrators to create top-level mailboxes visible to users,
but not writable by users. */
{ "afspts_localrealms", NULL, STRING, "2.3.17" }
/* The list of realms which are to be treated as local, and thus stripped
during identifier canonicalization (for the AFSPTS ptloader module).
This is different from loginrealms in that it occurs later in the
authorization process (as the user id is canonified for PTS lookup) */
{ "afspts_mycell", NULL, STRING, "2.3.17" }
/* Cell to use for AFS PTS lookups. Defaults to the local cell. */
{ "allowallsubscribe", 0, SWITCH, "2.3.17" }
/* Allow subscription to nonexistent mailboxes. This option is
typically used on backend servers in a Murder so that users can
subscribe to mailboxes that don't reside on their "home" server.
This option can also be used as a workaround for IMAP clients which
don't play well with nonexistent or unselectable mailboxes (e.g.,
Microsoft Outlook). */
{ "allowanonymouslogin", 0, SWITCH, "2.3.17" }
/* Permit logins by the user "anonymous" using any password. Also
allows use of the SASL ANONYMOUS mechanism. */
{ "allowapop", 1, SWITCH, "2.3.17" }
/* Allow use of the POP3 APOP authentication command.
.PP
Note that this command requires that SASL is compiled with APOP
support, that the plaintext passwords are available in a SASL auxprop
backend (e.g., sasldb), and that the system can provide enough entropy
(e.g., from /dev/urandom) to create a challenge in the banner. */
{ "allowdeleted", 0, SWITCH, "3.1.8" }
/* Allow access to deleted and expunged data via vendor.cmu-* access */
{ "allownewnews", 0, SWITCH, "2.3.17" }
/* Allow use of the NNTP NEWNEWS command.
.PP
Note that this is a very expensive command and should only be
enabled when absolutely necessary. */
{ "allowplaintext", 0, SWITCH, "3.0.0" }
/* If enabled, allows the use of cleartext passwords on the wire.
.PP
By default, the use of cleartext passwords requires a TLS/SSL
encryption layer to be negotiated prior to any cleartext
authentication mechanisms being advertised or allowed. To require a
TLS/SSL encryption layer to be negotiated prior to ANY
authentication, see the \fItls_required\fR option. */
{ "allowsetacl", 1, SWITCH, "3.1.8" }
/* Defaults to enabled. If disabled, disallows the use of the SETACL
command at all via IMAP. */
{ "allowusermoves", 0, SWITCH, "2.3.17" }
/* Allow moving user accounts (with associated meta-data) via RENAME
or XFER.
.PP
Note that measures should be taken to make sure that the user being
moved is not logged in, and cannot login during the move. Failure
to do so may result in the user's meta-data (seen state,
subscriptions, etc) being corrupted or out of date. */
{ "altnamespace", 1, SWITCH, "3.0.0" }
/* Use the alternate IMAP namespace, where personal folders reside at the
same level in the hierarchy as INBOX.
.PP
This option ONLY applies where interaction takes place with the
client/user. Currently this is limited to the IMAP protocol (imapd)
and Sieve scripts (lmtpd). This option does NOT apply to admin tools
such as cyradm (admins ONLY), reconstruct, quota, etc., NOR does it
affect LMTP delivery of messages directly to mailboxes via
plus-addressing. The default changed in 3.0 from off to on. */
{ "altprefix", "Alt Folders", STRING, "3.0.0" }
/* Alternative INBOX spellings that can't be accessed in altnamespace
otherwise go under here */
{ "annotation_db", "twoskip", STRINGLIST("skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for mailbox annotations. */
{ "annotation_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the annotations db file. If not specified,
will be configdirectory/annotations.db */
{ "anyoneuseracl", 1, SWITCH, "2.3.17" }
/* Should non-admin users be allowed to set ACLs for the 'anyone'
user on their mailboxes? In a large organization this can cause
support problems, but it's enabled by default. */
{ "annotation_allow_undefined", 0, SWITCH, "2.5.0" }
/* Allow clients to store values for entries which are not
defined either by Cyrus or in the annotations_definitions
file. */
{ "annotation_definitions", NULL, STRING, "2.5.0" }
/* File containing external (third-party) annotation definitions.
.PP
Each line of the file specifies the properties of an annotation and
has the following form:
.IP
\fIname\fR, \fIscope\fR, \fIattrib-type\fR, \fIproxy-type\fR,
\fIattrib-names\fR, \fIacl\fR
.\"
.IP \fIname\fR 5
is the hierarchical name as in RFC 5257 or RFC 5464 (in the latter case,
without the leading \fB/shared\fR or \fB/private\fR). For example,
/vendor/acme/blurdybloop.
.\"
.IP \fIscope\fR 5
specifies whether the annotation is for the \fBserver\fR, a
\fBmailbox\fR, or a \fBmessage\fR.
.\"
.IP \fIattrib-type\fR 5
.RS 5
specifies the attribute data type, which is used only to check the
string value passed by clients when setting annotations. The
\fIattrib-type\fR is one of:
.\"
.IP \fBstring\fR 5
any value is accepted.
.\"
.IP \fBcontent-type\fR 5
this obsolete data type, which was useful for early drafts of the standard,
is accepted but silently translated to \fBstring\fR.
.\"
.IP \fBboolean\fR 5
only the strings "true" or "false" are accepted. Checking is
case-insensitive but the value is forced to lowercase.
.\"
.IP \fBint\fR 5
integers are accepted.
.\"
.IP \fBuint\fR 5
non-negative integers are accepted.
.\"
.RE
.\"
.IP \fIproxy-type\fR 5
specifies whether this attribute is for the \fBbackend\fR or
\fBproxy\fR servers or both (\fBproxy_and_backend\fR)
.\"
.IP \fIattrib-names\fR 5
is the space-separated list of available attributes for the
annotation. Possible attribute names are \fBvalue.shared\fR,
\fBvalue.priv\fR, and \fBvalue\fR (which permits both \fBvalue.priv\fR
and \fBvalue.shared\fR). The attribute names \fBsize\fR,
\fBsize.shared\fR, and \fBsize.priv\fR are accepted but ignored; these
attributes are automatically provided by the server if the corresponding
\fBvalue\fR attribute is specified. Some obsolete attributes, which were
defined early drafts of the standard, are accepted and ignored with a
warning.
.\"
.IP \fIextra-permissions\fR 5
is the extra ACL permission bits required for setting this annotation, in
standard IMAP ACL permission bit string format. Note that this is
in addition to the permission bits specified in RFC 5257 and RFC 5464,
so leaving this field empty is harmless. Note also that there is no way
to specify that an annotation can only be set by an admin user; in
particular the \fBa\fP permission bit does not achieve this.
.PP
Blank lines and lines beginning with ``#'' are ignored.
*/
{ "annotation_callout", NULL, STRING, "2.5.0" }
/* The pathname of a callout to be used to automatically add annotations
or flags to a message when it is appended to a mailbox. The path can
be either an executable (including a script), or a UNIX domain
socket. */
{ "annotation_callout_disable_append", 0, SWITCH, "3.1.2" }
/* Disables annotations on append with xrunannotator */
{ "annotation_enable_legacy_commands", 0, SWITCH, "3.1.6" }
/* Whether to enable the legacy GETANNOTATION/SETANNOTATION commands.
These commands are deprecated and will be removed in the future,
but might be useful in the meantime for supporting old clients that
do not implement the RFC 5464 IMAP METADATA extension. */
{ "aps_topic", NULL, STRING, "3.0.0" }
/* Topic for Apple Push Service registration. */
{ "aps_topic_caldav", NULL, STRING, "3.0.0" }
/* Topic for Apple Push Service registration for CalDAV. */
{ "aps_topic_carddav", NULL, STRING, "3.0.0" }
/* Topic for Apple Push Service registration for CardDAV. */
{ "archive_enabled", 0, SWITCH, "3.0.0" }
/* Is archiving enabled for this server. You also need to have an
archivepartition for the mailbox. Archiving allows older email
to be stored on slower, cheaper disks - even within the same
mailbox, as distinct from partitions. */
{ "archive_days", NULL, DURATION, "3.1.8", "3.1.8", "archive_after" }
/* Deprecated in favour of \fIarchive_after\fR. */
{ "archive_after", "7d", DURATION, "3.1.8" }
/* The duration after which to move messages to the archive partition
if archiving is enabled.
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
*/
{ "archive_maxsize", 1024, INT, "3.0.0" }
/* The size in kilobytes of the largest message that won't be archived
immediately. Default is 1Mb */
{ "archive_keepflagged", 0, SWITCH, "3.0.0" }
/* If set, messages with the \\Flagged system flag won't be archived,
provided they are smaller than \fBarchive_maxsize\fR. */
# Commented out - there's no such thing as "archivepartition-name",
# but we need this for the man page
# { "archivepartition-name", NULL, STRING, "3.0.0" }
/* The pathname of the archive partition \fIname\fR, corresponding to
spool partition \fBpartition-name\fR. For any mailbox residing in
a directory on \fBpartition-name\fR, the archived messages will be
stored in a corresponding directory on \fBarchivepartition-name\fR.
Note that not every \fBpartition-name\fR option is strictly required
to have a corresponding \fBarchivepartition-name\fR option, but that
without one there's no benefit to enabling archiving. */
{ "auditlog", 0, SWITCH, "2.4.0" }
/* Should cyrus output log entries for every action taken on a message
file or mailboxes list entry? It's noisy so disabled by default, but
can be very useful for tracking down what happened if things look strange */
{ "auth_mech", "unix", STRINGLIST("unix", "pts", "krb", "krb5"), "2.3.17" }
/* The authorization mechanism to use. */
{ "autocreateinboxfolders", NULL, STRING, "2.5.0", "2.5.0", "autocreate_inbox_folders" }
/* Deprecated in favor of \fIautocreate_inbox_folders\fR. */
{ "autocreatequota", 0, INT, "2.5.0", "2.5.0", "autocreate_quota" }
/* Deprecated in favor of \fIautocreate_quota\fR. */
{ "autocreatequotamsg", -1, INT, "2.5.0", "2.5.0", "autocreate_quota_messages" }
/* Deprecated in favor of \fIautocreate_quota_messages\fR. */
{ "autosievefolders", NULL, STRING, "2.5.0", "2.5.0", "autocreate_sieve_folders" }
/* Deprecated in favor of \fIautocreate_sieve_folders\fR. */
{ "generate_compiled_sieve_script", 0, SWITCH, "2.5.0", "2.5.0", "autocreate_sieve_script_compile" }
/* Deprecated in favor of \fIautocreate_sieve_script_compile\fR. */
{ "autocreate_sieve_compiled_script", NULL, STRING, "2.5.0", "2.5.0", "autocreate_sieve_script_compiled" }
/* Deprecated in favor of \fIautocreate_sieve_script_compiled\fR. */
{ "autosubscribeinboxfolders", NULL, STRING, "2.5.0", "2.5.0", "autocreate_subscribe_folders" }
/* Deprecated in favor of \fIautocreate_subscribe_folders\fR. */
{ "autosubscribesharedfolders", NULL, STRING, "2.5.0", "2.5.0", "autocreate_subscribe_sharedfolders" }
/* Deprecated in favor of \fIautocreate_subscribe_sharedfolders\fR. */
{ "autosubscribe_all_sharedfolders", 0, SWITCH, "2.5.0", "2.5.0", "autocreate_subscribe_sharedfolders_all" }
/* Deprecated in favor of \fIautocreate_subscribe_sharedfolders_all\fR. */
# Commented out - there's no single setting "autocreate_acl",
# but we need this for the man page
# { "autocreate_acl", NULL, STRING, "3.2.0" }
/* If folders are to be created by \fIautocreate_inbox_folders\fR, this
setting can be used to apply additional ACLs to the autocreated
folders. The syntax is "autocreate_acl folder identifier rights",
where \fIfolder\fR must match one of the \fIautocreate_inbox_folders\fR
folders, \fIidentifier\fR must be a valid cyrus identifier, and
\fIrights\fR must be a valid cyrus rights string. Multiple
identifier|rights pairs can be assigned to a single folder by providing
this setting multiple times.
.PP
For example, "autocreate_acl Plus anyone p" would allow lmtp delivery
to a folder named "Plus".
*/
{ "autocreate_inbox_folders", NULL, STRING, "2.5.0" }
/* If a user does not have an INBOX already, and the INBOX is to be
created, create the list of folders in this setting as well.
\fIautocreate_inbox_folders\fR is a list of INBOX's subfolders
separated by a "|", that are automatically created by the server
under the following two scenarios. Leading and trailing whitespace is
stripped, so "Junk | Trash" results in two folders: "Junk" and
"Trash". See also the \fIxlist-flag\fR option, for setting
special-use flags on autocreated folders.
.PP
INBOX folders are created under both the following conditions:
.\"
.IP 1.
The user logins via the IMAP or the POP3 protocol.
\fIautocreate_quota\fR option must have a value of zero or greater.
.\"
.IP 2.
A message arrives for the user through the \fIlmtpd(8)\fR.
\fIautocreate_post\fR option must be enabled.
.PP
*/
{ "autocreate_post", 0, SWITCH, "2.5.0" }
/* If enabled, when \fIlmtpd(8)\fR receives an incoming mail for an
INBOX that does not exist, then the INBOX is automatically created
by \fIlmtpd(8)\fR and delivery of the message continues. */
{ "autocreate_quota", -1, INT, "2.5.0" }
/* If set to a value of zero or higher, users have their INBOX folders
created upon a successful login event or upon \fIlmtpd(8)\fR
message delivery if \fIautocreate_post\fR is enabled, provided their
INBOX did not yet already exist.
.PP
The user's quota is set to the value if it is greater than zero,
otherwise the user has unlimited quota.
.PP
Note that quota is specified in kilobytes. */
{ "autocreate_quota_messages", -1, INT, "3.0.0" }
/* If set to a value of zero or higher, users who have their INBOX
folders created upon a successful login event (see
\fIautocreate_quota\fR), or upon \fIlmtpd(8)\fR message delivery if
\fIautocreate_post\fR is enabled, receive the message quota
configured in this option.
.PP
The default of -1 disables assigning message quota.
.PP
For consistency with \fIautocreate_quota\fR, a value of zero is treated
as unlimited message quota, rather than a message quota of zero. */
{ "autocreate_sieve_folders", NULL, STRING, "2.5.0" }
/* A "|" separated list of subfolders of INBOX that will be
automatically created, if requested by a sieve filter, through the
"fileinto" action. The default is to create no folders
automatically.
.PP
Leading and trailing whitespace is stripped from each folder, so a
setting of "Junk | Trash" will create two folders: "Junk" and
"Trash". */
{ "autocreate_sieve_script", NULL, STRING, "2.5.0" }
/* The full path of a file that contains a sieve script. This script
automatically becomes a user's initial default sieve filter script.
.PP
When this option is not defined, no default sieve filter is created.
The file must be readable by the Cyrus daemon. */
{ "autocreate_sieve_script_compile", 0, SWITCH, "2.5.0" }
/* If set to yes and no compiled sieve script file exists, the sieve script which is
compiled on the fly will be saved in the file name that autocreate_sieve_compiledscript
option points to. In order a compiled script to be generated, autocreate_sieve_script and
autocreate_sieve_compiledscript must have valid values */
{ "autocreate_sieve_script_compiled", NULL, STRING, "2.5.0" }
/* The full path of a file that contains a compiled in bytecode sieve script. This script
automatically becomes a user's initial default sieve filter script. If this option is
not specified, or the filename doesn't exist then the script defined by
autocreate_sieve_script is compiled on the fly and installed as the user's default
sieve script */
{ "autocreate_subscribe_folders", NULL, STRING, "2.5.0" }
/* A list of folder names, separated by "|", that the users get automatically subscribed to,
when their INBOX is created. These folder names must have been included in the
autocreateinboxfolders option of the imapd.conf. */
{ "autocreate_subscribe_sharedfolders", NULL, STRING, "2.5.0" }
/* A list of shared folders (bulletin boards), separated by "|", that the users get
automatically subscribed to, after their INBOX is created. The shared folder must
have been created and the user must have the required permissions to get subscribed
to it. Otherwise, subscribing to the shared folder fails. */
{ "autocreate_subscribe_sharedfolders_all", 0, SWITCH, "2.5.0" }
/* If set to yes, the user is automatically subscribed to all shared folders, one has permission
to subscribe to. */
{ "autocreate_users", "anyone", STRING, "2.5.0" }
/* A space separated list of users and/or groups that are allowed their INBOX to be
automatically created. */
{ "autoexpunge", 0, SWITCH, "3.1.7" }
/* If set to yes, then all \Deleted messages will be automatically expunged whenever
an index is closed, whether CLOSE, UNSELECT, SELECT or on disconnect */
# Commented out - there's no such thing as "backuppartition-name",
# but we need this for the man page
# { "backuppartition-name", NULL, STRING, "3.0.0" }
/* The pathname of the backup partition \fIname\fR. At least one backup
partition pathname MUST be specified if backups are in use. Note that
there is no relationship between spool partitions and backup partitions. */
{ "backup_compact_minsize", 0, INT, "3.0.0" }
/* The minimum size in kilobytes of chunks in each backup. The compact tool
will try to combine adjacent chunks that are smaller than this.
.PP
Setting this value to zero or negative disables combining of chunks. */
{ "backup_compact_maxsize", 0, INT, "3.0.0" }
/* The maximum size in kilobytes of chunks in each backup. The compact tool
will try to split chunks larger than this into smaller chunks.
.PP
Setting this value to zero or negative disables splitting of chunks. */
{ "backup_compact_work_threshold", 1, INT, "3.0.0" }
/* The number of chunks that must obviously need compaction before the compact
tool will go ahead with the compaction. If set to less than one, the value
is treated as being one. */
{ "backup_staging_path", NULL, STRING, "3.0.0" }
/* The absolute path of the backup staging area. If not specified,
will be temp_path/backup */
{ "backup_retention_days", NULL, DURATION, "3.1.8", "3.1.8", "backup_retention" }
/* Deprecated in favor of \fIbackup_retention\fR. */
{ "backup_retention", "7d", DURATION, "3.1.0" }
/* How long to keep content in backup after it has been deleted
from the source. If set to a negative value or zero, deleted content
will be kept indefinitely.
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
{ "backup_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the backup locations database. */
{ "backup_db_path", NULL, STRING, "3.0.0" }
/* The absolute path to the backup db file. If not specified,
will be configdirectory/backups.db */
{ "backup_keep_previous", 0, SWITCH, "3.0.0" }
/* Whether the \fBctl_backups compact\fR and \fBctl_backups reindex\fR
commands should preserve the original file. The original file will
be named with a timestamped suffix. This is mostly useful for
debugging.
.PP
Note that with this enabled, compacting a backup will actually
increase the disk used by it (because there will now be an extra
copy: the original version, and the compacted version). */
{ "boundary_limit", 1000, INT, "2.5.0" }
/* messages are parsed recursively and a deep enough MIME structure
can cause a stack overflow. Do not parse deeper than this many
layers of MIME structure. The default of 1000 is much higher
than any sane message should have. */
{ "caldav_accept_invalid_rrules", 0, SWITCH, "UNRELEASED" }
/* Accept invalid RRULEs (e.g. FREQ=WEEKLY;BYMONTHDAY=15)
rather than rejecting them as errors. */
{ "caldav_allowattach", 1, SWITCH, "3.0.0" }
/* Enable managed attachments support on the CalDAV server. */
{ "caldav_allowcalendaradmin", 0, SWITCH, "3.1.2" }
/* Enable per-user calendar administration web UI on the CalDAV server. */
{ "caldav_allowscheduling", "on", ENUM("off", "on", "apple"), "2.5.0" }
/* Enable calendar scheduling operations. If set to "apple", the
server will emulate Apple CalendarServer behavior as closely as
possible. */
{ "caldav_create_attach", 1, SWITCH, "3.0.0" }
/* Create the 'Attachments' collection if it doesn't already exist */
{ "caldav_create_default", 1, SWITCH, "3.0.0" }
/* Create the 'Default' calendar if it doesn't already exist */
{ "caldav_create_sched", 1, SWITCH, "3.0.0" }
/* Create the 'Inbox' and 'Outbox' calendars if they don't already exist */
{ "caldav_historical_age", "7d", DURATION, "3.1.8" }
/* How long after an occurrence of event or task has concluded
that it is considered 'historical'. Changes to historical
occurrences of events or tasks WILL NOT have invite or reply
messages sent for them. A negative value means that events
and tasks are NEVER considered historical.
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
*/
{ "caldav_maxdatetime", "20380119T031407Z", STRING, "2.5.0" }
/* The latest date and time accepted by the server (ISO format). This
value is also used for expanding non-terminating recurrence rules.
.PP
Note that increasing this value will require the DAV databases for
calendars to be reconstructed with the \fBdav_reconstruct\fR
utility in order to see its effect on serer-side time-based
queries. */
{ "caldav_mindatetime", "19011213T204552Z", STRING, "2.5.0" }
/* The earliest date and time accepted by the server (ISO format). */
{ "caldav_realm", NULL, STRING, "2.5.0" }
/* The realm to present for HTTP authentication of CalDAV resources.
If not set (the default), the value of the "servername" option will
be used.*/
{ "calendarprefix", "#calendars", STRING, "2.5.0" }
/* The prefix for the calendar mailboxes hierarchies. The hierarchy
delimiter will be automatically appended. The public calendar
hierarchy will be at the toplevel of the shared namespace. A
user's personal calendar hierarchy will be a child of their Inbox. */
{ "calendar_default_displayname", "personal", STRING, "3.3.0" }
/* The displayname to be used when creating a user's 'Default' calendar. */
{ "calendar_user_address_set", NULL, STRING, "2.5.0" }
/* Space-separated list of domains corresponding to calendar user
addresses for which the server is responsible. If not set (the
default), the value of the "servername" option will be used. */
{ "calendar_component_set", "VEVENT VTODO VJOURNAL VFREEBUSY VAVAILABILITY VPOLL", BITFIELD("VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY", "VAVAILABILITY", "VPOLL"), "3.1.7" }
/* Space-separated list of iCalendar component types that calendar
object resources may contain in a calendar collection.
This restriction is only set at calendar creation time and only
if the CalDAV client hasn't specified a restriction in the creation
request. */
{ "carddav_allowaddmember", 0, SWITCH, "3.1.3" }
/* Enable support for POST add-member on the CardDAV server. */
{ "carddav_allowaddressbookadmin", 0, SWITCH, "3.1.2" }
/* Enable per-user addressbook administration web UI on the CardDAV server. */
{ "carddav_realm", NULL, STRING, "2.5.0" }
/* The realm to present for HTTP authentication of CardDAV resources.
If not set (the default), the value of the "servername" option will
be used.*/
{ "carddav_repair_vcard", 0, SWITCH, "3.0.0", "3.3.1" }
/* If enabled, VCARDs with invalid content are attempted to be repaired
during creation. */
{ "chatty", 0, SWITCH, "2.5.0" }
/* If yes, syslog tags and commands for every IMAP command, mailboxes
for every lmtp connection, every POP3 command, etc */
{ "client_bind", 0, SWITCH, "3.0.0" }
/* If enabled, a specific IP will be bound when performing a client
connection. \fBclient_bind_name\fR is used if it is set, otherwise
\fBservername\fR is used. This is useful on multi-homed servers where
Cyrus should not use other services' interfaces.
.PP
If not enabled (the default), no bind will be performed. Client
connections will use an IP chosen by the operating system. */
{ "client_bind_name", NULL, STRING, "3.0.0" }
/* IPv4, IPv6 address or hostname to bind for client connections when
\fBclient_bind\fR is enabled. If not set (the default),
\fRservername\fR will be used. */
{ "client_timeout", "10s", DURATION, "3.1.8" }
/* Time to wait before returning a timeout failure when performing a
client connection (e.g. in a murder environment).
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "commandmintimer", NULL, STRING, "2.4.0" }
/* Time in floating point seconds. Any imap command that takes longer than
this time is logged. */
{ "configdirectory", NULL, STRING, "2.3.17" }
/* The pathname of the IMAP configuration directory. This field is
required. */
{ "createonpost", 0, SWITCH, "2.5.0", "2.5.0", "autocreate_post" }
/* Deprecated in favor of \fIautocreate_post\fR. */
{ "conversations", 0, SWITCH, "3.0.0" }
/* Enable the XCONVERSATIONS extensions. Extract conversation
tracking information from incoming messages and track them
in per-user databases. */
{ "conversations_counted_flags", NULL, STRING, "3.0.0" }
/* space-separated list of flags for which per-conversation counts
will be kept. Note that you need to reconstruct the conversations
database with ctl_conversationsdb if you change this option on a
running server, or the counts will be wrong. */
{ "conversations_db", "skiplist", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the per-user conversations database. */
{ "conversations_expire_days", NULL, DURATION, "3.1.8", "3.1.8", "conversations_expire_after" }
/* Deprecated in favor of \fIconversations_expire_after\fR. */
{ "conversations_expire_after", "90d", DURATION, "3.1.8" }
/* How long the conversations database keeps the message tracking
information needed for receiving new messages in existing
conversations.
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
{ "conversations_keep_existing", 1, SWITCH, "3.3.0" }
/* during conversations cleanup, don't clean up if there are still existing emails
with one of the mentioned CIDs */
{ "conversations_max_thread", 100, INT, "3.1.1" }
/* maximum size for a single thread. Threads will split if they have this many
messages in them and another message arrives */
{ "conversations_max_guidrecords", 5000, INT, "3.3.0" }
/* maximum records with the same guid. This is just a sanity check to stop the same
email being added and removed over and over, so the default is 5000 */
{ "conversations_max_guidexists", 100, INT, "3.3.0" }
/* maximum records with the same guid. This maps to "labels", so with the default
of 100, you can only have 100 labels on an email in JMAP */
{ "conversations_max_guidinfolder", 10, INT, "3.3.0" }
/* maximum records with the same guid in the same folder. You can't do this via JMAP,
but could via IMAP. The default of 10 should be heaps normally! */
{ "crossdomains", 0, SWITCH, "3.0.0" }
/* Enable cross domain sharing. This works best with alt namespace and
unix hierarchy separators on, so you get Other Users/foo@example.com/... */
{ "crossdomains_onlyother", 0, SWITCH, "3.0.0" }
/* only show the domain for users in other domains than your own (for
backwards compatibility if you're already sharing */
{ "cyrus_group", NULL, STRING, "3.1.7" }
/* The name of the group Cyrus services will run as. If not configured, the
primary group of cyrus_user will be used. Can be further overridden by
setting the $CYRUS_GROUP environment variable. */
{ "cyrus_user", NULL, STRING, "3.0.0" }
/* The username to use as the 'cyrus' user. If not configured, the compile
time default will be used. Can be further overridden by setting the
$CYRUS_USER environment variable. */
{ "davdriveprefix", "#drive", STRING, "3.0.0" }
/* The prefix for the DAV storage mailboxes hierarchies. The hierarchy
delimiter will be automatically appended. The public storage
hierarchy will be at the toplevel of the shared namespace. A
user's personal storage hierarchy will be a child of their Inbox. */
{ "davnotificationsprefix", "#notifications", STRING, "3.0.0" }
/* The prefix for the DAV notifications hierarchy. The hierarchy
delimiter will be automatically appended. The public notifications
hierarchy will be at the toplevel of the shared namespace. A
user's personal notifications hierarchy will be a child of their Inbox. */
{ "dav_realm", NULL, STRING, "2.5.0" }
/* The realm to present for HTTP authentication of generic DAV
resources (principals). If not set (the default), the value of the
"servername" option will be used.*/
{ "dav_lock_timeout", "20s", DURATION, "3.1.8" }
/* The maximum time to wait for a write lock on the per-user DAV database
before timeout. For HTTP requests, the HTTP status code 503 is returned
if the lock can not be obtained within this time.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "debug", 0, SWITCH, "2.5.0" }
/* If enabled, allow syslog() to pass LOG_DEBUG messages. */
{ "debug_command", NULL, STRING, "2.3.17" }
/* Debug command to be used by processes started with -D option. The string
is a C format string that gets 3 options: the first is the name of the
executable (as specified in the cmd parameter in cyrus.conf). The second
is the pid (integer) and the third is the service ID.
Example: /usr/local/bin/gdb /usr/cyrus/bin/%s %d */
{ "debug_writefail_guid", NULL, STRING, "UNRELEASED" }
/* If set, any arriving message with this guid will fail as if the underlying
disk write had failed, pretending to be a disk full condition. This is
mainly useful for regression testing certain edge case handling.
Currently only implemented for replication uploads. */
{ "defaultacl", "anyone lrs", STRING, "2.3.17" }
/* The Access Control List (ACL) placed on a newly-created (non-user)
mailbox that does not have a parent mailbox. */
{ "defaultdomain", "internal", STRING, "3.0.0" }
/* The default domain for virtual domain support */
{ "defaultpartition", NULL, STRING, "2.3.17" }
/* The partition name used by default for new mailboxes. If not
specified, the partition with the most free space will be used for
new mailboxes.
.PP
Note that the partition specified by this option must also be
specified as \fIpartition-name\fR, where you substitute 'name'
for the alphanumeric string you set \fIdefaultpartition\fR to. */
{ "defaultsearchtier", "", STRING, "3.0.0" }
/* Name of the default tier that messages will be indexed to. Search
indexes can be organized in tiers to allow index storage in different
directories and physical media. See the man page of squatter for
details. The default search tier also requires the definition
of an according \fIsearchtierpartition-name\fR entry.
.PP
This option MUST be specified for xapian search. */
{ "defaultserver", NULL, STRING, "2.3.17" }
/* The backend server name used by default for new mailboxes. If not
specified, the server with the most free space will be used for new
mailboxes. */
{ "deletedprefix", "DELETED", STRING, "2.3.17" }
/* With \fBdelete_mode\fR set to \fIdelayed\fR, the
\fBdeletedprefix\fR setting defines the prefix for the hierarchy of
deleted mailboxes.
.PP
The hierarchy delimiter will be automatically appended.
*/
{ "delete_mode", "delayed", ENUM("immediate", "delayed"), "2.5.0" }
/* The manner in which mailboxes are deleted. In the default
\fIdelayed\fR mode, mailboxes that are being deleted are renamed to
a special mailbox hierarchy under the \fBdeletedprefix\fR, to be
removed later by \fBcyr_expire(8)\fR.
.PP
In \fIimmediate\fR mode, the mailbox is removed from the filesystem
immediately.
*/
{ "delete_unsubscribe", 0, SWITCH, "3.0.0" }
/* Whether to also unsubscribe from mailboxes when they are deleted.
Note that this behaviour contravenes RFC 3501 section 6.3.9, but
may be useful for avoiding user/client software confusion.
The default is 'no'. */
{ "deleteright", "c", STRING, "2.3.17" }
/* Deprecated - only used for backwards compatibility with existing
installations. Lists the old RFC 2086 right which was used to
grant the user the ability to delete a mailbox. If a user has this
right, they will automatically be given the new 'x' right. */
{ "disable_user_namespace", 0, SWITCH, "2.5.0" }
/* Preclude list command on user namespace. If set to 'yes', the
LIST response will never include any other user's mailbox. Admin
users will always see all mailboxes. The default is 'no' */
{ "disable_shared_namespace", 0, SWITCH, "2.5.0" }
/* Preclude list command on shared namespace. If set to 'yes', the
LIST response will never include any non-user mailboxes. Admin
users will always see all mailboxes. The default is 'no' */
{ "disconnect_on_vanished_mailbox", 0, SWITCH, "2.3.17" }
/* If enabled, IMAP/POP3/NNTP clients will be disconnected by the
server if the currently selected mailbox is (re)moved by another
session. Otherwise, the missing mailbox is treated as empty while
in use by the client.*/
{ "ischedule_dkim_domain", NULL, STRING, "2.5.0" }
/* The domain to be reported as doing iSchedule DKIM signing. */
{ "ischedule_dkim_key_file", NULL, STRING, "2.5.0" }
/* File containing the private key for iSchedule DKIM signing. */
{ "ischedule_dkim_required", 1, SWITCH, "3.1.4" }
/* A DKIM signature is required on received iSchedule requests. */
{ "ischedule_dkim_selector", NULL, STRING, "2.5.0" }
/* Name of the selector subdividing the domain namespace. This
specifies the actual key used for iSchedule DKIM signing within the
domain. */
{ "duplicate_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the duplicate delivery suppression
and sieve. */
{ "duplicate_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the duplicate db file. If not specified,
will be configdirectory/deliver.db */
{ "duplicatesuppression", 1, SWITCH, "2.3.17" }
/* If enabled, lmtpd will suppress delivery of a message to a mailbox if
a message with the same message-id (or resent-message-id) is recorded
as having already been delivered to the mailbox. Records the mailbox
and message-id/resent-message-id of all successful deliveries. */
{ "event_content_inclusion_mode", "standard", ENUM("standard", "message", "header", "body", "headerbody"), "2.5.0" }
/* The mode in which message content may be included with MessageAppend and
MessageNew. "standard" mode is the default behavior in which message is
included up to a size with the notification. In "message" mode, the message
is included and may be truncated to a size. In "header" mode, it includes
headers truncated to a size. In "body" mode, it includes body truncated
to a size. In "headerbody" mode, it includes full headers and body truncated
to a size */
{ "event_content_size", 0, INT, "2.5.0" }
/* Truncate the message content that may be included with MessageAppend and
MessageNew. Set 0 to include the entire message itself */
{ "event_exclude_flags", NULL, STRING, "2.5.0" }
/* Don't send event notification for given IMAP flag(s) */
{ "event_exclude_specialuse", "\\Junk", STRING, "2.5.0" }
/* Don't send event notification for folder with given special-use attributes.
Set ALL for any folder */
{ "event_extra_params", "timestamp", BITFIELD("bodyStructure", "clientAddress", "diskUsed", "flagNames", "messageContent", "messageSize", "messages", "modseq", "service", "timestamp", "uidnext", "vnd.cmu.midset", "vnd.cmu.unseenMessages", "vnd.cmu.envelope", "vnd.cmu.sessionId", "vnd.cmu.mailboxACL", "vnd.cmu.mbtype", "vnd.cmu.davFilename", "vnd.cmu.davUid", "vnd.fastmail.clientId", "vnd.fastmail.sessionId", "vnd.fastmail.convExists", "vnd.fastmail.convUnseen", "vnd.fastmail.cid", "vnd.fastmail.counters", "vnd.fastmail.jmapEmail", "vnd.fastmail.jmapStates", "vnd.cmu.emailid", "vnd.cmu.threadid"), "3.1.6" }
/* Space-separated list of extra parameters to add to any appropriated event. */
{ "event_groups", "message mailbox", BITFIELD("message", "quota", "flags", "access", "mailbox", "subscription", "calendar", "applepushservice" ), "3.0.0" }
/* Space-separated list of groups of related events to turn on notification */
{ "event_notifier", NULL, STRING, "2.5.0" }
/* Notifyd(8) method to use for "EVENT" notifications which are based on
the RFC 5423. If not set, "EVENT" notifications are disabled. */
{ "expunge_mode", "delayed", ENUM("immediate", "semidelayed", "delayed"), "3.1.1" }
/* The mode in which messages (and their corresponding cache entries)
are expunged. "semidelayed" mode is the old behavior in which the
message files are purged at the time of the EXPUNGE, but index
and cache records are retained to facilitate QRESYNC.
In "delayed" mode, which is the default since Cyrus 2.5.0,
the message files are also retained, allowing unexpunge to
rescue them. In "immediate" mode, both the message files and the
index records are removed as soon as possible. In all cases,
nothing will be finally purged until all other processes have
closed the mailbox to ensure they never see data disappear under
them. In "semidelayed" or "delayed" mode, a later run of "cyr_expire"
will clean out the retained records (and possibly message files).
This reduces the amount of I/O that takes place at the time of
EXPUNGE and should result in greater responsiveness for the client,
especially when expunging a large number of messages. */
{ "failedloginpause", "3s", DURATION, "3.1.8" }
/* Time to pause after a failed login.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "flushseenstate", 1, SWITCH, "2.5.0", "2.5.0" }
/* Deprecated. No longer used */
{ "foolstupidclients", 0, SWITCH, "2.3.17" }
/* If enabled, only list the personal namespace when a LIST "*" is performed
(it changes the request to a LIST "INBOX*"). */
{ "force_sasl_client_mech", NULL, STRING, "2.3.17" }
/* Force preference of a given SASL mechanism for client side operations
(e.g., murder environments). This is separate from (and overridden by)
the ability to use the <host shortname>_mechs option to set preferred
mechanisms for a specific host */
{ "fulldirhash", 0, SWITCH, "2.3.17" }
/* If enabled, uses an improved directory hashing scheme which hashes
on the entire username instead of using just the first letter as
the hash. This changes hash algorithm used for quota and user
directories and if \fIhashimapspool\fR is enabled, the entire mail
spool.
.PP
Note that this option CANNOT be changed on a live system. The
server must be quiesced and then the directories moved with the
\fBrehash\fR utility. */
{ "hashimapspool", 0, SWITCH, "2.3.17" }
/* If enabled, the partitions will also be hashed, in addition to the
hashing done on configuration directories. This is recommended if
one partition has a very bushy mailbox tree. */
# Commented out - there's no such thing as "hostname_mechs", but we need
# this for the man page
# { "hostname_mechs", NULL, STRING, "2.3.17" }
/* Force a particular list of SASL mechanisms to be used when authenticating
to the backend server hostname (where hostname is the short hostname of
the server in question). If it is not specified it will query the server
for available mechanisms and pick one to use. - Cyrus Murder */
# Commented out - there's no such thing as "hostname_password", but we need
# this for the man page
# { "hostname_password", NULL, STRING, "2.3.17" }
/* The password to use for authentication to the backend server hostname
(where hostname is the short hostname of the server) - Cyrus Murder */
{ "httpallowcompress", 1, SWITCH, "2.5.0" }
/* If enabled, the server will compress response payloads if the client
indicates that it can accept them. Note that the compressed data
will appear in telemetry logs, leaving only the response headers as
human-readable.*/
{ "httpallowcors", NULL, STRING, "2.5.0" }
/* A wildmat pattern specifying a list of origin URIs ( scheme "://"
host [ ":" port ] ) that are allowed to make Cross-Origin Resource
Sharing (CORS) requests on the server. By default, CORS requests
are disabled.
.PP
Note that the scheme and host should both be lowercase, the port
should be omitted if using the default for the scheme (80 for http,
443 for https), and there should be no trailing '/' (e.g.:
"http://www.example.com:8080", "https://example.org"). */
{ "httpallowtrace", 0, SWITCH, "2.5.0" }
/* Allow use of the TRACE method.
.PP
Note that sensitive data might be disclosed by the response. */
{ "httpallowedurls", NULL, STRING, "2.5.0" }
/* Space-separated list of relative URLs (paths) rooted at
"httpdocroot" (see below) to be served by httpd. If set, this
option will limit served static content to only those paths specified
(returning "404 Not Found" to any other client requested URLs).
Otherwise, httpd will serve any content found in "httpdocroot".
.PP
Note that any path specified by "rss_feedlist_template" is an
exception to this rule.*/
{ "httpcontentmd5", 0, SWITCH, "2.5.0" }
/* If enabled, HTTP responses will include a Content-MD5 header for
the purpose of providing an end-to-end message integrity check
(MIC) of the payload body. Note that enabling this option will
use additional CPU to generate the MD5 digest, which may be ignored
by clients anyways. */
{ "httpdocroot", NULL, STRING, "2.5.0" }
/* If set, http will serve the static content (html/text/jpeg/gif
files, etc) rooted at this directory. Otherwise, httpd will not
serve any static content. */
{ "httpkeepalive", "20s", DURATION, "3.1.8" }
/* Set the length of the HTTP server's keepalive heartbeat. The
default is 20 seconds. The minimum value is 0, which will disable
the keepalive heartbeat. When enabled, if a request takes longer
than \fIhttpkeepalive\fR to process, the server will send the client
provisional responses every \fIhttpkeepalive\fR until the final
response can be sent.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "httplogheaders", NULL, STRING, "3.3.1" }
/* Space-separated list of HTTP header fields that will be included
in the requests logged by httpd(8). */
{ "httpmodules", "", BITFIELD("admin", "caldav", "carddav", "cgi", "domainkey", "freebusy", "ischedule", "jmap", "prometheus", "rss", "tzdist", "webdav"), "3.1.7" }
/* Space-separated list of HTTP modules that will be enabled in
httpd(8). This option has no effect on modules that are disabled
at compile time due to missing dependencies (e.g. libical).
.PP
Note that "domainkey" depends on "ischedule" being enabled, and
that both "freebusy" and "ischedule" depend on "caldav" being
enabled. */
{ "httpprettytelemetry", 0, SWITCH, "2.5.0" }
/* If enabled, HTTP response payloads including server-generated
markup languages (HTML, XML) will utilize line breaks and
indentation to promote better human-readability in telemetry logs.
Note that enabling this option will increase the amount of data
sent across the wire. */
{ "httptimeout", "5m", DURATION, "3.1.8" }
/* Set the length of the HTTP server's inactivity autologout timer.
The default is 5 minutes. The minimum value is 0, which will
disable persistent connections.
.PP
For backwards compatibility, if no unit is specified, minutes
is assumed. */
{ "http_h2_altsvc", NULL, STRING, "UNRELEASED" }
/* If set, HTTP/2 (over TLS) will be advertised as being available on the specifed
[host]:port. */
{ "http_jwt_key_dir", NULL, STRING, "UNRELEASED" }
/* The absolute path to a directory containing one or more key files
to authenticate JSON Web Tokens (RFC 7519) for HTTP connections.
Keys for the following JWS algorithms are supported: "HS256",
"HS384", "HS512", "RS256", "RS384", "RS512".
A key file consists of one or more keys encoded in PEM format.
RSA keys must be embedded between the lines
"-----BEGIN PUBLIC KEY-----" and "-----END PUBLIC KEY-----"
HMAC digest keys must be embedded between the lines
"-----BEGIN HMAC KEY-----" and "-----END HMAC KEY-----",
encoded in base64.
Any lines before or after a PEM key definition are ignored,
empty lines are ignored anywhere in the file.
The JSON Web Token must be the value of the HTTP "Authorization" header,
using the "Bearer" authentication scheme. The JWS Header must include the
"alg" and "typ" parameter. A header with any other parameter is rejected.
The JWS Payload must include the "sub" claim with the Cyrus user
identifier as value. It may include the "iat" claim (see \fIhttp_jwt_max_age\fR).
A payload with any other claim is rejected.
*/
{ "http_jwt_max_age", "0s", DURATION, "UNRELEASED" }
/* Defines the timespan in which a JSON Web Token is valid
(see \fIhttp_jwt_key\fR). The value must be zero or positive.
If non-zero, the timespan starts at the point in time specified in the
"iat" claim of the JWS Payload and ends after the duration of this
option value has passed. Tokens without an "iat" claim,
or with an issue date in the future, are rejected. There is no leeway
for clock skew.
The zero value disables validation of the "iat" JWS claim.
*/
{ "icalendar_max_size", 0, INT, "UNRELEASED" }
/* Maximum allowed iCalendar size.
If non-zero, CalDAV and JMAP will reject storage of resources whose
iCalendar representation is larger than \fIicalendar_max_size\fR bytes.
If set to 0, this will allow iCalendar resources of any size (the default). */
{ "idlesocket", "{configdirectory}/socket/idle", STRING, "2.3.17" }
/* Unix domain socket that idled listens on. */
{ "ignorereference", 0, SWITCH, "2.3.17" }
/* For backwards compatibility with Cyrus 1.5.10 and earlier -- ignore
the reference argument in LIST or LSUB commands. */
{ "imapidlepoll", "60s", DURATION, "3.1.8" }
/* The interval for polling for mailbox changes and ALERTs while running
the IDLE command. This option is used when idled is not enabled or
cannot be contacted. The minimum value is 1 second. A value of 0
will disable IDLE.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "imapidresponse", 1, SWITCH, "2.3.17" }
/* If enabled, the server responds to an ID command with a parameter
list containing: version, vendor, support-url, os, os-version,
command, arguments, environment. Otherwise the server returns NIL. */
{ "imapmagicplus", 0, SWITCH, "2.3.17" }
/* Only list a restricted set of mailboxes via IMAP by using
userid+namespace syntax as the authentication/authorization id.
Using userid+ (with an empty namespace) will list only subscribed
mailboxes. */
{ "imipnotifier", NULL, STRING, "3.0.0" }
/* Notifyd(8) method to use for "IMIP" notifications which are based on
the RFC 6047. If not set, "IMIP" notifications are disabled. */
{ "implicit_owner_rights", "lkxan", STRING, "3.1.2" }
/* The implicit Access Control List (ACL) for the owner of a mailbox. */
# Commented out - there's no such thing as "@include", but we need
# this for the man page
# { "@include", NULL, STRING, "2.3.17" }
/* Directive which includes the specified file as part of the
configuration. If the path to the file is not absolute, CYRUS_PATH
is prepended. */
{ "improved_mboxlist_sort", 0, SWITCH, "2.3.17" }
/* If enabled, a special comparator will be used which will correctly
sort mailbox names that contain characters such as ' ' and '-'.
.PP
Note that this option SHOULD NOT be changed on a live system. The
mailboxes database should be dumped (ctl_mboxlist) before the
option is changed, removed, and then undumped after changing the
option. When not using flat files for the subscriptions databases
the same has to be done (cyr_dbtool) for each subscription database
See improved_mboxlist_sort.html.*/
{ "jmap_emailsearch_db_path", NULL, STRING, "3.1.6", "UNRELEASED" }
/* The absolute path to the JMAP email search cache file. If not
specified, JMAP Email/query and Email/queryChanges will not
cache email search results. */
{ "jmap_querycache_max_age", "0m", DURATION, "UNRELEASED" }
/* The duration after which unused cached JMAP query results
must be evicted from process memory. If non-zero, then the
full result of the last query (before windowing) is stored
in-memory. Subsequent queries with the same expression and
query state can then page through the cached result.
A zero value disables query result caching.
This feature currently only is enabled for Email/query. */
{ "jmap_preview_annot", NULL, STRING, "3.1.1" }
/* The name of the per-message annotation, if any, to store message
previews. */
{ "jmap_imagesize_annot", NULL, STRING, "3.1.1" }
/* The name of the per-message annotation, if any, that stores a
JSON object, mapping message part numbers of MIME image types
to an array of their image dimensions. The array must have at
least two entries, where the first entry denotes the width
and the second entry the height of the image. Any additional
values are ignored.
For example, if message part 1.2 contains an image of width 300
and height 200, then the value of this annotation would be:
{ "1.2" : [ 300, 200 ] }
*/
{ "jmap_inlinedcids_annot", NULL, STRING, "3.1.1" }
/* The name of the per-message annotation, if any, that stores a
JSON object, mapping RFC 2392 Content-IDs referenced in HTML bodies
to the respective HTML body part number.
For example, if message part 1.2 contains HTML and references an
inlined image at "cid:foo", then the value of this annotation
would be:
{ "<foo>" : "1.2" }
Note that the Content-ID key must be URL-unescaped and enclosed in
angular brackets, as defined in RFC 2392. */
{ "jmap_preview_length", 64, INT, "3.1.1" }
/* The maximum byte length of dynamically generated message previews. Previews
stored in jmap_preview_annot take precedence. */
+{ "jmap_max_catenate_items", 100, INT, "3.5.0" }
+/* The maximum number of items that can be catenated together by
+ a JMAP Blob/set action. Returned as the maxCatenateItems property
+ value of the JMAP \"urn:ietf:params:jmap:blob\" capabilities object.
+ Default value is 100. */
+
{ "jmap_max_size_upload", 1048576, INT, "3.1.6" }
/* The maximum size (in kilobytes) that the JMAP API accepts
for blob uploads. Returned as the maxSizeUpload property
value of the JMAP \"urn:ietf:params:jmap:core\" capabilities object.
Default is 1Gb. */
{ "jmap_max_size_blob_set", 4096, INT, "3.3.0" }
/* The maximum size (in kilobytes) that the JMAP API accepts
for Blob/set. Returned as the maxSizeBlobSet property
value of the JMAP \"https://cyrusimap.org/ns/jmap/blob\" capabilities object.
Default is 4Mb. */
{ "jmap_max_concurrent_upload", 5, INT, "3.1.6" }
/* The value to return for the maxConcurrentUpload property of
the JMAP \"urn:ietf:params:jmap:core\" capabilities object. The Cyrus JMAP
implementation does not enforce this rate-limit. */
{ "jmap_max_size_request", 10240, INT, "3.1.6" }
/* The maximum size (in kilobytes) that the JMAP API accepts
for requests at the API endpoint. Returned as the
maxSizeRequest property value of the JMAP \"urn:ietf:params:jmap:core\"
capabilities object. Default is 10Mb. */
{ "jmap_max_concurrent_requests", 5, INT, "3.1.6" }
/* The value to return for the maxConcurrentRequests property of
the JMAP \"urn:ietf:params:jmap:core\" capabilities object. The Cyrus JMAP
implementation does not enforce this rate-limit. */
{ "jmap_max_calls_in_request", 50, INT, "3.1.6" }
/* The maximum number of calls per JMAP request object.
Returned as the maxCallsInRequest property value of the
JMAP \"urn:ietf:params:jmap:core\" capabilities object. */
{ "jmap_max_delayed_send", "512d", DURATION, "3.1.8" }
/* The value to return for the maxDelayedSend property of
the JMAP \"urn:ietf:params:jmap:emailsubmission\" capabilities object.
The Cyrus JMAP implementation does not enforce this limit.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "jmap_max_objects_in_get", 4096, INT, "3.1.6" }
/* The maximum number of ids that a JMAP client may request in
a single \"/get\" type method call. The actual number
of returned objects in the response may exceed this number
if the JMAP object type supports unbounded \"/get\" calls.
Returned as the maxObjectsInGet property value of the
JMAP \"urn:ietf:params:jmap:core\" capabilities object. */
{ "jmap_max_objects_in_set", 4096, INT, "3.1.6" }
/* The maximum number of objects a JMAP client may send to create,
update or destroy in a single /set type method call.
Returned as the maxObjectsInSet property value of the
JMAP \"urn:ietf:params:jmap:core\" capabilities object. */
{ "jmap_mail_max_size_attachments_per_email", 10240, INT, "3.1.6" }
/* The value (in kilobytes) to return for the maxSizeAttachmentsPerEmail
property of the JMAP \"urn:ietf:params:jmap:mail\" capabilities object. The Cyrus
JMAP implementation does not enforce this size limit. Default is 10 Mb.*/
{ "jmap_nonstandard_extensions", 0, SWITCH, "3.1.9" }
/* If enabled, support non-standard JMAP extensions. If not enabled,
only IETF standard JMAP functionality is supported. */
{ "jmap_pushpoll", "60s", DURATION, "UNRELEASED" }
/* The interval for polling for changes on an EventSource connection or
when push has been ennabled on a WebSocket channel.
The minimum value is 1 second. A value of 0 will disable push.
.PP
If no unit is specified, seconds is assumed. */
{ "jmap_set_has_attachment", 1, SWITCH, "3.1.5" }
/* If enabled, the $hasAttachment flag is determined and set for new messages
created with the JMAP Email/set or Email/import methods. This option should
typically be enabled, but installations using Cyrus-external message
annatotors to determine the $hasAttachment flag might want to disable it. */
{ "jmap_vacation", 1, SWITCH, "3.1.8" }
/* If enabled, support the JMAP vacation extension */
{ "jmapuploadfolder", "#jmap", STRING, "3.1.1" }
/* the name of the folder for JMAP uploads (#jmap) */
{ "jmapsubmission_deleteonsend", 1, SWITCH, "3.1.8" }
/* If enabled (the default) then delete the EmailSubmission as soon as the email
* has been sent */
{ "jmapsubmissionfolder", "#jmapsubmission", STRING, "3.1.8" }
/* the name of the folder for JMAP Submissions (#jmapsubmission) */
{ "jmappushsubscriptionfolder", "#jmappushsubscription", STRING, "3.1.8" }
/* the name of the folder for JMAP Push Subscriptions (#jmappushsubscription) */
{ "jmapnotificationfolder", "#jmapnotification", STRING, "3.3.0" }
/* the name of the folder for JMAP notifications (#jmapnotification) */
{ "iolog", 0, SWITCH, "2.5.0" }
/* Should cyrus output I/O log entries */
{ "ldap_authz", NULL, STRING, "2.3.17" }
/* SASL authorization ID for the LDAP server */
{ "ldap_base", "", STRING, "2.3.17" }
/* Contains the LDAP base dn for the LDAP ptloader module */
{ "ldap_bind_dn", NULL, STRING, "2.3.17" }
/* Bind DN for the connection to the LDAP server (simple bind).
Do not use for anonymous simple binds */
{ "ldap_deref", "never", STRINGLIST("search", "find", "always", "never"), "2.3.17" }
/* Specify how aliases dereferencing is handled during search. */
{ "ldap_domain_base_dn", "", STRING, "2.5.0" }
/* Base DN to search for domain name spaces. */
{ "ldap_domain_filter", "(&(objectclass=domainrelatedobject)(associateddomain=%s))", STRING, "2.5.0" }
/* Filter to use searching for domains */
{ "ldap_domain_name_attribute", "associateddomain", STRING, "2.5.0" }
/* The attribute name for domains. */
{ "ldap_domain_scope", "sub", STRINGLIST("sub", "one", "base"), "2.5.0" }
/* Search scope */
{ "ldap_domain_result_attribute", "inetdomainbasedn", STRING, "2.5.0" }
/* Result attribute */
{ "ldap_filter", "(uid=%u)", STRING, "2.3.17" }
/* Specify a filter that searches user identifiers. The following tokens can be
used in the filter string:
%% = %
%u = user
%U = user portion of %u (%U = test when %u = test@domain.tld)
%d = domain portion of %u if available (%d = domain.tld when %u =
test@domain.tld), otherwise same as %R
%R = domain portion of %u starting with @ (%R = @domain.tld
when %u = test@domain.tld)
%D = user dn. (use when ldap_member_method: filter)
%1-9 = domain tokens (%1 = tld, %2 = domain when %d = domain.tld)
ldap_filter is not used when ldap_sasl is enabled. */
{ "ldap_group_base", "", STRING, "2.3.17" }
/* LDAP base dn for ldap_group_filter. */
{ "ldap_group_filter", "(cn=%u)", STRING, "2.3.17" }
/* Specify a filter that searches for group identifiers.
See ldap_filter for more options. */
{ "ldap_group_scope", "sub", STRINGLIST("sub", "one", "base"), "2.3.17" }
/* Specify search scope for ldap_group_filter. */
{ "ldap_id", NULL, STRING, "2.3.17" }
/* SASL authentication ID for the LDAP server */
{ "ldap_mech", NULL, STRING, "2.3.17" }
/* SASL mechanism for LDAP authentication */
{ "ldap_user_attribute", NULL, STRING, "2.5.0" }
/* Specify LDAP attribute to use as canonical user id */
{ "ldap_member_attribute", NULL, STRING, "2.3.17" }
/* See ldap_member_method. */
{ "ldap_member_base", "", STRING, "2.3.17" }
/* LDAP base dn for ldap_member_filter. */
{ "ldap_member_filter", "(member=%D)", STRING, "2.3.17" }
/* Specify a filter for "ldap_member_method: filter".
See ldap_filter for more options. */
{ "ldap_member_method", "attribute", STRINGLIST("attribute", "filter"), "2.3.17" }
/* Specify a group method. The "attribute" method retrieves groups from
a multi-valued attribute specified in ldap_member_attribute.
The "filter" method uses a filter, specified by ldap_member_filter, to find
groups; ldap_member_attribute is a single-value attribute group name. */
{ "ldap_member_scope", "sub", STRINGLIST("sub", "one", "base"), "2.3.17" }
/* Specify search scope for ldap_member_filter. */
{ "ldap_password", NULL, STRING, "2.3.17" }
/* Password for the connection to the LDAP server (SASL and simple bind).
Do not use for anonymous simple binds */
{ "ldap_realm", NULL, STRING, "2.3.17" }
/* SASL realm for LDAP authentication */
{ "ldap_referrals", 0, SWITCH, "2.3.17" }
/* Specify whether or not the client should follow referrals. */
{ "ldap_restart", 1, SWITCH, "2.3.17" }
/* Specify whether or not LDAP I/O operations are automatically restarted
if they abort prematurely. */
{ "ldap_sasl", 1, SWITCH, "2.3.17" }
/* Use SASL for LDAP binds in the LDAP PTS module. */
{ "ldap_sasl_authc", NULL, STRING, "2.5.0", "2.5.0", "ldap_id" }
/* Deprecated. Use ldap_id */
{ "ldap_sasl_authz", NULL, STRING, "2.5.0", "2.5.0", "ldap_authz" }
/* Deprecated. Use ldap_authz */
{ "ldap_sasl_mech", NULL, STRING, "2.5.0", "2.5.0", "ldap_mech" }
/* Deprecated. Use ldap_mech */
{ "ldap_sasl_password", NULL, STRING, "2.5.0", "2.5.0", "ldap_password" }
/* Deprecated. User ldap_password */
{ "ldap_sasl_realm", NULL, STRING, "2.5.0", "2.5.0", "ldap_realm" }
/* Deprecated. Use ldap_realm */
{ "ldap_scope", "sub", STRINGLIST("sub", "one", "base"), "2.3.17" }
/* Specify search scope. */
{ "ldap_servers", "ldap://localhost/", STRING, "2.5.0", "2.5.0", "ldap_uri" }
/* Deprecated. Use ldap_uri */
{ "ldap_size_limit", 1, INT, "2.3.17" }
/* Specify a number of entries for a search request to return. */
{ "ldap_start_tls", 0, SWITCH, "2.3.17" }
/* Use transport layer security for ldap:// using STARTTLS. Do not use
ldaps:// in 'ldap_uri' with this option enabled. */
{ "ldap_time_limit", "5s", DURATION, "3.1.8" }
/* How long to wait for a search request to complete.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "ldap_timeout", "5s", DURATION, "3.1.8" }
/* How long a search can take before timing out.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "ldap_ca_dir", NULL, STRING, "2.5.0" }
/* Path to a directory with CA (Certificate Authority) certificates. */
{ "ldap_ca_file", NULL, STRING, "2.5.0" }
/* Path to a file containing CA (Certificate Authority) certificate(s). */
{ "ldap_ciphers", NULL, STRING, "2.5.0" }
/* List of SSL/TLS ciphers to allow. The format of the string is
described in ciphers(1). */
{ "ldap_client_cert", NULL, STRING, "2.5.0" }
/* File containing the client certificate. */
{ "ldap_client_key", NULL, STRING, "2.5.0" }
/* File containing the private client key. */
{ "ldap_verify_peer", 0, SWITCH, "2.5.0" }
/* Require and verify server certificate. If this option is yes,
you must specify ldap_ca_file or ldap_ca_dir. */
{ "ldap_tls_cacert_dir", NULL, STRING, "2.5.0", "2.5.0", "ldap_ca_dir" }
/* Deprecated in favor of \fIldap_ca_dir\fR. */
{ "ldap_tls_cacert_file", NULL, STRING, "2.5.0", "2.5.0", "ldap_ca_file" }
/* Deprecated in favor of \fIldap_ca_file\fR. */
{ "ldap_tls_cert", NULL, STRING, "2.5.0", "2.5.0", "ldap_client_cert" }
/* Deprecated in favor of \fIldap_client_cert\fR. */
{ "ldap_tls_key", NULL, STRING, "2.5.0", "2.5.0", "ldap_client_key" }
/* Deprecated in favor of \fIldap_client_key\fR. */
{ "ldap_tls_check_peer", 0, SWITCH, "2.5.0", "2.5.0", "ldap_verify_peer" }
/* Deprecated in favor of \fIldap_verify_peer\fR. */
{ "ldap_tls_ciphers", NULL, STRING, "2.5.0", "2.5.0", "ldap_ciphers" }
/* Deprecated in favor of \fIldap_ciphers\fR. */
{ "ldap_uri", NULL, STRING, "2.3.17" }
/* Contains a list of the URLs of all the LDAP servers when using the
LDAP PTS module. */
{ "ldap_version", 3, INT, "2.3.17" }
/* Specify the LDAP protocol version. If ldap_start_tls and/or
ldap_use_sasl are enabled, ldap_version will be automatically
set to 3. */
{ "literalminus", 0, SWITCH, "3.0.0" }
/* if enabled, CAPABILITIES will reply with LITERAL- rather than
LITERAL+ (RFC 7888). Doesn't actually size-restrict uploads though */
{ "lmtp_downcase_rcpt", 1, SWITCH, "2.5.0" }
/* If enabled, lmtpd will convert the recipient addresses to lowercase
(up to a '+' character, if present). */
{ "lmtp_exclude_specialuse", "\\Snoozed", STRING, "3.1.8" }
/* Don't allow delivery to folders with given special-use attributes.
.PP
Note that "snoozing" of emails can currently only be done via the
JMAP protocol, so delivery directly to the \Snoozed mailbox is
prohibited by default as it will not be moved back into INBOX
automatically. */
{ "lmtp_fuzzy_mailbox_match", 0, SWITCH, "2.3.17" }
/* If enabled, and the mailbox specified in the detail part of the
recipient (everything after the '+') does not exist, lmtpd will try
to find the closest match (ignoring case, ignoring whitespace,
falling back to parent) to the specified mailbox name. */
{ "lmtp_over_quota_perm_failure", 0, SWITCH, "2.3.17" }
/* If enabled, lmtpd returns a permanent failure code when a user's
mailbox is over quota. By default, the failure is temporary,
causing the MTA to queue the message and retry later. */
{ "lmtp_preparse", 0, SWITCH, "3.3.1" }
/* If enabled, lmtpd will map in the email and parse the xapian data
for jmapsearch. The advantage is that the parsing is done without
holding any locks. The disadvantage is that the parsing is done
even if it winds up not being needed. */
{ "lmtp_strict_quota", 0, SWITCH, "2.3.17" }
/* If enabled, lmtpd returns a failure code when the incoming message
will cause the user's mailbox to exceed its quota. By default, the
failure won't occur until the mailbox is already over quota. */
{ "lmtp_strict_rfc2821", 1, SWITCH, "2.5.0" }
/* By default, lmtpd will be strict (per RFC 2821) with regards to which
envelope addresses are allowed. If this option is set to false, 8bit
characters in the local-part of envelope addresses are changed to 'X'
instead. This is useful to avoid generating backscatter with
certain MTAs like Postfix or Exim which accept such messages. */
{ "lmtpsocket", "{configdirectory}/socket/lmtp", STRING, "2.3.17" }
/* Unix domain socket that lmtpd listens on, used by deliver(8). This should
match the path specified in cyrus.conf(5). */
{ "lmtptxn_timeout", "5m", DURATION, "3.1.8" }
/* Timeout used during a lmtp transaction to a remote backend (e.g. in a
murder environment). Can be used to prevent hung lmtpds on proxy hosts
when a backend server becomes unresponsive during a lmtp transaction.
The default is 5 minutes - change to zero for infinite.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "lock_debugtime", NULL, STRING, "3.1.4" }
/* A floating point number of seconds. If set, time how long we wait for
any lock, and syslog the filename and time if it's longer than this
value. The default of NULL means not to time locks. */
# xxx how does this tie into virtual domains?
{ "loginrealms", "", STRING, "2.3.17" }
/* The list of remote realms whose users may authenticate using cross-realm
authentication identifiers. Separate each realm name by a space. (A
cross-realm identity is considered any identity returned by SASL
with an "@" in it.). */
{ "loginuseacl", 0, SWITCH, "2.3.17" }
/* If enabled, any authentication identity which has \fBa\fR rights on a
user's INBOX may log in as that user. */
{ "logtimestamps", 0, SWITCH, "2.3.17" }
/* Include notations in the protocol telemetry logs indicating the number of
seconds since the last command or response. */
{ "mailbox_default_options", 0, INT, "2.3.17" }
/* Default "options" field for the mailbox on create. You'll want to know
what you're doing before setting this, but it can apply some default
annotations like duplicate suppression */
{ "mailbox_initial_flags", NULL, STRING, "2.5.0" }
/* space-separated list of permanent flags which will be pre-set in every
newly created mailbox. If you know you will require particular
flag names then this avoids a possible race condition against a client
that fills the entire 128 available slots. Default is NULL, which is
no flags. Example: $Label1 $Label2 $Label3 NotSpam Spam */
{ "mailbox_legacy_dirs", 0, SWITCH, "3.5.2" }
/* if enabled, new mailboxes without parents will be created with legacy paths.
sub mailboxes of users will still inherit the parent legacy setting */
{ "mailbox_maxmessages_addressbook", 0, INT, "3.3.0" }
/* Limit the number of messages that may exist in a single mailbox of
"addressbook" type. Default (0) means no limit. This limit applies
after quotas are checked, so if you have both quota limits and this
set, then you will be denied if you are either over quota or over
this per-mailbox count. */
{ "mailbox_maxmessages_calendar", 0, INT, "3.3.0" }
/* Limit the number of messages that may exist in a single mailbox of
"calendar" type. Default (0) means no limit. This limit applies
after quotas are checked, so if you have both quota limits and this
set, then you will be denied if you are either over quota or over
this per-mailbox count. */
{ "mailbox_maxmessages_email", 0, INT, "3.3.0" }
/* Limit the number of messages that may exist in a single mailbox of
"email" (normal) type. Default (0) means no limit. This limit applies
after quotas are checked, so if you have both quota limits and this
set, then you will be denied if you are either over quota or over
this per-mailbox count. */
{ "mailnotifier", NULL, STRING, "2.3.17" }
/* Notifyd(8) method to use for "MAIL" notifications. If not set, "MAIL"
notifications are disabled. */
{ "master_bind_errors_fatal", 0, SWITCH, "3.3.0" }
/* If enabled, failure to bind a port during startup is treated as a fatal
error, causing master to shut down immediately. The default is to keep
running, with the affected service disabled until the next SIGHUP causes
it to retry.
.PP
Note that this only applies during startup. New services that fail to
come up in response to a reconfig+SIGHUP will just be logged and disabled
like the default behaviour, without causing master to exit. */
{ "maxheaderlines", 1000, INT, "2.3.17" }
/* Maximum number of lines of header that will be processed into cache
records. Default 1000. If set to zero, it is unlimited.
If a message hits the limit, an error will be logged and the rest of
the lines in the header will be skipped. This is to avoid malformed
messages causing giant cache records */
{ "maxlogins_per_host", 0, INT, "2.5.0" }
/* Maximum number of logged in sessions allowed per host,
zero means no limit */
{ "maxlogins_per_user", 0, INT, "2.5.0" }
/* Maximum number of logged in sessions allowed per user,
zero means no limit */
{ "maxmessagesize", 0, INT, "2.3.17" }
/* Maximum incoming LMTP message size. If non-zero, lmtpd will reject
messages larger than \fImaxmessagesize\fR bytes. If set to 0, this
will allow messages of any size (the default). */
{ "maxquoted", 131072, INT, "2.3.17" }
/* Maximum size of a single quoted string for the parser. Default 128k */
{ "maxword", 131072, INT, "2.3.17" }
/* Maximum size of a single word for the parser. Default 128k */
{ "mboxkey_db", "twoskip", STRINGLIST("skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for mailbox keys. */
{ "mboxlist_db", "twoskip", STRINGLIST("flat", "skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the mailbox list. */
{ "mboxlist_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the mailboxes db file. If not specified
will be configdirectory/mailboxes.db */
{ "mboxname_lockpath", NULL, STRING, "2.4.0" }
/* Path to mailbox name lock files (default $conf/lock) */
{ "metapartition_files", "", BITFIELD("header", "index", "cache", "expunge", "squat", "annotations", "lock", "dav", "archivecache"), "3.0.0" }
/* Space-separated list of metadata files to be stored on a
\fImetapartition\fR rather than in the mailbox directory on a spool
partition. */
# Commented out - there's no such thing as "metapartition-name",
# but we need this for the man page
# { "metapartition-name", NULL, STRING, "2.3.17" }
/* The pathname of the metadata partition \fIname\fR, corresponding to
spool partition \fBpartition-name\fR. For any mailbox residing in
a directory on \fBpartition-name\fR, the metadata files listed in
\fImetapartition_files\fR will be stored in a corresponding directory on
\fBmetapartition-name\fR. Note that not every
\fBpartition-name\fR option is required to have a corresponding
\fBmetapartition-name\fR option, so that you can selectively choose
which spool partitions will have separate metadata partitions. */
{ "mupdate_authname", NULL, STRING, "2.3.17" }
/* The SASL username (Authentication Name) to use when authenticating to the
mupdate server (if needed). */
{ "mupdate_config", "standard", ENUM("standard", "unified", "replicated"), "2.3.17" }
/* The configuration of the mupdate servers in the Cyrus Murder.
The "standard" config is one in which there are discreet frontend
(proxy) and backend servers. The "unified" config is one in which
a server can be both a frontend and backend. The "replicated"
config is one in which multiple backend servers all share the same
mailspool, but each have their own "replicated" copy of
mailboxes.db. */
{ "munge8bit", 1, SWITCH, "2.3.17" }
/* If enabled, lmtpd munges messages with 8-bit characters in the
headers. The 8-bit characters are changed to `X'. If
\fBreject8bit\fR is enabled, setting \fBmunge8bit\fR has no effect.
(A proper solution to non-ASCII characters in headers is offered by
RFC 2047 and its predecessors.) */
# xxx badly worded
{ "mupdate_connections_max", 128, INT, "2.3.17" }
/* The max number of connections that a mupdate process will allow, this
is related to the number of file descriptors in the mupdate process.
Beyond this number connections will be immediately issued a BYE response. */
{ "mupdate_password", NULL, STRING, "2.3.17" }
/* The SASL password (if needed) to use when authenticating to the
mupdate server. */
{ "mupdate_port", 3905, INT, "2.3.17" }
/* The port of the mupdate server for the Cyrus Murder */
{ "mupdate_realm", NULL, STRING, "2.3.17" }
/* The SASL realm (if needed) to use when authenticating to the mupdate
server. */
{ "mupdate_retry_delay", 20, INT, "2.3.17" }
/* The base time to wait between connection retries to the mupdate server. */
{ "mupdate_server", NULL, STRING, "2.3.17" }
/* The mupdate server for the Cyrus Murder */
{ "mupdate_username", "", STRING, "2.3.17" }
/* The SASL username (Authorization Name) to use when authenticating to
the mupdate server */
{ "mupdate_workers_max", 50, INT, "2.3.17" }
/* The maximum number of mupdate worker threads (overall) */
{ "mupdate_workers_maxspare", 10, INT, "2.3.17" }
/* The maximum number of idle mupdate worker threads */
{ "mupdate_workers_minspare", 2, INT, "2.3.17" }
/* The minimum number of idle mupdate worker threads */
{ "mupdate_workers_start", 5, INT, "2.3.17" }
/* The number of mupdate worker threads to start */
{ "netscapeurl", NULL, STRING, "2.3.17" }
/* If enabled at compile time, this specifies a URL to reply when
Netscape asks the server where the mail administration HTTP server
is. Administrators should set this to a local resource. */
{ "newsaddheaders", "to", BITFIELD("to", "replyto"), "2.5.0" }
/* Space-separated list of headers to be added to incoming usenet
articles. Added \fITo:\fR headers will contain email
delivery addresses corresponding to each newsgroup in the
\fINewsgroups:\fR header. Added \fIReply-To:\fR headers will
contain email delivery addresses corresponding to each newsgroup in
the \fIFollowup-To:\fR or \fINewsgroups:\fR header. If the
specified header(s) already exist in an article, the email
delivery addresses will be appended to the original header body(s).
.br
.sp
This option applies if and only if the \fBnewspostuser\fR option is
set. */
{ "newsgroups", "*", STRING, "2.4.0" }
/* A wildmat pattern specifying which mailbox hierarchies should be
treated as newsgroups. Only mailboxes matching the wildmat will
accept and/or serve articles via NNTP. If not set, a default
wildmat of "*" (ALL shared mailboxes) will be used. If the
\fInewsprefix\fR option is also set, the default wildmat will be
translated to "<newsprefix>.*" */
{ "newsmaster", "news", STRING, "2.3.17" }
/* Userid that is used for checking access controls when executing
Usenet control messages. For instance, to allow articles to be
automatically deleted by cancel messages, give the "news" user
the 'd' right on the desired mailboxes. To allow newsgroups to be
automatically created, deleted and renamed by the corresponding
control messages, give the "news" user the 'c' right on the desired
mailbox hierarchies. */
{ "newspeer", NULL, STRING, "2.3.17" }
/* A list of whitespace-separated news server specifications to which
articles should be fed. Each server specification is a string of
the form [user[:pass]@]host[:port][/wildmat] where 'host' is the fully
qualified hostname of the server, 'port' is the port on which the
server is listening, 'user' and 'pass' are the authentication
credentials and 'wildmat' is a pattern that specifies which groups
should be fed. If no 'port' is specified, port 119 is used. If
no 'wildmat' is specified, all groups are fed. If 'user' is specified
(even if empty), then the NNTP POST command will be used to feed
the article to the server, otherwise the IHAVE command will be
used.
.br
.sp
A '@' may be used in place of '!' in the wildmat to prevent feeding
articles cross-posted to the given group, otherwise cross-posted
articles are fed if any part of the wildmat matches. For example,
the string "peer.example.com:*,!control.*,@local.*" would feed all
groups except control messages and local groups to
peer.example.com. In the case of cross-posting to local groups,
these articles would not be fed. */
{ "newspostuser", NULL, STRING, "2.5.0" }
/* Userid used to deliver usenet articles to newsgroup folders
(usually via lmtp2nntp). For example, if set to "post", email sent
to "post+comp.mail.imap" would be delivered to the "comp.mail.imap"
folder.
.br
.sp
When set, the Cyrus NNTP server will add the header(s) specified in
the \fBnewsaddheaders\fR option to each incoming usenet article.
The added header(s) will contain email delivery addresses
corresponding to each relevant newsgroup. If not set, no headers
are added to usenet articles. */
{ "newsprefix", NULL, STRING, "2.3.17" }
/* Prefix to be prepended to newsgroup names to make the corresponding
IMAP mailbox names. */
{ "newsrc_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the newsrc db file. If not specified,
will be configdirectory/fetchnews.db */
{ "nntptimeout", "3m", DURATION, "3.1.8" }
/* Set the length of the NNTP server's inactivity autologout timer.
The minimum value is 3 minutes, also the default.
.PP
For backward compatibility, if no unit is specified, minutes is
assumed. */
{ "notesmailbox", NULL, STRING, "3.0.0" }
/* The top level mailbox in each user's account which is used to store
* Apple-style Notes. Default is blank (disabled) */
{ "notifysocket", "{configdirectory}/socket/notify", STRING, "2.3.17" }
/* Unix domain socket that the mail notification daemon listens on. */
{ "notify_external", NULL, STRING, "2.4.0" }
/* Path to the external program that notifyd(8) will call to send mail
notifications.
.PP
The external program will be called with the following
command line options:
.TP
.BI \-c " class"
.\"
.TP
.BI \-p " priority"
.\"
.TP
.BI \-u " user"
.\"
.TP
.BI \-m " mailbox"
.PP
And the notification message will be available on \fIstdin\fR.
*/
# Commented out - there's no such thing as "partition-name", but we need
# this for the man page
# { "partition-name", NULL, STRING, "2.3.17" }
/* The pathname of the partition \fIname\fR. At least one partition
pathname MUST be specified. If the \fBdefaultpartition\fR option is
used, then its pathname MUST be specified. For example, if the
value of the \fBdefaultpartion\fR option is \fBpart1\fR, then the
\fBpartition-part1\fR field is required. */
{ "partition_select_mode", "freespace-most", STRINGLIST("random", "freespace-most", "freespace-percent-most", "freespace-percent-weighted", "freespace-percent-weighted-delta"), "2.5.0" }
/* Partition selection mode.
.PP
.IP \fIrandom\fR 5
(pseudo-)random selection
.\"
.IP \fIfreespace-most\fR 5
partition with the most free space (KiB)
.\"
.IP \fIfreespace-percent-most\fR 5
partition with the most free space (%)
.\"
.IP \fIfreespace-percent-weighted\fR 5
each partition is weighted according to its free space (%); the more free space
the partition has, the more chances it has to be selected
.\"
.IP \fIfreespace-percent-weighted-delta\fR 5
each partition is weighted according to its difference of free space (%)
compared to the most used partition; the more the partition is lagging behind
the most used partition, the more chances it has to be selected
.PP
Note that actually even the most used partition has a few chances to be
selected, and those chances increase when other partitions get closer
*/
{ "partition_select_exclude", NULL, STRING, "2.5.0" }
/* List of partitions to exclude from selection mode. */
{ "partition_select_usage_reinit", 0, INT, "2.5.0" }
/* For a given session, number of \fBoperations\fR (e.g. partition selection)
for which partitions usage data are cached. */
{ "partition_select_soft_usage_limit", 0, INT, "2.5.0" }
/* Limit of partition usage (%): if a partition is over that limit, it is
automatically excluded from selection mode.
.PP
If all partitions are over that limit, this feature is not used anymore.
*/
{ "plaintextloginpause", NULL, DURATION, "3.1.8" }
/* Time to pause after a successful plaintext login. For systems that
support strong authentication, this permits users to perceive a cost
of using plaintext passwords. (This does not affect the use of PLAIN
in SASL authentications.)
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "plaintextloginalert", NULL, STRING, "2.3.17" }
/* Message to send to client after a successful plaintext login. */
{ "popexpiretime", "-1", DURATION, "3.1.8" }
/* The duration advertised as being the minimum a message may be
left on the POP server before it is deleted (via the CAPA command,
defined in the POP3 Extension Mechanism, which some clients may
support). This duration has a granularity of whole days, with partial
days truncated (so e.g. "45m" is effectively "0d"). "NEVER", the
default, may be specified with a negative number.
.PP
The Cyrus POP3 server never deletes mail, no matter what the value of
this parameter is. However, if a site implements a less liberal policy,
it needs to change this parameter accordingly.
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
{ "popminpoll", NULL, DURATION, "3.1.8" }
/* Set the minimum amount of time the server forces users to wait
between successive POP logins.
.PP
For backward compatibility, if no unit is specified, minutes is
assumed. */
{ "popsubfolders", 0, SWITCH, "2.3.17" }
/* Allow access to subfolders of INBOX via POP3 by using
userid+subfolder syntax as the authentication/authorization id. */
{ "poppollpadding", 1, INT, "2.3.17" }
/* Create a softer minimum poll restriction. Allows \fIpoppollpadding\fR
connections before the minpoll restriction is triggered. Additionally,
one padding entry is recovered every \fIpopminpoll\fR minutes.
This allows for the occasional polling rate faster than popminpoll,
(i.e., for clients that require a send/receive to send mail) but still
enforces the rate long-term. Default is 1 (disabled).
.br
.sp
The easiest way to think of it is a queue of past connections, with one
slot being filled for every connection, and one slot being cleared
every \fIpopminpoll\fR minutes. When the queue is full, the user
will not be able to check mail again until a slot is cleared. If the
user waits a sufficient amount of time, they will get back many or all
of the slots. */
{ "poptimeout", "10m", DURATION, "3.1.8" }
/* Set the length of the POP server's inactivity autologout timer.
The minimum value is 10 minutes, the default.
.PP
For backward compatibility, if no unit is specified, minutes is
assumed. */
{ "popuseacl", 0, SWITCH, "2.3.17" }
/* Enforce IMAP ACLs in the pop server. Due to the nature of the POP3
protocol, the only rights which are used by the pop server are 'r',
't', and 's' for the owner of the mailbox. The 'r' right allows the
user to open the mailbox and list/retrieve messages. The 't' right
allows the user to delete messages. The 's' right allows messages
retrieved by the user to have the \\Seen flag set (only if
\fIpopuseimapflags\fR is also enabled). */
{ "popuseimapflags", 0, SWITCH, "2.3.17" }
/* If enabled, the pop server will set and obey IMAP flags. Messages
having the \\Deleted flag are ignored as if they do not exist.
Messages that are retrieved by the client will have the \\Seen flag
set. All messages will have the \\Recent flag unset. */
{ "postmaster", "postmaster", STRING, "2.3.17" }
/* Username that is used as the 'From' address in rejection MDNs produced
by sieve. */
{ "postspec", NULL, STRING, "2.3.17" }
{ "postuser", "", STRING, "2.3.17" }
/* Userid used to deliver messages to shared folders. For example, if
set to "bb", email sent to "bb+shared.blah" would be delivered to
the "shared.blah" folder. By default, an email address of
"+shared.blah" would be used. */
{ "proc_path", NULL, STRING, "2.5.0" }
/* Path to proc directory. Default is NULL - must be an absolute path
if specified. If not specified, the path $configdirectory/proc/ will be
used. */
{ "prometheus_enabled", 0, SWITCH, "3.1.2" }
/* Whether tracking of service metrics for Prometheus is enabled. */
{ "prometheus_need_auth", "admin", STRINGLIST("none", "user", "admin"), "3.1.2" }
/* Authentication level required to fetch Prometheus metrics. */
{ "prometheus_update_freq", "10s", DURATION, "3.1.8" }
/* Frequency in at which promstatsd should re-collate its statistics
report. The minimum value is 1 second, the default is 10 seconds.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
*/
{ "prometheus_stats_dir", NULL, STRING, "3.1.2" }
/* Directory to use for gathering prometheus statistics. If specified,
must be an absolute path. If not specified, the default path
$configdirectory/stats/ will be used. It may be advantageous to locate this
directory on ephemeral storage. */
{ "proxy_authname", "proxy", STRING, "2.3.17" }
/* The authentication name to use when authenticating to a backend server
in the Cyrus Murder. */
{ "proxy_compress", 0, SWITCH, "2.3.17" }
/* Try to enable protocol-specific compression when performing a client
connection to a backend server in the Cyrus Murder.
.PP
Note that this should only be necessary over slow network
connections. Also note that currently only IMAP and MUPDATE support
compression. */
{ "proxy_password", NULL, STRING, "2.3.17" }
/* The default password to use when authenticating to a backend server
in the Cyrus Murder. May be overridden on a host-specific basis using
the hostname_password option. */
{ "proxy_realm", NULL, STRING, "2.3.17" }
/* The authentication realm to use when authenticating to a backend server
in the Cyrus Murder */
{ "proxyd_allow_status_referral", 0, SWITCH, "2.3.17" }
/* Set to true to allow proxyd to issue referrals to clients that support it
when answering the STATUS command. This is disabled by default since
some clients issue many STATUS commands in a row, and do not cache the
connections that these referrals would cause, thus resulting in a higher
authentication load on the respective backend server. */
{ "proxyd_disable_mailbox_referrals", 0, SWITCH, "2.3.17" }
/* Set to true to disable the use of mailbox-referrals on the
proxy servers. */
{ "proxyservers", NULL, STRING, "2.3.17" }
/* A list of users and groups that are allowed to proxy for other
users, separated by spaces. Any user listed in this will be
allowed to login for any other user: use with caution.
In a standard murder this option should ONLY be set on backends.
DO NOT SET on frontends or things won't work properly. */
{ "pts_module", "afskrb", STRINGLIST("afskrb", "ldap"), "2.3.17" }
/* The PTS module to use. */
{ "ptloader_sock", NULL, STRING, "2.3.17" }
/* Unix domain socket that ptloader listens on.
(defaults to configdirectory/ptclient/ptsock) */
{ "ptscache_db", "twoskip", STRINGLIST("skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the pts cache. */
{ "ptscache_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the ptscache db file. If not specified,
will be configdirectory/ptscache.db */
{ "ptscache_timeout", "3h", DURATION, "3.1.8" }
/* The timeout for the PTS cache database when using the auth_krb_pts
authorization method (default: 3 hours).
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "ptskrb5_convert524", 1, SWITCH, "2.3.16" }
/* When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
do the final 524 conversion to get a n AFS style name (using '.' instead
of '/', and using short names */
{ "ptskrb5_strip_default_realm", 1, SWITCH, "2.3.17" }
/* When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
strip the default realm from the userid (this does not affect the stripping
of realms specified by the afspts_localrealms option) */
{ "qosmarking", "cs0", ENUM("cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "af11", "af12", "af13", "af21", "af22", "af23", "af31", "af32", "af33", "af41", "af42", "af43", "ef"), "2.5.0" }
/* This specifies the Class Selector or Differentiated Services Code Point
designation on IP headers (in the ToS field). */
{ "quota_db", "quotalegacy", STRINGLIST("flat", "skiplist", "sql", "quotalegacy", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for quotas. */
{ "quota_db_path", NULL, STRING, "2.5.0" }
/* The absolute path for the quota database (if you choose a single-file
quota DB type - or the base path if you choose quotalegacy). If
not specified will be configdirectory/quotas.db or configdirectory/quota/ */
{ "quota_use_conversations", 0, SWITCH, "3.3.0" }
/* If conversations it enabled and quotaroot is a user folder, use the
conversations quota counts, which count multiple copies of exactly the
same message (by GUID) as only one */
{ "quotawarn", 90, INT, "2.3.17" }
/* The percent of quota utilization over which the server generates
warnings. */
{ "quotawarnkb", 0, INT, "2.3.17" }
/* The maximum amount of free space (in kB) at which to give a quota
warning (if this value is 0, or if the quota is smaller than this
amount, then warnings are always given). */
{ "quotawarnmsg", 0, INT, "2.5.0" }
/* The maximum amount of messages at which to give a quota warning
(if this value is 0, or if the quota is smaller than this
amount, then warnings are always given). */
{ "readonly", 0, SWITCH, "3.3.0" }
/* If enabled, all IMAP, POP and JMAP connections are read-only,
* no writes allowed */
{ "reject8bit", 0, SWITCH, "2.3.17" }
/* If enabled, lmtpd rejects messages with 8-bit characters in the
headers. */
{ "restore_authname", NULL, STRING, "3.0.0" }
/* The authentication used by the restore tool when authenticating
to an IMAP/sync server. */
{ "restore_password", NULL, STRING, "3.0.0" }
/* The password used by the restore tool when authenticating to an
IMAP/sync server. */
{ "restore_realm", NULL, STRING, "3.0.0" }
/* The authentication realm used by the restore tool when
authenticating to an IMAP/sync server. */
{ "reverseacls", 0, SWITCH, "3.0.0" }
/* At startup time, ctl_cyrusdb -r will check this value and it
will either add or remove reverse ACL pointers from mailboxes.db */
{ "rfc2046_strict", 0, SWITCH, "2.3.17" }
/* If enabled, imapd will be strict (per RFC 2046) when matching MIME
boundary strings. This means that boundaries containing other
boundaries as substrings will be treated as identical. Since
enabling this option will break some messages created by Eudora 5.1
(and earlier), it is recommended that it be left disabled unless
there is good reason to do otherwise. */
{ "rfc2047_utf8", 0, SWITCH, "3.0.0" }
/* If enabled, imapd will parse any non-encoded character sequence in
MIME header values as UTF8. This is useful for installations that
either advertise the UTF8SMTP (RFC 5335) extension or receive mails
with improperly escaped UTF-8 byte sequences. It is recommended that
this option is left disabled unless there is good reason to do
otherwise. */
{ "rfc3028_strict", 1, SWITCH, "2.3.17" }
/* If enabled, Sieve will be strict (per RFC 3028) with regards to
which headers are allowed to be used in address and envelope tests.
This means that only those headers which are defined to contain addresses
will be allowed in address tests and only "to" and "from" will be
allowed in envelope tests. When disabled, ANY grammatically correct header
will be allowed. */
{ "rss_feedlist_template", NULL, STRING, "2.5.0" }
/* File containing HTML that will be used as a template for displaying
the list of available RSS feeds. A single instance of the variable
%RSS_FEEDLIST% should appear in the file, which will be replaced by
a nested unordered list of feeds. The toplevel unordered list will
be tagged with an id of "feed" (<ul id='feed'>) which can be used
by stylesheet(s) in your template. The dynamically created list of
feeds based on the HTML template will be accessible at the "/rss"
URL on the server. */
{ "rss_feeds", "*", STRING, "2.5.0" }
/* A wildmat pattern specifying which mailbox hierarchies should be
treated as RSS feeds. Only mailboxes matching the wildmat will
have their messages available via RSS. If not set, a default
wildmat of "*" (ALL mailboxes) will be used. */
{ "rss_maxage", NULL, DURATION, "3.1.8" }
/* Maximum age of items to display in an RSS channel. If non-zero,
httpd will only display items received within this time period.
If set to 0, all available items will be displayed (the default).
.PP
For backward compatibility, if no unit is specified, days is
assumed. */
{ "rss_maxitems", 0, INT, "2.5.0" }
/* Maximum number of items to display in an RSS channel. If non-zero,
httpd will display no more than the \fIrss_maxitems\fR most recent
items. If set to 0, all available items will be displayed (the
default). */
{ "rss_maxsynopsis", 0, INT, "2.5.0" }
/* Maximum RSS item synopsis length. If non-zero, httpd will display
no more than the first \fIrss_maxsynopsis\fR characters of an
item's synopsis. If set to 0, the entire synopsis will be
displayed (the default). */
{ "rss_realm", NULL, STRING, "2.5.0" }
/* The realm to present for HTTP authentication of RSS feeds. If not
set (the default), the value of the "servername" option will be
used.*/
# Commented out - used by libsasl
# { "sasl_auto_transition", 0, SWITCH, "2.3.17" }
/* If enabled, the SASL library will automatically create authentication
secrets when given a plaintext password. See the SASL documentation. */
{ "sasl_maximum_layer", 256, INT, "2.3.17" }
/* Maximum SSF (security strength factor) that the server will allow a
client to negotiate. */
{ "sasl_minimum_layer", 0, INT, "2.3.17" }
/* The minimum SSF that the server will allow a client to negotiate.
A value of 1 requires integrity protection; any higher value
requires some amount of encryption. */
# Commented out - used by libsasl
# { "sasl_option", 0, STRING, "2.3.17" }
/* Any SASL option can be set by preceding it with \fBsasl_\fR. This
file overrides the SASL configuration file. */
# Commented out - used by libsasl
# { "sasl_pwcheck_method", NULL, STRING, "2.3.17" }
/* The mechanism used by the server to verify plaintext passwords.
Possible values include "auxprop", "saslauthd", and "pwcheck". */
{ "search_batchsize", 20, INT, "3.0.0" }
/* The number of messages to be indexed in one batch (default 20).
Note that long batches may delay user commands or mail delivery. */
{ "search_attachment_extractor_url", NULL, STRING, "3.3.1" }
/* A HTTP or HTTPS URL to extract search text from rich text attachments
and other media during search indexing. The server at this URL must
implement the following protocol:
1. For each attachment of an email, Cyrus sends a GET request to the
URL <extractor-url>/<cyrus-id>, where <extractor-url> is the
configured URL and <cyrus-id> is a Cyrus-chosen path segment that
uniquely identifies this attachment.
2. If the extractor already has a cached plain text extract of the
attachment identified by <cyrus-id> then it may return HTTP status
code 200 (OK) and the plain text extract with a Content-Type
"text/plain" header. Otherwise it must return HTTP status 404 (Not Found).
3. If Cyrus receives the HTTP status code 404 (Not Found), then it sends
a PUT request to the same URL as previously. The PUT request body
contains the decoded, binary body of the attachment. The Content-Type
request header has the same value as declared in the MIME part
headers, including any type parameters.
4. The extractor must return the plain text extract with either HTTP status
200 (OK) or 201 (Created) and a Content-Type "text/plain" header.
If no text can be extracted, then the extractor may return any return code
in the range 4xx, or 200 and an empty response body.
Any other HTTP status code is treated as an error. For performance
reasons, the Cyrus indexer attempts to keep-alive the TCP connection
to the extractor.
Xapian only.
*/
{ "search_index_language", 0, SWITCH, "3.3.1" }
/*
If enabled, then messages bodies are stemmed by detected language
in addition to the default English stemmer.
Xapian only.
*/
{ "search_index_parts", 0, SWITCH, "3.2.1", "3.2.1" }
/*
Deprecated. No longer used.
*/
{ "search_index_skip_domains", NULL, STRING, "3.3.1" }
/*
A space separated list of domains - if set, any users in the listed domains
will be skipped when indexing.
*/
{ "search_index_skip_users", NULL, STRING, "3.3.1" }
/*
A space separated list of usernames - if set, any users in the list
will be skipped when indexing.
*/
{ "search_query_language", 0, SWITCH, "3.3.0", "3.3.0" }
/*
Deprecated. No longer used.
*/
{ "search_normalisation_max", 1000, INT, "3.0.0" }
/* A resource bound for the combinatorial explosion of search expression
tree complexity caused by normalising expressions with many OR nodes.
These can use more CPU time to optimise than they save IO time in scanning
folders. */
{ "search_engine", "none", ENUM("none", "squat", "xapian"), "3.1.2" }
/* The indexing engine used to speed up searching. */
{ "search_fuzzy_always", 0, SWITCH, "3.1.5" }
/* Whether to enable RFC 6203 FUZZY search for all IMAP SEARCH. If turned
on, search attributes will be searched using FUZZY search by default.
If turned off, clients have to explicitly use the FUZZY search key to
enable fuzzy search for regular SEARCH commands. */
{ "search_index_headers", 1, SWITCH, "3.0.0" }
/* Whether to index headers other than From, To, Cc, Bcc, and Subject.
Experiment shows that some headers such as Received and DKIM-Signature
can contribute up to 2/3rds of the index size but almost nothing to
the utility of searching. Note that if header indexing is disabled,
headers can still be searched, the searches will just be slower.
*/
{ "search_indexed_db", "twoskip", STRINGLIST("flat", "skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the search latest indexed uid state. Xapian only. */
{ "search_maxtime", NULL, STRING, "3.0.0" }
/* The maximum number of seconds to run a search for before aborting. Default
of no value means search "forever" until other timeouts. */
{ "search_maxsize", 4096, INT, "3.5.0" }
/* The maximum size in kilobytes to index for each message part. Message
contents that occur after this byte offset will not be indexed or
search snippets generated from.
Default is 4Mb. Xapian-only. */
{ "search_queryscan", 5000, INT, "3.1.7" }
/* The minimum number of records require to do a direct scan of all G keys
* rather than indexed lookups. A value of 0 means always do indexed lookups.
*/
{ "search_skipdiacrit", 1, SWITCH, "2.5.0" }
/* When searching, should diacriticals be stripped from the search
terms. The default is "true", a search for "hav" will match
"Håvard". This is not RFC 5051 compliant, but it backwards
compatible, and may be preferred by some sites. */
{ "search_skiphtml", 0, SWITCH, "3.0.0" }
/* If enabled, HTML parts of messages are skipped, i.e. not indexed and
not searchable. Otherwise, they're indexed. */
{ "search_whitespace", "merge", ENUM("skip", "merge", "keep"), "2.5.0" }
/* When searching, how whitespace should be handled. Options are:
"skip" (default in 2.3 and earlier series) - where a search for
"equi" would match "the quick brown fox". "merge" - the default,
where "he qu" would match "the quick brownfox", and "keep",
where whitespace must match exactly. The default of "merge" is
recommended for most cases - it's a good compromise which
keeps words separate. */
{ "search_snippet_length", 255, INT, "3.0.0" }
/* The maximum byte length of a snippet generated by the XSNIPPETS
command. Only supported by the Xapian search backend, which
attempts to always fill search_snippet_length bytes in the
generated snippet. */
{ "search_stopword_path", NULL, STRING, "3.1.7" }
/* The absolute base path to the search stopword lists. If not specified,
no stopwords will be taken into account during search indexing. Currently,
the only supported and default stop word file is english.txt. */
# Commented out - there's no such thing as "searchpartition-name",
# but we need this for the man page
# { "searchpartition-name", NULL, STRING, "3.1.4" }
/* The pathname where to store the xapian search indexes of \fIsearchtier\fR
for mailboxes of partition \fIname\fR. This must be configured for the
\fIdefaultsearchtier\fR and any additional search tier (see squatter for
details).
.PP
For example: if \fIdefaultpartition\fR is defined as part1 and
\fIdefaultsearchtier\fR as tier1 then the configuration must contain
an entry \fItier1searchpartition-part1\fR that defines the path where to
store this tier1's search index for the part1 partition.
.PP
This option MUST be specified for xapian search. */
{ "seenstate_db", "twoskip", STRINGLIST("flat", "skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the seen state. */
{ "sendmail", "/usr/lib/sendmail", STRING, "2.3.17" }
/* The pathname of the sendmail executable. Sieve invokes sendmail
for sending rejections, redirects and vacation responses. */
{ "sendmail_auth_id", "CYRUS_SENDMAIL_AUTH_ID", STRING, "3.1.3" }
/* The name of an environment variable to set when invoking sendmail.
The value of this environment variable will contain the user id
of the currently authenticated user. If no user is authenticated
the environment variable is not set. */
{ "serverlist", NULL, STRING, "2.3.17" }
/* Whitespace separated list of backend server names. Used for
finding server with the most available free space for proxying
CREATE. */
{ "serverlist_select_mode", "freespace-most", STRINGLIST("random", "freespace-most", "freespace-percent-most", "freespace-percent-weighted", "freespace-percent-weighted-delta"), "2.5.0" }
/* Server selection mode.
.PP
.IP \fIrandom\fR 5
(pseudo-)random selection
.\"
.IP \fIfreespace-most\fR 5
backend with the most (total) free space (KiB)
.\"
.IP \fIfreespace-percent-most\fR 5
backend whose partition has the most free space (%)
.\"
.IP \fIfreespace-percent-weighted\fR 5
same as for partition selection, comparing the free space (%) of the least used
partition of each backend
.\"
.IP \fIfreespace-percent-weighted-delta\fR 5
same as for partition selection, comparing the free space (%) of the least used
partition of each backend.
.PP
*/
{ "serverlist_select_usage_reinit", 0, INT, "2.5.0" }
/* For a given session, number of \fBoperations\fR (e.g. backend selection)
for which backend usage data are cached. */
{ "serverlist_select_soft_usage_limit", 0, INT, "2.5.0" }
/* Limit of backend usage (%): if a backend is over that limit, it is
automatically excluded from selection mode.
.PP
If all backends are over that limit, this feature is not used anymore.
*/
{ "servername", NULL, STRING, "2.3.17" }
/* This is the hostname visible in the greeting messages of the POP,
IMAP and LMTP daemons. If it is unset, then the result returned
from gethostname(2) is used. This is also the value used by murder
clusters to identify the host name. It should be resolvable by
DNS to the correct host, and unique within an active cluster. If
you are using low level replication (e.g. drbd) then it should be
the same on each copy and the DNS name should also be moved to
the new master on failover. */
{ "serverinfo", "on", ENUM("off", "min", "on"), "2.3.17" }
/* The server information to display in the greeting and capability
responses. Information is displayed as follows:
.IP
"off" = no server information in the greeting or capabilities
.br
"min" = \fIservername\fR in the greeting; no server information in the capabilities
.br
"on" = \fIservername\fR and product version in the greeting;
product version in the capabilities
.PP
*/
{ "sharedprefix", "Shared Folders", STRING, "2.3.17" }
/* If using the alternate IMAP namespace, the prefix for the shared
namespace. The hierarchy delimiter will be automatically appended.
*/
{ "sieve_allowreferrals", 1, SWITCH, "2.3.17" }
/* If enabled, timsieved will issue referrals to clients when the
user's scripts reside on a remote server (in a Murder).
Otherwise, timsieved will proxy traffic to the remote server. */
{ "sieve_duplicate_max_expiration", "90d", DURATION, "3.1.8" }
/* Maximum expiration time for duplicate message tracking records.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
*/
{ "sieve_extensions", "fileinto reject vacation vacation-seconds notify include envelope environment body relational regex subaddress copy date index imap4flags mailbox mboxmetadata servermetadata variables editheader extlists duplicate ihave fcc special-use redirect-dsn redirect-deliverby mailboxid vnd.cyrus.log vnd.cyrus.jmapquery vnd.cyrus.imip snooze", BITFIELD("fileinto", "reject", "vacation", "vacation-seconds", "notify", "include", "envelope", "environment", "body", "relational", "regex", "subaddress", "copy", "date", "index", "imap4flags=imapflags", "mailbox", "mboxmetadata", "servermetadata", "variables", "editheader", "extlists", "duplicate", "ihave", "fcc", "special-use", "redirect-dsn", "redirect-deliverby", "mailboxid", "vnd.cyrus.log=x-cyrus-log", "vnd.cyrus.jmapquery=x-cyrus-jmapquery", "vnd.cyrus.imip", "snooze=vnd.cyrus.snooze=x-cyrus-snooze"), "UNRELEASED" }
/* Space-separated list of Sieve extensions allowed to be used in
sieve scripts, enforced at submission by timsieved(8). Any
previously installed script will be unaffected by this option and
will continue to execute regardless of the extensions used. This
option has no effect on options that are disabled at compile time
(e.g., "regex"). */
{ "sieve_folder", "#sieve", STRING, "UNRELEASED" }
/* The name of the folder for storing Sieve scripts (#sieve) */
{ "sieve_maxscriptsize", 32, INT, "2.3.17" }
/* Maximum size (in kilobytes) any sieve script can be, enforced at
submission by timsieved(8). */
{ "sieve_maxscripts", 5, INT, "2.3.17" }
/* Maximum number of sieve scripts any user may have, enforced at
submission by timsieved(8). */
{ "sieve_utf8fileinto", 0, SWITCH, "2.3.17" }
/* If enabled, the sieve engine expects folder names for the
\fIfileinto\fR action in scripts to use UTF8 encoding. Otherwise,
modified UTF7 encoding should be used. */
{ "sieve_sasl_send_unsolicited_capability", 0, SWITCH, "2.3.17" }
/* If enabled, timsieved will emit a capability response after a successful
SASL authentication, per draft-martin-managesieve-12.txt . */
{ "sieve_use_lmtp_reject", 1, SWITCH, "3.1.1" }
/* Enabled by default. If reject can be done via LMTP, then return a 550
rather than generating the bounce message in Cyrus. */
{ "sieve_vacation_min_response", "3d", DURATION, "3.1.8" }
/* Minimum time interval between consecutive vacation responses, per
draft-ietf-vacation-seconds.txt. The default is 3 days.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "sieve_vacation_max_response", "90d", DURATION, "3.1.8" }
/* Maximum time interval between consecutive vacation responses, per
draft-ietf-vacation-seconds.txt. The default is 90 days. The
minimum is 7 days.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "sievedir", "/usr/sieve", STRING, "2.3.17" }
/* If sieveusehomedir is false, this directory is searched for Sieve
scripts. */
{ "sievenotifier", NULL, STRING, "2.3.17" }
/* Notifyd(8) method to use for "SIEVE" notifications. If not set, "SIEVE"
notifications are disabled.
.PP
This method is only used when no method is specified in the script. */
{ "sieveusehomedir", 0, SWITCH, "2.3.17" }
/* If enabled, lmtpd will look for Sieve scripts in user's home
directories: ~user/.sieve. */
{ "anysievefolder", 0, SWITCH, "2.5.0" }
/* It must be "yes" in order to permit the autocreation of any INBOX subfolder
requested by a sieve filter, through the "fileinto" action. (default = no) */
{ "singleinstancestore", 1, SWITCH, "2.3.17" }
/* If enabled, imapd, lmtpd and nntpd attempt to only write one copy
of a message per partition and create hard links, resulting in a
potentially large disk savings. */
{ "skiplist_always_checkpoint", 1, SWITCH, "2.3.17" }
/* If enabled, this option forces the skiplist cyrusdb backend to
always checkpoint when doing a recovery. This causes slightly
more IO, but on the other hand leads to more efficient databases,
and the entire file is already "hot". */
{ "skiplist_unsafe", 0, SWITCH, "2.3.17" }
/* If enabled, this option forces the skiplist cyrusdb backend to
not sync writes to the disk. Enabling this option is NOT RECOMMENDED. */
{ "smtp_backend", "sendmail", STRINGLIST("host", "sendmail"), "3.1.4" }
/* The SMTP backend to use for sending email.
The \"host\" backend sends message submissions via
a TCP socket to the SMTP host defined in the config
option smtp_host.
The \"sendmail\" backend forks the Cyrus process into
the executable defined in the config option sendmail.
The executable must accept \"-bs\" as command line
argument, read from stdin and must implement the minimum
SMTP protocol as defined in section 4.5.1 of RFC 5321.
If the SMTP EHLO command reports AUTH (RFC 4954) as a
supported extension, then the MAIL FROM command includes
the AUTH parameter, with its value set to the name of any
authenticated user which triggered the email. The AUTH
parameter is omitted if the user is unknown to the calling
process.
If the directory
\fIconfigdirectory\fR/log/smtpclient.\ \fIsmtp_backend\fR
exists, then telemetry logs for outgoing SMTP sessions will
be created in this directory.
*/
{ "smtp_host", "localhost:587", STRING, "3.1.4" }
/* The SMTP host to use for sending mail (also see the
smtp_backend option). The value of this option must
the name or IP address of a TCP host, followed optionally
by a colon and the port or service to use. The default
port is 587. TLS may be activated by appending \"/tls\"
to the value. Authentication is enabled if smtp_auth_authname
is set. Authentication can be explicitly disabled by appending
\"/noauth\" to the host address. */
{ "smtp_auth_authname", NULL, STRING, "3.1.4" }
/* The authentication name to use when authenticating to the SMTP
server defined in smtp_host. */
{ "smtp_auth_password", NULL, STRING, "3.1.4" }
/* The password to use when authenticating to the SMTP server defined
in smtp_host. */
{ "smtp_auth_realm", NULL, STRING, "3.1.4" }
/* The authentication SASL realm to use when authenticating to a SMTP
server. */
{ "soft_noauth", 1, SWITCH, "2.3.17" }
/* If enabled, lmtpd returns temporary failures if the client does not
successfully authenticate. Otherwise lmtpd returns permanent failures
(causing the mail to bounce immediately). */
{ "sortcache_db", "twoskip", STRINGLIST("skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for caching sort results (currently only
used for xconvmultisort) */
{ "specialuse_extra", NULL, STRING, "2.5.0" }
/* Whitespace separated list of extra special-use attributes
that can be set on a mailbox. RFC 6154 currently lists
what special-use attributes can be set. This allows
extending that list in the future or adding your own
if needed. */
{ "specialuse_nochildren", NULL, STRING, "3.3.2" }
/* Whitespace separated list of special-use attributes that may not contain
child folders. If set, mailboxes with any of these attributes may not
have child folders created, and these attributes cannot be added to
mailboxes that already have children.. */
{ "specialuse_protect", "\\Archive \\Drafts \\Important \\Junk \\Sent \\Trash", STRING, "3.1.7" }
/* Whitespace separated list of special-use attributes
to protect the mailboxes for. If set, don't allow
mailboxes with these special use attributes to be deleted
or renamed to have a different parent. Default is the built-in list*/
{ "specialusealways", 1, SWITCH, "3.1.1" }
/* If enabled, this option causes LIST and LSUB output to always include
the XLIST "special-use" flags */
{ "sql_database", NULL, STRING, "2.3.17" }
/* Name of the database which contains the cyrusdb table(s). */
{ "sql_engine", NULL, STRINGLIST("mysql", "pgsql", "sqlite"), "2.3.17" }
/* Name of the SQL engine to use. */
{ "sql_hostnames", "", STRING, "2.3.17" }
/* Comma separated list of SQL servers (in host[:port] format). */
{ "sql_passwd", NULL, STRING, "2.3.17" }
/* Password to use for authentication to the SQL server. */
{ "sql_user", NULL, STRING, "2.3.17" }
/* Username to use for authentication to the SQL server. */
{ "sql_usessl", 0, SWITCH, "2.3.17" }
/* If enabled, a secure connection will be made to the SQL server. */
{ "srs_alwaysrewrite", 0, SWITCH, "2.5.0" }
/* If true, perform SRS rewriting for ALL forwarding, even when not required. */
{ "srs_domain", NULL, STRING, "3.1.2" }
/* The domain to use in rewritten addresses. This must point only to machines
which know the encoding secret used by this system. When present, SRS is
enabled. */
{ "srs_hashlength", 0, INT, "3.1.2" }
/* The hash length to generate in a rewritten address. */
{ "srs_secrets", NULL, STRING, "3.1.2" }
/* A list of secrets with which to generate addresses. */
{ "srs_separator", NULL, STRING, "3.1.2" }
/* The separator to appear immediately after SRS[01] in rewritten addresses. */
{ "srvtab", "", STRING, "2.3.17" }
/* The pathname of \fIsrvtab\fR file containing the server's private
key. This option is passed to the SASL library and overrides its
default setting. */
{ "submitservers", NULL, STRING, "2.3.17" }
/* A list of users and groups that are allowed to resolve "urlauth=submit+"
IMAP URLs, separated by spaces. Any user listed in this will be
allowed to fetch the contents of any valid "urlauth=submit+" IMAP URL:
use with caution. */
{ "subscription_db", "flat", STRINGLIST("flat", "skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the subscriptions list. */
{ "suppress_capabilities", NULL, STRING, "3.0.0" }
/* Suppress the named capabilities from any capability response. Use the
exact case as it appears in the response, e.g.
"suppress_capabilities: ESEARCH QRESYNC WITHIN XLIST LIST-EXTENDED"
if you have a murder with 2.3.x backends and don't want clients being
confused by new capabilities that some backends don't support. */
{ "statuscache", 0, SWITCH, "2.3.17" }
/* Enable/disable the imap status cache. */
{ "statuscache_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the imap status cache. */
{ "statuscache_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the statuscache db file. If not specified,
will be configdirectory/statuscache.db */
{ "sync_authname", NULL, STRING, "2.5.0" }
/* The authentication name to use when authenticating to a sync server.
Prefix with a channel name to only apply for that channel */
{ "sync_batchsize", 8192, INT, "3.0.0" }
/* the number of messages to upload in a single mailbox replication.
Default is 8192. If there are more than this many messages appended
to the mailbox, generate a synthetic partial state and send that. */
{ "sync_cache_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.3.1" }
/* The cyrusdb backend to use for the replication cache. */
{ "sync_cache_db_path", NULL, STRING, "3.3.1" }
/* The path for the replication cache. Prefix with a
channel name to apply for that channel. NOTE, it's
quite important to have a different one per backend! */
{ "sync_host", NULL, STRING, "2.5.0" }
/* Name of the host (replica running sync_server(8)) to which
replication actions will be sent by sync_client(8).
Prefix with a channel name to only apply for that channel */
{ "sync_log", 0, SWITCH, "2.3.17" }
/* Enable replication action logging by lmtpd(8), imapd(8), pop3d(8),
and nntpd(8). The log {configdirectory}/sync/log is used by
sync_client(8) for "rolling" replication. */
{ "sync_log_chain", 0, SWITCH, "2.4.0" }
/* Enable replication action logging by sync_server as well, allowing
chaining of replicas. Use this on 'B' for A => B => C replication layout */
{ "sync_log_channels", NULL, STRING, "2.5.0" }
/* If specified, log all events to multiple log files in directories
specified by each "channel". Each channel can then be processed
separately, such as by multiple sync_client(8)s in a mesh replication
scheme, or by squatter(8) for rolling search index updates.
.PP
You can use "" (the two-character string U+22 U+22) to mean the
default sync channel. */
{ "sync_log_unsuppressable_channels", "squatter", STRING, "2.5.0" }
/* If specified, the named channels are exempt from the effect of setting
sync_log_chain:off, i.e. they are always logged to by the sync_server
process. This is only really useful to allow rolling search indexing
on a replica. */
{ "sync_password", NULL, STRING, "2.5.0" }
/* The default password to use when authenticating to a sync server.
Prefix with a channel name to only apply for that channel */
{ "sync_port", NULL, STRING, "3.0.0" }
/* Name of the service (or port number) of the replication service on
replica host. Prefix with a channel name to only apply for that
channel. If not specified, and if sync_try_imap is set to "yes"
(the default), then the replication client will first try "imap"
(port 143) to check if imapd supports replication. Otherwise it
will default to "csync" (usually port 2005). */
{ "sync_realm", NULL, STRING, "2.5.0" }
/* The authentication realm to use when authenticating to a sync server.
Prefix with a channel name to only apply for that channel */
{ "sync_reconnect_maxwait", "20m", DURATION, "UNRELEASED" }
/* When a rolling sync_client cannot connect to the replica, it enters
a retry loop with an exponential backoff between attempts. This
option sets the upper limit on that exponential backoff: no matter
how long the replica has been down so far, sync_client will never
wait longer than sync_reconnect_maxwait between retries.
.PP
If this is zero or negative, the backoff duration will be allowed
to increase indefinitely (not recommended).
.PP
If no unit is specified, seconds is assumed. */
{ "sync_repeat_interval", "1s", DURATION, "3.1.8" }
/* Minimum interval between replication runs in rolling replication
mode. If a replication run takes longer than this time, we repeat
immediately. Prefix with a channel name to only apply for that
channel.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "sync_rightnow_channel", NULL, STRING, "3.3.1" }
/* if set, run sync_client to this channel immediately. As with channels,
set this value to '""' to sync the default channel! */
{ "sync_shutdown_file", NULL, STRING, "2.5.0" }
/* Simple latch used to tell sync_client(8) that it should shut down at the
next opportunity. Safer than sending signals to running processes.
Prefix with a channel name to only apply for that channel */
{ "sync_timeout", "30m", DURATION, "3.1.8" }
/* How long to wait for a response before returning a timeout failure
when talking to a replication peer (client or server). The minimum
duration is 3 seconds, the default is 30 minutes.
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "sync_try_imap", 1, SWITCH, "3.0.0" }
/* Whether sync_client should try to perform an IMAP connection
before falling back to csync. If this is set to "no",
sync_client will only use csync. Prefix with a channel name to
apply only for that channel */
{ "syslog_prefix", NULL, STRING, "3.1.8" }
/* String to be prepended to the process name in syslog entries. Can
be further overridden by setting the $CYRUS_SYSLOG_PREFIX environment
variable.
.PP
Using the $CYRUS_SYSLOG_PREFIX environment variable has the additional
advantage that it can be set before the \fBimapd.conf\fR is read, so
errors while reading the config file can be syslogged with the correct
prefix. */
{ "syslog_facility", NULL, STRING, "2.5.0" }
/* Configure a syslog facility. The default is whatever is compiled
in. Allowed values are: DAEMON, MAIL, NEWS, USER, and LOCAL0
through to LOCAL7 */
{ "tcp_keepalive", 0, SWITCH, "2.4.0" }
/* Enable keepalive on TCP connections */
{ "tcp_keepalive_cnt", 0, INT, "2.4.0" }
/* Number of TCP keepalive probes to send before declaring the
connection dead (0 == system default) */
{ "tcp_keepalive_idle", "0", DURATION, "3.1.8" }
/* How long a connection must be idle before keepalive probes are sent
(0 == system default).
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "tcp_keepalive_intvl", "0", DURATION, "3.1.8" }
/* Time between keepalive probes (0 == system default).
.PP
For backward compatibility, if no unit is specified, seconds is
assumed. */
{ "temp_path", "/tmp", STRING, "3.3.0" }
/* The pathname to store temporary files in. It is recommended to
use an in-memory filesystem such as tmpfs for this path. */
{ "telemetry_bysessionid", 0, SWITCH, "3.0.0" }
/* If true, log by sessionid instead of PID for telemetry */
{ "timeout", "32m", DURATION, "3.1.8" }
/* The length of the IMAP server's inactivity autologout timer.
The minimum value is 30 minutes. The default is 32 minutes,
to allow a bit of leeway for clients that try to NOOP every
30 minutes.
.PP
For backward compatibility, if no unit is specified, minutes
is assumed. */
{ "imapidletimeout", NULL, DURATION, "3.1.8" }
/* Timeout for idling clients (RFC 2177). If not set (the default),
the value of "timeout" will be used instead.
.PP
For backward compatibility, if no unit is specified, minutes
is assumed. */
{ "tls_ca_file", NULL, STRING, "2.5.0", "2.5.0", "tls_client_ca_file" }
/* Deprecated in favor of \fItls_client_ca_file\fR. */
{ "tls_ca_path", NULL, STRING, "2.5.0", "2.5.0", "tls_client_ca_dir" }
/* Deprecated in favor of \fItls_client_ca_dir\fR. */
{ "tlscache_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "2.5.0", "2.5.0", "tls_sessions_db" }
/* Deprecated in favor of \fItls_sessions_db\fR. */
{ "tlscache_db_path", NULL, STRING, "2.5.0", "2.5.0", "tls_sessions_db_path" }
/* Deprecated in favor of \fItls_sessions_db_path\fR. */
{ "tls_cert_file", NULL, STRING, "2.5.0", "2.5.0", "tls_server_cert" }
/* Deprecated in favor of \fItls_server_cert\fR. */
{ "tls_cipher_list", "DEFAULT", STRING, "2.5.0", "2.5.0", "tls_ciphers" }
/* Deprecated in favor of \fItls_ciphers\fR. */
{ "tls_ciphers", "DEFAULT", STRING, "2.5.0" }
/* The list of SSL/TLS ciphers to allow. The format of the string
(and definition of "DEFAULT") is described in \fBciphers(1)\fR.
.PP
See also Mozilla's server-side TLS recommendations:
.PP
https://wiki.mozilla.org/Security/Server_Side_TLS */
{ "tls_crl_file", NULL, STRING, "3.1.2" }
/* Path to a file containing the Certificate Revocation List */
{ "tls_client_ca_dir", NULL, STRING, "2.5.0" }
/* Path to a directory containing the CA certificates used to verify
client SSL certificates used for authentication. */
{ "tls_client_ca_file", NULL, STRING, "2.5.0" }
/* Path to a file containing the CA certificate(s) used to verify
client SSL certificates used for authentication. */
{ "tls_client_cert", NULL, STRING, "2.5.0" }
/* File containing the certificate presented to a server for authentication
during STARTTLS. A value of "disabled" will disable this server's use
of certificate-based authentication. */
{ "tls_client_certs", "optional", ENUM("off", "optional", "require"), "2.5.0" }
/* Disable ("off"), allow ("optional", default) or require ("require") the
use of SSL certificates by clients to authenticate themselves. */
{ "tls_client_key", NULL, STRING, "2.5.0" }
/* File containing the private key belonging to the tls_client_cert
certificate. A value of "disabled" will disable this server's use
of certificate-based authentication. */
{ "tls_eccurve", "prime256v1", STRING, "2.5.0" }
/* The elliptic curve used for ECDHE. Default is NIST Suite B prime256.
See 'openssl ecparam -list_curves' for possible values. */
{ "tls_key_file", NULL, STRING, "2.5.0", "2.5.0", "tls_server_key" }
/* Deprecated in favor of \fItls_server_key\fR. */
{ "tls_required", 0, SWITCH, "3.0.0" }
/* If enabled, require a TLS/SSL encryption layer to be negotiated
prior to ANY authentication mechanisms being advertised or allowed. */
{ "tls_prefer_server_ciphers", 0, SWITCH, "2.5.0" }
/* Prefer the ciphers on the server side instead of client side. */
{ "tls_server_ca_dir", NULL, STRING, "2.5.0" }
/* Path to a directory with CA certificates used to verify certificates
offered by the server, when cyrus acts as client. This directory must
have filenames with the hashed value of the certificates (see
openssl(1)). */
{ "tls_server_ca_file", NULL, STRING, "2.5.0" }
/* Path to a file containing CA certificates used to verify certificates
offered by the server, when cyrus acts as client. */
{ "tls_server_cert", NULL, STRING, "3.1.8" }
/* File containing the certificate, including the full chain, presented to clients.
Two certificates can be set, e.g RSA and EC, if the filenames are separated with
comma without spaces. */
{ "tls_server_dhparam", NULL, STRING, "3.1.4" }
/* File containing the DH parameters belonging to the certificate in
tls_server_cert. */
{ "tls_server_key", NULL, STRING, "3.1.8" }
/* File containing the private key belonging to the certificate in
tls_server_cert. If not set, tls_server_cert must contain both private and
public key. Two files with keys can be set, if two certificates are used, in
which case the files must be separated with comma without spaces */
{ "tls_sessions_db", "twoskip", STRINGLIST("skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the TLS cache. */
{ "tls_sessions_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the TLS sessions db file. If not specified,
will be configdirectory/tls_sessions.db */
{ "tls_session_timeout", "24h", DURATION, "3.1.8" }
/* The length of time that a TLS session will be cached for later
reuse. The maximum value is 24 hours, also the default. A
value of 0 will disable session caching.
.PP
For backward compatibility, if no unit is specified, minutes is
assumed. */
{ "tls_versions", "tls1_0 tls1_1 tls1_2 tls1_3", STRING, "3.1.8" }
/* A list of SSL/TLS versions to not disable. Cyrus IMAP SSL/TLS starts
with all protocols, and subtracts protocols not in this list. Newer
versions of SSL/TLS will need to be added here to allow them to get
disabled. */
{ "uidl_format", "cyrus", ENUM("uidonly", "cyrus", "dovecot", "courier"), "3.0.0" }
/* Choose the format for UIDLs in pop3. Possible values are "uidonly",
"cyrus", "dovecot" and "courier". "uidonly" forces the old default
of UID, "cyrus" is UIDVALIDITY.UID. Dovecot is 8 digits of leading
hex (lower case) each UID UIDVALIDITY. Courier is UIDVALIDITY-UID. */
{ "umask", "077", STRING, "2.3.17" }
/* The umask value used by various Cyrus IMAP programs. */
{ "userdeny_db", "flat", STRINGLIST("flat", "skiplist", "sql", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for the user access list. */
{ "userdeny_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the userdeny db file. If not specified,
will be configdirectory/user_deny.db */
{ "username_tolower", 1, SWITCH, "2.3.17" }
/* Convert usernames to all lowercase before login/authentication. This
is useful with authentication backends which ignore case during
username lookups (such as LDAP). */
{ "userprefix", "Other Users", STRING, "2.3.17" }
/* If using the alternate IMAP namespace, the prefix for the other users
namespace. The hierarchy delimiter will be automatically appended. */
# xxx badly worded
{ "unix_group_enable", 1, SWITCH, "2.3.17" }
/* Should we look up groups when using auth_unix (disable this if you are
not using groups in ACLs for your IMAP server, and you are using auth_unix
with a backend (such as LDAP) that can make getgrent() calls very
slow) */
{ "unixhierarchysep", 1, SWITCH, "3.0.0" }
/* Use the UNIX separator character '/' for delimiting levels of
mailbox hierarchy. Turn off to use the netnews separator
character '.'. Note that with the newnews separator, no dots may
occur in mailbox names. The default switched in 3.0 from off to on. */
{ "vcard_max_size", 0, INT, "UNRELEASED" }
/* Maximum allowed vCard size.
If non-zero, CardDAV and JMAP will reject storage of contacts whose
vCard representation is larger than \fIvcard_max_size\fR bytes.
If set to 0, this will allow vCards of any size (the default). */
{ "virtdomains", "off", ENUM("off", "userid", "on"), "3.1.8" }
/* Configure virtual domain support.
.PP
.IP off
Cyrus does not know or care about domains. Only the local part of email
addresses is ever considered. This is not recommended for any deployment,
but is currently the default.
.\"
.IP userid
The user's domain is determined by splitting a fully qualified userid at the
last '@' or '%' symbol. If the userid is unqualified, the \fIdefaultdomain\fR
will be used. This is the recommended configuration for all deployments.
If you wish to provide calendaring services you must use this configuration.
.\"
.IP on
Fully qualified userids are respected, as per "userid". Unqualified userids
will have their domain determined by doing a reverse lookup on the IP address
of the incoming network interface, or if no record is found, the
\fIdefaultdomain\fR will be used.
.PP
*/
{ "virusscan_notification_subject", "Automatically deleted mail", STRING, "3.1.8" }
/* The text used in the subject of email notifications created by
\fBcyr_virusscan(8)\fR when deleting infected mail. */
{ "virusscan_notification_template", NULL, STRING, "3.1.8" }
/* The absolute path to a file containing a template to use to describe
infected messages that have been deleted by \fBcyr_virusscan(8)\fR.
See \fBcyr_virusscan(8)\fR for specification of the format of this file.
If not specified, the builtin default template will be used. */
{ "websocket_timeout", "30m", DURATION, "UNRELEASED" }
/* Set the length of the HTTP server's inactivity autologout timer
when a WebSocket channel has been established.
The default is 30 minutes. The minimum value is 0, which will
disable WebSockets.
.PP
If no unit is specified, minutes is assumed. */
{ "xbackup_enabled", 0, SWITCH, "3.0.0" }
/* Enable support for the XBACKUP command in imapd. If enabled, admin
users can use this command to provoke a replication of specified users
to the named backup channel. */
# Commented out - there's no such thing as "xlist-flag", but we need
# this for the man page
# { "xlist-flag", NULL, STRING, "3.0.0" }
/* Set the special-use flag \fIflag\fR on the specified folder when it
is autocreated (see the \fIautocreate_inbox_folders\fR option). For
example, if \fBxlist-junk: Spam\fR is set, and the folder \fBSpam\fR
is autocreated, the special-use flag \fB\\Junk\fR will be set on it.
.PP
(This option is so named for backward compatibility with old config
files.)
*/
{ "lmtp_catchall_mailbox", NULL, STRING, "2.5.0" }
/* Mail sent to mailboxes which do not exist, will be delivered to
this user. NOTE: This must be an existing local user name with an
INBOX, NOT an email address! */
{ "zoneinfo_db", "twoskip", STRINGLIST("flat", "skiplist", "twoskip", "zeroskip"), "3.1.6" }
/* The cyrusdb backend to use for zoneinfo. This database is used by the
"tzdist" \fIhttpmodules\fR, and is managed by \fBctl_zoneinfo(8)\fR.*/
{ "zoneinfo_db_path", NULL, STRING, "2.5.0" }
/* The absolute path to the zoneinfo db file. If not specified,
will be configdirectory/zoneinfo.db */
{ "zoneinfo_dir", NULL, STRING, "3.2.0" }
/* The absolute path to the zoneinfo directory, containing timezone
definitions as generated by the vzic tool. If not specified, whatever
definitions libical finds will be used.
.PP
If you are providing a Time Zone Data Distribution Service (i.e. you have
"tzdist" listed in \fIhttpmodules\fR), then this configuration option MUST
be specified. */
{ "object_storage_enabled", 0, SWITCH, "3.0.0" }
/* Is Object storage enabled for this server. You also need to have
archiving enabled and archivepartition for the mailbox.
Only email files will be stored on object Storage archive partition will be
used to store any other files */
{ "object_storage_dummy_spool", NULL, STRING, "3.0.0" }
/* Dummy object storage spool; this is for test only.
Spool where user directory (container) will be created to store all emails
in a flat structure */
{ "openio_namespace", NULL, STRING, "3.0.0" }
/* The OpenIO namespace used to store archived email messages. A namespace
identifies the physical platform cyrus must contact. This directive is used
by the OpenIO's SDK to locate its platform entry point. */
{ "openio_account", NULL, STRING, "3.0.0" }
/* The OpenIO account used to account for stored emails. Accounts are unique
in their namespace. They provides virtual partitions, with quotas and QoS
features. */
{ "openio_rawx_timeout", "30s", DURATION, "3.1.8" }
/* The OpenIO timeout to query to the RAWX services (default 30 sec). */
{ "openio_proxy_timeout", "5s", DURATION, "3.1.8" }
/* The OpenIO timeout to query to the PROXY services (default 5 sec). */
{ "openio_autocreate", 0, SWITCH, "3.0.0" }
/* Allow the OpenIO SDK to autocreate containers. Mainly destined to be turned
on development environments. In production, the container should have been
provisioned with the mailboxes. */
{ "openio_verbosity", NULL, STRING, "3.0.0" }
/* Sets the logging verbosity of the OpenIO's internal behavior. Admissible
values are: "warning", "notice", "info", "debug", "trace", "quiet".
The default verbosity is "warning". Set to "notice" for a few lines on a
per-client basis. Set to "info" for a few lines on a per-request basis. Set
to "debug" Set to "trace" to activate the underlying libcurl debug
output. Enabling a verbosity higher to equal than "debug" requires
the cyrus to be set in debug mode. The special "quiet" value disables all
kinds of logging at the GLib level. */
{ "caringo_hostname", NULL, STRING, "3.0.0" }
/* The Caringo hostname used to store archived email messages. A hostname
identifies the physical platform cyrus must contact. This directive is used
by the Caringo's SDK (CastorSDK: Caringo Simple Content Storage Protocol (SCSP)
on HTTP 1.1 using a RESTful architecture */
{ "caringo_port", 80, INT, "3.0.0" }
/* The port of the caringo server (caringo_hostname); default is 80. */
{ "fastmailsharing", 0, SWITCH, "3.0.0" }
/* If enabled, use FastMail style sharing (oldschool full server paths) */
/*
.SH SEE ALSO
.PP
\fBimapd(8)\fR, \fBpop3d(8)\fR, \fBnntpd(8)\fR, \fBlmtpd(8)\fR,
\fBhttpd(8)\fR, \fBtimsieved(8)\fR, \fBidled(8)\fR, \fBnotifyd(8)\fR,
\fBdeliver(8)\fR, \fBmaster(8)\fR, \fBciphers(1)\fR
*/

File Metadata

Mime Type
text/x-diff
Expires
Sat, Apr 4, 3:31 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822424
Default Alt Text
(212 KB)

Event Timeline