mail-storage-private.h revision 00aaafa8619b4e6aaf23f15d30c36f06ccb820bc
a3fe8c0c54d87822f4b4f8f0d10caac611861b2bTimo Sirainen/* Block size when read()ing message header. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen/* Block size when read()ing message (header and) body. */
c99fe55d4535d839a6ad0735c4719e076a1adb2cTimo Sirainen#define MAIL_READ_FULL_BLOCK_SIZE IO_BLOCK_SIZE
7891c8e6debdcfec552cb1beea2a0230fe89957bTimo Sirainen unsigned int id;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen unsigned int id;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen const struct setting_parser_info *(*get_setting_parser_info)(void);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen int (*create)(struct mail_storage *storage, struct mail_namespace *ns,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen const char **error_r);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen void (*destroy)(struct mail_storage *storage);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen void (*add_list)(struct mail_storage *storage,
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen void (*get_list_settings)(const struct mail_namespace *ns,
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen bool (*autodetect)(const struct mail_namespace *ns,
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainen struct mailbox *(*mailbox_alloc)(struct mail_storage *storage,
104318260228780a5c6b3181b3401e8e504e2776Timo Sirainen /* mailboxes are files, not directories */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE = 0x01,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* root_dir points to a unique directory */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* mailbox_open_stream() is supported */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* never use quota for this storage (e.g. virtual mailboxes) */
b437874782ad048daa155e0ac863c2326c3f5e43Timo Sirainen /* Storage doesn't need a mail root directory */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Storage uses one file per message */
b437874782ad048daa155e0ac863c2326c3f5e43Timo Sirainen/* private: */
ccf50662cc02b5e703039a4ff7f91a4470e25b71Timo Sirainen /* counting number of times mail_storage_create() has returned this
ccf50662cc02b5e703039a4ff7f91a4470e25b71Timo Sirainen same storage. */
2f94ca6b0f70641fe31c8e1f93404ca0df8bb289Timo Sirainen /* counting number of objects (e.g. mailbox) that have a pointer
2f94ca6b0f70641fe31c8e1f93404ca0df8bb289Timo Sirainen to this storage. */
ccf50662cc02b5e703039a4ff7f91a4470e25b71Timo Sirainen /* Linked list of all mailboxes in the storage */
04a6e51325d52a8f6046389406b2f606159a61e3Timo Sirainen /* Module-specific contexts. See mail_storage_module_id. */
04a6e51325d52a8f6046389406b2f606159a61e3Timo Sirainen ARRAY_DEFINE(module_contexts, union mail_storage_module_context *);
4cbe2b4ee234317331eadd1768d9ce433adb60e1Timo Sirainen const char *content_type, *content_disposition;
4cbe2b4ee234317331eadd1768d9ce433adb60e1Timo Sirainen int (*enable)(struct mailbox *box, enum mailbox_feature features);
4cbe2b4ee234317331eadd1768d9ce433adb60e1Timo Sirainen int (*exists)(struct mailbox *box, bool auto_boxes,
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen int (*create)(struct mailbox *box, const struct mailbox_update *update,
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen int (*update)(struct mailbox *box, const struct mailbox_update *update);
f158d9a303bb15a6848ca276c9391c7ca52e452bTimo Sirainen int (*rename)(struct mailbox *src, struct mailbox *dest,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen int (*get_status)(struct mailbox *box, enum mailbox_status_items items,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen int (*set_subscribed)(struct mailbox *box, bool set);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Lookup sync extension record and figure out if it mailbox has
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen changed since. Returns 1 = yes, 0 = no, -1 = error. */
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen int (*list_index_has_changed)(struct mailbox *box,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen /* Update the sync extension record. */
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen void (*list_index_update_sync)(struct mailbox *box,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen bool (*sync_next)(struct mailbox_sync_context *ctx,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen int (*sync_deinit)(struct mailbox_sync_context *ctx,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen /* Called once for each expunge. Called one or more times for
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen flag/keyword changes. Once the sync is finished, called with
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen uid=0 and sync_type=0. */
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen void (*sync_notify)(struct mailbox *box, uint32_t uid,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen int (*transaction_commit)(struct mailbox_transaction_context *t,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen struct mail_transaction_commit_changes *changes_r);
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen void (*transaction_rollback)(struct mailbox_transaction_context *t);
8761992b5aa05862e7ec3a460cdc17af41a4a0f5Timo Sirainen enum mail_flags (*get_private_flags_mask)(struct mailbox *box);
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen (*mail_alloc)(struct mailbox_transaction_context *t,
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen struct mailbox_header_lookup_ctx *wanted_headers);
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen (*search_init)(struct mailbox_transaction_context *t,
a3fe8c0c54d87822f4b4f8f0d10caac611861b2bTimo Sirainen struct mailbox_header_lookup_ctx *wanted_headers);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen int (*search_deinit)(struct mail_search_context *ctx);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen bool (*search_next_nonblock)(struct mail_search_context *ctx,
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen /* Internal search function which updates ctx->seq */
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen bool (*search_next_update_seq)(struct mail_search_context *ctx);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen (*save_alloc)(struct mailbox_transaction_context *t);
78fa3c578c14ee8a612f86cf73b6181c7f16463fTimo Sirainen int (*save_begin)(struct mail_save_context *ctx, struct istream *input);
0c22bef8f5b35c645de8affd8746307fc53bd222Timo Sirainen int (*save_continue)(struct mail_save_context *ctx);
0c22bef8f5b35c645de8affd8746307fc53bd222Timo Sirainen int (*save_finish)(struct mail_save_context *ctx);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen void (*save_cancel)(struct mail_save_context *ctx);
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch int (*copy)(struct mail_save_context *ctx, struct mail *mail);
78fa3c578c14ee8a612f86cf73b6181c7f16463fTimo Sirainen /* Called during transaction commit/rollback if saving was done */
78fa3c578c14ee8a612f86cf73b6181c7f16463fTimo Sirainen int (*transaction_save_commit_pre)(struct mail_save_context *save_ctx);
8451c4b5afc1ff5366438b2766f75b592c33e1ecTimo Sirainen struct mail_index_transaction_commit_result *result_r);
8451c4b5afc1ff5366438b2766f75b592c33e1ecTimo Sirainen void (*transaction_save_rollback)(struct mail_save_context *save_ctx);
ca4526e3b5fbf5ea3dd477a2098522a44c9ac52cTimo Sirainen /* mailbox's virtual name (from mail_namespace_get_vname()) */
28bf8f762fcd21c57bf71822cf818447babce9a0Timo Sirainen/* private: */
40a8e6948d662339c0c5e2c7abfb84ae7c1803fdTimo Sirainen /* Linked list of all mailboxes in this storage */
40a8e6948d662339c0c5e2c7abfb84ae7c1803fdTimo Sirainen /* these won't be set until mailbox is opened: */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Filled lazily by mailbox_get_permissions() */
a3fe8c0c54d87822f4b4f8f0d10caac611861b2bTimo Sirainen /* Filled lazily by mailbox_get_path() */
a3fe8c0c54d87822f4b4f8f0d10caac611861b2bTimo Sirainen /* default vfuncs for new struct mails. */
e6b4168ba670d9e51ea7877661def039ae6b53c3Timo Sirainen /* Mailbox settings, or NULL if defaults */
e6b4168ba670d9e51ea7877661def039ae6b53c3Timo Sirainen /* If non-zero, fail mailbox_open() with this error. mailbox_alloc()
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen can set this to force open to fail. */
6efdbeab167483597bef087f70ea852d1256a082Timo Sirainen /* Mailbox notification settings: */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen /* Increased by one for each new struct mailbox. */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen /* Saved search results */
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen ARRAY_DEFINE(search_results, struct mail_search_result *);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen /* Module-specific contexts. See mail_storage_module_id. */
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch ARRAY_DEFINE(module_contexts, union mailbox_module_context *);
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen /* When FAST open flag is used, the mailbox isn't actually opened until
71056e0f5e1f68cb9ac002a7827eb98435c40d62Timo Sirainen it's synced for the first time. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Mailbox was deleted while we had it open. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Mailbox is being created */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* Mailbox is being deleted */
ca4526e3b5fbf5ea3dd477a2098522a44c9ac52cTimo Sirainen /* Mailbox was already marked as deleted within this allocation. */
ca4526e3b5fbf5ea3dd477a2098522a44c9ac52cTimo Sirainen /* TRUE if this is an INBOX for this user */
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen /* TRUE if this is an INBOX for this namespace (user or shared) */
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen /* When copying to this mailbox, require that mailbox_copy() uses
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen mailbox_save_*() to actually save a new physical copy rather than
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen simply incrementing a reference count (e.g. via hard link) */
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen /* Don't allow creating any new keywords */
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen void (*set_seq)(struct mail *mail, uint32_t seq, bool saving);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen bool (*set_uid)(struct mail *mail, uint32_t uid);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen void (*set_uid_cache_updates)(struct mail *mail, bool set);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen void (*add_temp_wanted_fields)(struct mail *mail,
d4845c4245638fd6f02dc0cb92c3465fae763cbbTimo Sirainen enum mail_flags (*get_flags)(struct mail *mail);
d4845c4245638fd6f02dc0cb92c3465fae763cbbTimo Sirainen const char *const *(*get_keywords)(struct mail *mail);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen int (*get_date)(struct mail *mail, time_t *date_r, int *timezone_r);
0161376aac025266d8654577c4b9ce371ffc87eaTimo Sirainen int (*get_received_date)(struct mail *mail, time_t *date_r);
0161376aac025266d8654577c4b9ce371ffc87eaTimo Sirainen int (*get_save_date)(struct mail *mail, time_t *date_r);
0161376aac025266d8654577c4b9ce371ffc87eaTimo Sirainen int (*get_virtual_size)(struct mail *mail, uoff_t *size_r);
0161376aac025266d8654577c4b9ce371ffc87eaTimo Sirainen int (*get_physical_size)(struct mail *mail, uoff_t *size_r);
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen int (*get_first_header)(struct mail *mail, const char *field,
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen int (*get_headers)(struct mail *mail, const char *field,
c444eeaa2866152cf62652698aa11b125e8454bcTimo Sirainen bool decode_to_utf8, const char *const **value_r);
b7b9d4be2a1ff399026a5d6feeffd3a048f22be0Timo Sirainen int (*get_stream)(struct mail *mail, bool get_body,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen int (*get_special)(struct mail *mail, enum mail_fetch_field field,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen const char **value_r);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen struct mail *(*get_real_mail)(struct mail *mail);
578ef2538ccf42e2a48234c24a8b709397101d88Timo Sirainen void (*update_flags)(struct mail *mail, enum modify_type modify_type,
578ef2538ccf42e2a48234c24a8b709397101d88Timo Sirainen void (*update_keywords)(struct mail *mail, enum modify_type modify_type,
9b0f6b90ff8d1d6efd718b0d7cbe01b2454e9fd6Timo Sirainen void (*update_modseq)(struct mail *mail, uint64_t min_modseq);
578ef2538ccf42e2a48234c24a8b709397101d88Timo Sirainen void (*update_pop3_uidl)(struct mail *mail, const char *uidl);
578ef2538ccf42e2a48234c24a8b709397101d88Timo Sirainen void (*set_cache_corrupted)(struct mail *mail,
578ef2538ccf42e2a48234c24a8b709397101d88Timo Sirainen int (*istream_opened)(struct mail *mail, struct istream **input);
9b0f6b90ff8d1d6efd718b0d7cbe01b2454e9fd6Timo Sirainen /* initial wanted fields/headers, set by mail_alloc(): */
9b0f6b90ff8d1d6efd718b0d7cbe01b2454e9fd6Timo Sirainen struct mailbox_header_lookup_ctx *wanted_headers;
9b0f6b90ff8d1d6efd718b0d7cbe01b2454e9fd6Timo Sirainen ARRAY_DEFINE(module_contexts, union mail_module_context *);
6d2b3ce2c6ef62334985ece4f0ab8b154e0e9560Timo Sirainen /* number of files we've opened and read */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen /* number of bytes we've had to read from files */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen unsigned long long files_read_bytes;
ca4526e3b5fbf5ea3dd477a2098522a44c9ac52cTimo Sirainen /* number of cache lookup hits */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen union mail_index_transaction_module_context module_ctx;
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen /* view contains all changes done within this transaction */
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen struct mail_cache_transaction_ctx *cache_trans;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen struct mail_transaction_commit_changes *changes;
ca4526e3b5fbf5ea3dd477a2098522a44c9ac52cTimo Sirainen /* these statistics are never reset by mail-storage API: */
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen /* Set to TRUE to update stats_* fields */
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen struct mailbox_transaction_context *transaction;
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen struct mail_search_sort_program *sort_program;
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen struct mailbox_header_lookup_ctx *wanted_headers;
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen /* if non-NULL, specifies that a search resulting is being updated.
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen this can be used as a search optimization: if searched message
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen already exists in search result, it's not necessary to check if
deb06d37292d9112d74bdf80cfebb92ab5151679Timo Sirainen static data matches. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen /* add matches to these search results */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen ARRAY_DEFINE(results, struct mail_search_result *);
3f603ef00e35fca21605afa0ad8d76e94fee2b96Timo Sirainen ARRAY_DEFINE(module_contexts, union mail_search_module_context *);
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainen struct mailbox_transaction_context *transaction;
d9515a2eaa94c8287188c38fc28028727671e729Timo Sirainen /* returns TRUE if message part is an attachment. */
2e533fb1283b5f06a4063b519e47f1861c910386Timo Sirainen bool (*part_is_attachment)(struct mail_save_context *ctx,
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainen /* mail was copied using saving */
dd645357a6b851a3a9527d16e2bced731e46dcaaMartti Rannanjärvi /* mail is being saved, not copied */
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainen const char *const *name;
6efdbeab167483597bef087f70ea852d1256a082Timo Sirainen unsigned int *idx;
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainen/* Modules should use do "my_id = mail_storage_module_id++" and
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainen use objects' module_contexts[id] for their own purposes. */
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainenextern struct mail_storage_module_register mail_storage_module_register;
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainen/* Storage's module_id for mail_index. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenextern struct mail_module_register mail_module_register;
d39a04db2f4d0599cb9b5f03a9aa10a3c234453cTimo Sirainen MODULE_CONTEXT(obj, mail_storage_mail_index_module)
d39a04db2f4d0599cb9b5f03a9aa10a3c234453cTimo Sirainenextern MODULE_CONTEXT_DEFINE(mail_storage_mail_index_module,
d39a04db2f4d0599cb9b5f03a9aa10a3c234453cTimo Sirainenvoid mail_storage_obj_ref(struct mail_storage *storage);
17fe695b985e9d6e9dc39c05b24e6b3c3b7e1ba1Timo Sirainenvoid mail_storage_obj_unref(struct mail_storage *storage);
17fe695b985e9d6e9dc39c05b24e6b3c3b7e1ba1Timo Sirainen/* Set error message in storage. Critical errors are logged with i_error(),
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen but user sees only "internal error" message. */
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid mail_storage_clear_error(struct mail_storage *storage);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid mail_storage_set_error(struct mail_storage *storage,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid mail_storage_set_critical(struct mail_storage *storage,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid mail_storage_set_internal_error(struct mail_storage *storage);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid mail_storage_set_index_error(struct mailbox *box);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenbool mail_storage_set_error_from_errno(struct mail_storage *storage);
8d7eb4104707c60ca7e9d0228b37c5133476907bTimo Sirainenvoid mail_storage_copy_list_error(struct mail_storage *storage,
8d7eb4104707c60ca7e9d0228b37c5133476907bTimo Sirainen/* Returns TRUE if everything should already be in memory after this call. */
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainenvoid mail_set_seq_saving(struct mail *mail, uint32_t seq);
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainenint mailbox_mark_index_deleted(struct mailbox *box, bool del);
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainen/* Easy wrapper for getting mailbox's MAILBOX_LIST_PATH_TYPE_MAILBOX */
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainenconst char *mailbox_get_path(struct mailbox *box) ATTR_PURE;
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainen/* Get mailbox permissions. */
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainenconst struct mailbox_permissions *mailbox_get_permissions(struct mailbox *box);
86791365b10f45982c88e70f2eb94fd6c3fea151Timo Sirainen/* Force permissions to be refreshed on next lookup */
8d7eb4104707c60ca7e9d0228b37c5133476907bTimo Sirainenvoid mailbox_refresh_permissions(struct mailbox *box);
27a44fcfd8d19bffe0f267f20a2b5d3fe7600fddTimo Sirainen/* Returns -1 if error, 0 if failed with EEXIST, 1 if ok */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainenint mailbox_create_fd(struct mailbox *box, const char *path, int flags,
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainenunsigned int mail_storage_get_lock_timeout(struct mail_storage *storage,
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen unsigned int secs);