// Register imap cnd file
JCRUtils.registerCnd(repository, workspace, user, pass);
MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass);
JCRCachingUidProvider uidProvider = new JCRCachingUidProvider(sessionRepos);
JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos);
JCRMailboxManager manager = new JCRMailboxManager(mf, null, uidProvider);
manager.init();
setMailboxManager(manager);