Lines Matching defs:mail
12 #include "index-mail.h"
13 #include "mail-copy.h"
58 maildir_copy_hardlink(struct mail_save_context *ctx, struct mail *mail)
68 if (strcmp(mail->box->storage->name, MAILDIR_STORAGE_NAME) == 0)
69 src_mbox = MAILDIR_MAILBOX(mail->box);
70 else if (strcmp(mail->box->storage->name, "raw") == 0) {
87 if (maildir_file_do(src_mbox, mail->uid,
92 if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID,
104 /* hardlinked to tmp/, treat as normal copied mail */
105 mf = maildir_save_add(ctx, dest_fname, mail);
106 if (mail_get_special(mail, MAIL_FETCH_GUID, &guid) == 0) {
112 old_abort = mail->lookup_abort;
113 mail->lookup_abort = MAIL_LOOKUP_ABORT_READ_MAIL;
114 if (mail_get_physical_size(mail, &size) < 0)
116 if (mail_get_virtual_size(mail, &vsize) < 0)
119 mail->lookup_abort = old_abort;
123 int maildir_copy(struct mail_save_context *ctx, struct mail *mail)
132 mail_storage_copy_can_use_hardlink(mail->box, &mbox->box)) {
134 ret = maildir_copy_hardlink(ctx, mail);
145 return mail_storage_copy(ctx, mail);