convert-tool.c revision d1fff80640050631b06bfab904a34b2ad24601e8
/* Copyright (c) 2006-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "env-util.h"
#include "master-service.h"
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-storage-service.h"
#include "convert-storage.h"
#include <stdlib.h>
#include <unistd.h>
#define USAGE_STRING \
"Usage: <username> <home dir> <source mail env> <dest mail env>\n" \
" [skip_broken_mailboxes] [skip_dotfiles] [alt_hierarchy_char=<c>]"
{
struct master_service *service;
struct mail_storage_service_input input;
struct convert_plugin_settings set;
struct mail_namespace *dest_ns;
struct mail_namespace_settings ns_set;
const char *error;
int i, c, ret = 0;
}
else
}
i_fatal("Failed to create destination "
}
if (ret > 0)
i_info("Successfully converted");
else if (ret == 0)
i_error("Source storage not found");
else
i_error("Internal failure");
return ret <= 0 ? 1 : 0;
}