protocolHandlerChain.put("usersrepository", usersRepository);
InMemoryMailboxSessionMapperFactory factory = new InMemoryMailboxSessionMapperFactory();
MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
mailboxManager = new StoreMailboxManager<Long>(factory, new Authenticator() {
@Override
public boolean isAuthentic(String userid, CharSequence passwd) {
try {
return usersRepository.test(userid, passwd.toString());