You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/08/16 19:37:00 UTC
svn commit: r986070 -
/james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java
Author: norman
Date: Mon Aug 16 17:37:00 2010
New Revision: 986070
URL: http://svn.apache.org/viewvc?rev=986070&view=rev
Log:
Add more wildcard matching for IsInWhitelist
Modified:
james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java
Modified: james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java?rev=986070&r1=986069&r2=986070&view=diff
==============================================================================
--- james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java (original)
+++ james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java Mon Aug 16 17:37:00 2010
@@ -124,6 +124,32 @@ public class IsInWhiteList extends Abstr
// This address was already in the list
return true;
}
+
+
+ // check for wildcard recipient domain entries
+ selectStmt = conn.prepareStatement(selectByPK);
+
+ selectStmt.setString(1, "*");
+ selectStmt.setString(2, recipientHost);
+ selectStmt.setString(3, senderUser);
+ selectStmt.setString(4, senderHost);
+ selectRS = selectStmt.executeQuery();
+ if (selectRS.next()) {
+ // This address was already in the list
+ return true;
+ }
+ // check for wildcard domain entries on both
+ selectStmt = conn.prepareStatement(selectByPK);
+
+ selectStmt.setString(1, "*");
+ selectStmt.setString(2, recipientHost);
+ selectStmt.setString(3, "*");
+ selectStmt.setString(4, senderHost);
+ selectRS = selectStmt.executeQuery();
+ if (selectRS.next()) {
+ // This address was already in the list
+ return true;
+ }
} finally {
theJDBCUtil.closeJDBCResultSet(selectRS);
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org