mail-storage.c revision c63e7bd686e2745857fb5f70fc2126d5de08dcf1
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
211ed7806d8715ec2280ffbf5d10f0d6e4f1beb2Timo Sirainen/* Message to show to users when critical error occurs */
9b7eeffb5752b500ac62ba1fd01c4a8c4ada14e9Timo Sirainen "Internal error occurred. Refer to server log for more information."
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen#define CRITICAL_MSG_STAMP CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenstruct mail_storage_module_register mail_storage_module_register = { 0 };
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenstruct mail_module_register mail_module_register = { 0 };
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainenstruct mail_storage_mail_index_module mail_storage_mail_index_module =
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen MODULE_CONTEXT_INIT(&mail_index_module_register);
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainenvoid (*hook_mail_storage_created)(struct mail_storage *storage);
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenvoid (*hook_mailbox_opened)(struct mailbox *box) = NULL;
211ed7806d8715ec2280ffbf5d10f0d6e4f1beb2Timo Sirainenvoid (*hook_mailbox_index_opened)(struct mailbox *box) = NULL;
2767104d81e97a109f0aa9758792bfa1da325a97Timo Sirainenstatic ARRAY_DEFINE(storages, struct mail_storage *);
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenvoid mail_storage_class_register(struct mail_storage *storage_class)
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen /* append it after the list, so the autodetection order is correct */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenvoid mail_storage_class_unregister(struct mail_storage *storage_class)
03f5c621d06d6b6d77a145196c9633a7aa64dc78Timo Sirainen unsigned int i, count;
03f5c621d06d6b6d77a145196c9633a7aa64dc78Timo Sirainen for (i = 0; i < count; i++) {
const char *str;
*flags_r = 0;
unsigned int i, count;
for (i = 0; i < count; i++) {
return classes[i];
return NULL;
static struct mail_storage *
unsigned int i, count;
for (i = 0; i < count; i++) {
return classes[i];
return NULL;
p = *data;
while (i_isalnum(*p)) p++;
const char **error_r)
unsigned int i, count;
data);
for (i = 0; i < count; i++) {
if (i == count) {
*error_r);
T_BEGIN {
} T_END;
const char *fmt, ...)
void *context)
bool directory)
const char *name)
const char *name)
enum mailbox_list_flags
return list_flags;
const char *error_string;
return FALSE;
return TRUE;
return NULL;
T_BEGIN {
} T_END;
return box;
struct mailbox_sync_context *
struct mail_keywords *
const char *const keywords[])
i_unreached();
return kw;
struct mailbox_header_lookup_ctx *
struct mail_search_context *
int ret;
return ret;
bool tryagain;
int ret;
&tryagain)) == 0) {
if (!tryagain)
return ret;
int ret;
if (ret > 0)
return ret;
int ret;
if (ret < 0)
return ret;
struct mailbox_transaction_context *
return trans;
struct mailbox *
return t->box;
if (ret == 0) {