mail-deliver.h revision 258adfa09081ea8600a39759d486e678b5aa5f60
#ifndef MAIL_DELIVER_H
#define MAIL_DELIVER_H
enum mail_flags;
enum mail_error;
struct mail_storage;
struct mailbox;
struct mail_deliver_context {
const struct lda_settings *set;
struct duplicate_context *dup_ctx;
/* Session ID, used as log line prefix if non-NULL. */
const char *session_id;
/* Mail to save */
/* Envelope sender, if known. */
const char *src_envelope_sender;
/* Destination user */
/* Destination email address */
const char *dest_addr;
/* Mailbox where mail should be saved, unless e.g. Sieve does
something to it. */
const char *dest_mailbox_name;
/* Filled with destination mail, if save_dest_mail=TRUE.
The caller must free the mail, its transaction and close
the mailbox. */
bool tried_default_save;
bool saved_mail;
bool save_dest_mail;
};
struct mail_deliver_save_open_context {
bool lda_mailbox_autocreate;
};
struct mail_storage **storage_r);
extern deliver_mail_func_t *deliver_mail;
const struct var_expand_table *
/* Try to open mailbox for saving. Returns 0 if ok, -1 if error. The box may
be returned even with -1, and the caller must free it then. */
struct mail_storage **storage_r);
struct mail_storage **storage_r);
#endif