dbox-save.c revision b58aafbd21b365117538f73f306d22f75acd91f1
/* Copyright (c) 2007-2010 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-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;
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;
}
{
return;
/* 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));
if (ctx->saved_physical_size != 0) {
(unsigned long long)ctx->saved_physical_size);
}
(unsigned long)ctx->received_date);
(unsigned long)ioloop_time);
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. */
}
}