{
@Override
public Object run()
{
MailStore mailStore = new ExchangeMailStore(exchangeURL, 12, 4);
MailWriter mailWriter = HBaseMailWriter.create(emailTable.getTable(), keyHeader,
emailTable.getFamily());
HBaseUserFolderSyncStateStorage syncStateHandler =
new HBaseUserFolderSyncStateStorage(userTable.getManager(), userTable.getName());
try
{
Iterable<String> users = new LdapFetcher(ldapDomain).getPrincipals();
removeUsers(users, senderEmail, ignoredEmail);
Iterable<MailboxItem> mailboxItems = mailStore.getMail(users, syncStateHandler);
mailWriter.write(mailboxItems);
}
catch (PrincipalFetchException e)
{
e.printStackTrace();