Changeset 132
- Timestamp:
- 04/01/06 23:29:15 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jsmtpd/src/org/jsmtpd/plugins/filters/ldap/LdapBodyRewriter.java
r123 r132 45 45 import org.jsmtpd.core.mail.Email; 46 46 import org.jsmtpd.core.mail.EmailAddress; 47 import org.jsmtpd.core.mail.InvalidAddress; 47 48 import org.jsmtpd.core.mail.Rcpt; 48 49 /** … … 135 136 Attributes attributes = result.getAttributes(); 136 137 Attribute uid = attributes.get(ldapUserPrimaryMail); 137 EmailAddress ad = new EmailAddress();138 EmailAddress ad = EmailAddress.parseAddress((String)uid.get()); 138 139 ad.setHost(recipient.getEmailAddress().getHost()); 139 ad.setUser((String)uid.get());140 140 newRecipients.add(new Rcpt(ad)); 141 141 } 142 142 } catch (NamingException e) { 143 143 log.error(" Can't query server for aliases",e); 144 } 144 } catch (InvalidAddress e) { 145 log.error(" invalid addres in alias of "+recipient.getEmailAddress().toString(),e); 146 } 145 147 146 148 if (newRecipients.size()>0) … … 164 166 Attributes attributes = result.getAttributes(); 165 167 Attribute uid = attributes.get(ldapUserPrimaryMail); 166 EmailAddress ad = new EmailAddress(); 167 ad.setHost(recipient.getEmailAddress().getHost()); 168 ad.setUser((String)uid.get()); 168 EmailAddress ad = EmailAddress.parseAddress((String)uid.get()); 169 169 newRecipients.add(new Rcpt(ad)); 170 170 } 171 171 } catch (NamingException e) { 172 172 log.error(" Can't query server for catchAll",e); 173 } 173 } catch (InvalidAddress e) { 174 log.error(" invalid addres in alias(catchall) of "+recipient.getEmailAddress().toString(),e); 175 } 174 176 175 177 if (newRecipients.size()>0)
