1 17 18 package org.apache.james.transport.matchers; 19 20 import org.apache.mailet.GenericMatcher; 21 import org.apache.mailet.Mail; 22 import org.apache.mailet.MailAddress; 23 24 import java.util.Collection ; 25 import java.util.StringTokenizer ; 26 27 37 public class SMTPAuthSuccessful extends GenericMatcher { 38 39 42 private final static String SMTP_AUTH_USER_ATTRIBUTE_NAME = "org.apache.james.SMTPAuthUser"; 43 44 public Collection match(Mail mail) { 45 String authUser = (String ) mail.getAttribute(SMTP_AUTH_USER_ATTRIBUTE_NAME); 46 if (authUser != null) { 47 return mail.getRecipients(); 48 } else { 49 return null; 50 } 51 } 52 } 53 | Popular Tags |