convert-tool.c revision b439928e47cb120eacee4ff1eb53156ae31d30dc
/* Copyright (C) 2006 Timo Sirainen */
#include "lib.h"
#include "ioloop.h"
#include "randgen.h"
#include "lib-signals.h"
#include "mail-storage.h"
#include "convert-storage.h"
#include <stdlib.h>
{
int ret = 0;
lib_init();
random_init();
if (argc <= 4) {
i_fatal("Usage: <username> <home dir> "
"<source mail env> <dest mail env> "
"[<1=skip broken mailboxes>]");
}
ioloop = io_loop_create();
if (ret > 0)
i_info("Successfully converted");
else if (ret == 0)
i_error("Source storage not found");
else
i_error("Internal failure");
lib_deinit();
return ret;
}