Lines Matching defs:mail
7 #include "index-mail.h"
8 #include "dbox-mail.h"
14 static void sdbox_mail_set_expunged(struct dbox_mail *mail)
16 struct mail *_mail = &mail->imail.mail.mail;
28 static int sdbox_mail_file_set(struct dbox_mail *mail)
30 struct mail *_mail = &mail->imail.mail.mail;
35 if (mail->open_file != NULL) {
39 mail->open_file = sdbox_file_init(mbox, _mail->uid);
42 /* mail is being saved in this transaction */
43 mail->open_file =
46 mail->open_file->refcount++;
49 ret = dbox_file_open(mail->open_file, &deleted);
52 "dbox: Unexpectedly lost mail being saved");
61 sdbox_mail_get_special(struct mail *_mail, enum mail_fetch_field field,
65 struct dbox_mail *mail = DBOX_MAIL(_mail);
70 if (sdbox_mail_file_set(mail) < 0)
74 if (dbox_file_stat(mail->open_file, &st) < 0) {
79 *value_r = p_strdup_printf(mail->imail.mail.data_pool, "%lu",
104 int sdbox_mail_open(struct dbox_mail *mail, uoff_t *offset_r,
107 struct mail *_mail = &mail->imail.mail.mail;
117 ret = sdbox_mail_file_set(mail);
121 if (!dbox_file_is_open(mail->open_file))
123 if (dbox_file_open(mail->open_file, &deleted) <= 0)
126 sdbox_mail_set_expunged(mail);
131 *file_r = mail->open_file;