@Override
public Destination lookup(Recipient recipient) {
LocalPart recipientLocalPart = recipient.localPart();
for (GlobalUser user : users) {
if (user.getUsername().matches(recipientLocalPart)) {
MaildropDestination destination = new MaildropDestination();
destination.setMaildropName(user.getUsername().toString());
destination.setMaildropRepository(maildropRepository);
return destination;
}
}
return null;