dbox-save.c revision c3d9da3955043aef88c17b71f2081e894186aa6b
/* Copyright (c) 2007-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "istream-crlf.h"
#include "ostream.h"
#include "str.h"
#include "hex-binary.h"
#include "index-mail.h"
#include "dbox-attachment.h"
#include "dbox-file.h"
#include "dbox-save.h"
{
enum mail_flags save_flags;
}
}
}
{
struct dbox_message_header dbox_msg_hdr;
struct istream *crlf_input;
}
/* write a dummy header. it'll get rewritten when we're finished */
sizeof(dbox_msg_hdr)) < 0) {
"o_stream_send(%s) failed: %m",
}
}
{
return -1;
return index_attachment_save_continue(_ctx);
do {
if (!mail_storage_set_error_from_errno(storage)) {
"o_stream_send_istream(%s) failed: %m",
}
return -1;
}
/* both tee input readers may consume data from our primary
input stream. we'll have to make sure we don't return with
one of the streams still having data in them. */
return 0;
}
{
}
/* e.g. zlib plugin had changed this */
}
}
const char *orig_mailbox_name,
{
struct dbox_metadata_header metadata_hdr;
const char *guid;
sizeof(metadata_hdr.magic_post));
/* a plugin changed the data written to disk, so the
"message size" dbox header doesn't contain the actual
"physical" message size. we need to save it as a
separate metadata header. */
}
(unsigned long)_ctx->received_date);
i_unreached();
(unsigned long long)vsize);
}
else {
}
if (orig_mailbox_name != NULL &&
/* save the original mailbox name so if mailbox indexes get
corrupted we can place at least some (hopefully most) of
the messages to correct mailboxes. */
}
}