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/10 20:47:52 UTC

svn commit: r984160 - /james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java

Author: norman
Date: Tue Aug 10 18:47:52 2010
New Revision: 984160

URL: http://svn.apache.org/viewvc?rev=984160&view=rev
Log:
Allow to match against wildcard entries (JAMES-1034)

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=984160&r1=984159&r2=984160&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 Tue Aug 10 18:47:52 2010
@@ -110,6 +110,20 @@ public class IsInWhiteList extends Abstr
                     // This address was already in the list
                     return true;
                 }
+                
+                
+                // check for wildcard domain entries 
+                selectStmt = conn.prepareStatement(selectByPK);
+                
+                selectStmt.setString(1, recipientUser);
+                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