enum mail_flags save_flags;
struct istream *crlf_input;
- if (mail_index_is_deleted(trans->box->index)) {
- mailbox_set_deleted(trans->box);
- return -1;
- }
-
T_BEGIN {
const char *path;
struct dbox_save_mail *save_mail;
uoff_t mail_size, append_offset;
- if (mail_index_is_deleted(_ctx->transaction->box->index)) {
- mailbox_set_deleted(_ctx->transaction->box);
- return -1;
- }
-
/* get the size of the mail to be saved, if possible */
if (i_stream_get_size(input, TRUE, &mail_size) <= 0) {
const struct stat *st;
struct dbox_file *file;
int ret;
- if (mail_index_is_deleted(_ctx->transaction->box->index)) {
- mailbox_set_deleted(_ctx->transaction->box);
- return -1;
- }
-
file = sdbox_file_init(ctx->mbox, 0);
ctx->append_ctx = dbox_file_append_init(file);
ret = dbox_file_get_append_stream(ctx->append_ctx,
return 0;
}
- if (mail_index_is_deleted(dest_mbox->box.index)) {
- mailbox_set_deleted(&dest_mbox->box);
- return -1;
- }
-
memset(&do_ctx, 0, sizeof(do_ctx));
do_ctx.dest_path = str_new(default_pool, 512);
string_t *path;
int fd;
- if (mail_index_is_deleted(mbox->box.index)) {
- mailbox_set_deleted(box);
- return -1;
- }
-
path = t_str_new(256);
str_append(path, dir);
str_append_c(path, '/');
return -1;
}
- if (mail_index_is_deleted(mbox->box.index)) {
- mailbox_set_deleted(&mbox->box);
- return -1;
- }
-
if ((_t->flags & MAILBOX_TRANSACTION_FLAG_ASSIGN_UIDS) != 0 ||
ctx->ctx.uid != 0)
want_mail = TRUE;
struct mailbox *box = (*ctx)->transaction->box;
int ret;
+ if (mail_index_is_deleted(box->index)) {
+ mailbox_set_deleted(box);
+ return -1;
+ }
+
if (box->v.save_begin == NULL) {
mail_storage_set_error(box->storage, MAIL_ERROR_NOTPOSSIBLE,
"Saving messages not supported");
int ret;
*_ctx = NULL;
+
+ if (mail_index_is_deleted(box->index)) {
+ mailbox_set_deleted(box);
+ mailbox_save_cancel(_ctx);
+ return -1;
+ }
+
ret = ctx->transaction->box->v.copy(ctx, mail);
if (keywords != NULL)
mailbox_keywords_unref(box, &keywords);