dsync-mail.c revision d9b9687bf8cae9cfb070b1b7aadefa683220269f
/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "hex-binary.h"
#include "md5.h"
#include "istream.h"
#include "istream-crlf.h"
#include "message-size.h"
#include "mail-storage.h"
#include "dsync-mail.h"
/* These should be good enough to identify all normal mails. Received: header
would make it even better, but those can be somewhat large. Also these
fields can be looked up using IMAP ENVELOPE, which is more efficient in
some IMAP servers. */
static const char *hashed_headers[] = {
};
{
struct mailbox_header_lookup_ctx *hdr_ctx;
struct md5_context md5_ctx;
unsigned char md5_result[MD5_RESULTLEN];
const unsigned char *data;
int ret = 0;
if (ret < 0)
return -1;
while (!i_stream_is_eof(input)) {
break;
if (size == 0)
break;
}
if (input->stream_errno != 0)
ret = -1;
return ret;
}
const char **error_field_r)
{
*error_field_r = "GUID";
return -1;
}
*error_field_r = "body";
return -1;
}
*error_field_r = "pop3-uidl";
return -1;
}
*error_field_r = "pop3-order";
return -1;
}
if (*str != '\0') {
i_unreached();
}
*error_field_r = "received-date";
return -1;
}
return 0;
}
static void
{
unsigned int i, count;
if (!array_is_created(src))
return;
if (count == 0)
return;
for (i = 0; i < count; i++) {
}
}
struct dsync_mail_change *dest_r)
{
}
}