pop3-migration-plugin.c revision 3bfdab4b3bea87b5c89f31502ef59380afc9e079
2ronwalf#include "istream-header-filter.h"
38daenzerorama#include "message-size.h"
2ronwalf#include "message-header-hash.h"
2ronwalf#include "message-header-parser.h"
2ronwalf#include "mail-cache.h"
2ronwalf#include "mail-namespace.h"
2ronwalf#include "mail-search-build.h"
2ronwalf#include "index-storage.h"
38daenzerorama#include "index-mail.h"
2ronwalf#include "pop3-migration-plugin.h"
2ronwalfstruct msg_map_common {
2ronwalfstruct pop3_uidl_map {
2ronwalfstruct imap_msg_map {
2ronwalfstruct pop3_migration_mail_storage {
2ronwalf const char *pop3_box_vname;
2ronwalfstruct pop3_migration_mailbox {
2ronwalf unsigned int first_unfound_idx;
2ronwalfstatic const char *hdr_hash_skip_headers[] = {
2ronwalfstruct pop3_hdr_context {
38daenzerorama return FALSE;
38daenzerorama /* "header: \r\n \r\n" - Zimbra's BODY[HEADER] strips this line away. */
38daenzerorama return TRUE;
38daenzeroramastatic void
bool *have_eoh_r)
const unsigned char *data;
const char *errstr;
bool have_eoh;
int ret;
if (have_eoh) {
if (ret == 0) {
if (!have_eoh)
return TRUE;
return FALSE;
return box;
struct mailbox_transaction_context *t;
const char *uidl;
int ret = 0;
(void)mailbox_transaction_commit(&t);
return ret;
struct mailbox_transaction_context *t;
int ret = 0;
if (ret > 0)
(void)mailbox_transaction_commit(&t);
unsigned first_seq)
first_seq) < 0)
const unsigned int uidl_cache_idx =
struct mailbox_transaction_context *t;
int ret = 0;
(void)mailbox_transaction_commit(&t);
return ret;
int ret;
if (ret >= 0)
if (ret == 0) {
for (i = 0; i < count; i++) {
uidl_match++;
size_match++;
int ret;
pop3_idx++;
imap_idx++;
if (ret < 0)
pop3_idx++;
else if (ret > 0)
imap_idx++;
missing_uids_count = 0;
if (all_imap_mails_found)
struct mailbox_transaction_context *t;
unsigned int i, count;
unsigned int field_idx;
for (i = 0; i < count; i++) {
i_unreached();
(void)mailbox_transaction_commit(&t);
const char **value_r)
static struct mail_search_context *
MAIL_FETCH_POP3_ORDER)) != 0 &&
const char *pop3_box_vname;
void pop3_migration_plugin_deinit(void)