public void addAddressMapping(String user, String domain, String address) throws RecipientRewriteTableException {
if (address.indexOf('@') < 0) {
try {
address = address + "@" + domainList.getDefaultDomain();
} catch (DomainListException e) {
throw new RecipientRewriteTableException("Unable to retrieve default domain", e);
}
}
try {
new MailAddress(address);
} catch (ParseException e) {
throw new RecipientRewriteTableException("Invalid emailAddress: " + address, e);
}
checkMapping(user, domain, address);
getLogger().info("Add address mapping => " + address + " for user: " + user + " domain: " + domain);
addMappingInternal(user, domain, address);