mail-copy.c revision 76b43e4417bab52e913da39b5f5bc2a130d3f149
/* Copyright (c) 2004-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "mail-storage-private.h"
#include "mail-copy.h"
{
struct mail_save_context *ctx;
const char *from_envelope;
return -1;
return -1;
&from_envelope) < 0)
return -1;
if (*from_envelope == '\0')
return -1;
if (mailbox_save_continue(ctx) < 0)
break;
}
if (input->stream_errno != 0) {
"copy: i_stream_read() failed: %m");
return -1;
}
return mailbox_save_finish(&ctx);
}