/** * @see org.apache.james.rrt.lib.AbstractRecipientRewriteTable#mapAddressInternal(java.lang.String, * java.lang.String) */ protected String mapAddressInternal(String user, String domain) throws RecipientRewriteTableException { if (mappings == null) { return null; } else { return RecipientRewriteTableUtil.getTargetString(user, domain, mappings); } }
/** * Map any virtual recipients to real recipients using the configured * mapping. * * @param recipientsMap * the mapping of virtual to real recipients */ @Override protected void mapRecipients(Map<MailAddress, String> recipientsMap) { Collection<MailAddress> recipients = recipientsMap.keySet(); for (MailAddress source : recipients) { String user = source.getLocalPart().toLowerCase(Locale.US); Domain domain = source.getDomain(); String targetString = RecipientRewriteTableUtil.getTargetString(user, domain, mappings); if (targetString != null) { recipientsMap.put(source, targetString); } } }