summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-10-25 20:42:46 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-10-25 20:42:46 (GMT)
commit9a8c66ec3b1fbd873815403a8e038140af7ee736 (patch)
tree04c5c5a00d324e6b0e06cde6791f467c1d53c9f4
parent3df855466673f66ca8b5df233f55cded971d5c9a (diff)
downloadkolab-utils-9a8c66ec3b1fbd873815403a8e038140af7ee736.tar.gz
Added exchangeimap as possible source server.
-rw-r--r--migrationutility/main.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/migrationutility/main.cpp b/migrationutility/main.cpp
index eb962b2..0d27376 100644
--- a/migrationutility/main.cpp
+++ b/migrationutility/main.cpp
@@ -39,14 +39,26 @@ int main(int argc, char *argv[])
KCmdLineOptions options;
options.add("dry", ki18n("Dry run, doesn't change anything on the server, but only prints what would be done (Use with care until this is well tested)."));
+ options.add("from <type>", ki18n("Source host type (kolab2, kolab3, exchangeimap)"));
- options.add("from <type>", ki18n("Source host type"));
options.add("from-kolab2-host <host>", ki18n("Source Kolab2 host"));
options.add("from-kolab2-port <port>", ki18n("Port"), "143");
options.add("from-kolab2-user <loginname>", ki18n("Username for single-user migration"));
options.add("from-kolab2-proxyauth <loginname>", ki18n("Username to be used for authentication together with password (optional, works with PLAIN/SASL authentication)"));
options.add("from-kolab2-password <password>", ki18n("Password"));
+ options.add("from-kolab3-host <host>", ki18n("Source Kolab3 host"));
+ options.add("from-kolab3-port <port>", ki18n("Port"), "143");
+ options.add("from-kolab3-user <loginname>", ki18n("Username for single-user migration"));
+ options.add("from-kolab3-proxyauth <loginname>", ki18n("Username to be used for authentication together with password (optional, works with PLAIN/SASL authentication)"));
+ options.add("from-kolab3-password <password>", ki18n("Password"));
+
+ options.add("from-exchangeimap-host <host>", ki18n("Source Exchange IMAP host"));
+ options.add("from-exchangeimap-port <port>", ki18n("Port"), "143");
+ options.add("from-exchangeimap-user <loginname>", ki18n("Username for single-user migration"));
+ options.add("from-exchangeimap-proxyauth <loginname>", ki18n("Username to be used for authentication together with password (optional, works with PLAIN/SASL authentication)"));
+ options.add("from-exchangeimap-password <password>", ki18n("Password"));
+
options.add("to <type>", ki18n("Target host type"));
options.add("to-kolab3-host <host>", ki18n("Target Kolab3 host"));
options.add("to-kolab3-port <port>", ki18n("Port"), "143");
@@ -72,8 +84,7 @@ int main(int argc, char *argv[])
kolabSourceServer->setSingleUser(args->getOption("from-kolab2-user"));
}
sourceServer = kolabSourceServer;
- }
- if (!args->getOption("from").compare("kolab3", Qt::CaseInsensitive)) {
+ } else if (!args->getOption("from").compare("kolab3", Qt::CaseInsensitive)) {
Debug() << "From Kolab3 Server";
KolabSourceServer *kolabSourceServer = new KolabSourceServer(&app);
kolabSourceServer->setHost(args->getOption("from-kolab3-host"), args->getOption("from-kolab3-port").toInt());
@@ -82,6 +93,15 @@ int main(int argc, char *argv[])
kolabSourceServer->setSingleUser(args->getOption("from-kolab3-user"));
}
sourceServer = kolabSourceServer;
+ } else if (!args->getOption("from").compare("exchangeimap", Qt::CaseInsensitive)) {
+ Debug() << "From Exchange IMAP Server";
+ ExchangeIMAPSourceServer *source = new ExchangeIMAPSourceServer(&app);
+ source->setHost(args->getOption("from-exchangeimap-host"), args->getOption("from-exchangeimap-port").toInt());
+ source->setAdminCredentials(args->getOption("from-exchangeimap-proxyauth"), args->getOption("from-exchangeimap-password"));
+ if (args->isSet("from-exchangeimap-user")) {
+ source->setSingleUser(args->getOption("from-exchangeimap-user"));
+ }
+ sourceServer = source;
}
KolabServer *kolabServer = 0;