james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r418931 - in /james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver: ./ basefilter/ fastfailfilter/
Date Tue, 04 Jul 2006 07:22:43 GMT
Author: norman
Date: Tue Jul  4 00:22:40 2006
New Revision: 418931

URL: http://svn.apache.org/viewvc?rev=418931&view=rev
Log:
Add a new method to the CommandHandler interface to get sure that the commandHandler was configured
with a implemented commandName
Change all classes which implement the CommandHandler to implement the new method
Change SMTPHandlerChain to throw an ConfigurationException if an unimplemented commandName
was used to configure the commandHandler

Modified:
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/AuthCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/CommandHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/DataCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/EhloCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/ExpnCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HeloCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HelpCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/MailCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/NoopCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/QuitCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RcptCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RsetCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/UnknownCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/VrfyCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/DataBaseFilterCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/EhloBaseFilterCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/HeloBaseFilterCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/MailBaseFilterCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/RcptBaseFilterCmdHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/MaxRcptHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ResolvableEhloHeloHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ReverseEqualsEhloHeloHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/TarpitHandler.java
    james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ValidSenderDomainHandler.java

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/AuthCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/AuthCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/AuthCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/AuthCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -19,6 +19,9 @@
 
 import org.apache.james.util.mail.dsn.DSNStatus;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Locale;
 import java.util.StringTokenizer;
 import org.apache.james.util.Base64;
@@ -269,4 +272,14 @@
     }
 
 
+
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("AUTH");
+        
+        return implCommands;
+    }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/CommandHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/CommandHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/CommandHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/CommandHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,8 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.List;
+
 /**
  * Custom command handlers must implement this interface
  * The command handlers will be Server wide common to all the SMTPHandlers,
@@ -24,9 +26,15 @@
  * in the SMTPSession object
  */
  public interface CommandHandler {
-    /*
+    /**
      * Handle the command
     **/
     void onCommand(SMTPSession session);
 
+    /**
+     * Return a List of implemented commands
+     * 
+     * @return List which contains implemented commands
+     */
+    List getImplCommands();
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/DataCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/DataCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/DataCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/DataCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -37,6 +37,7 @@
 import java.io.InputStream;
 import java.io.SequenceInputStream;
 import java.io.StringReader;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.Enumeration;
@@ -298,6 +299,16 @@
             headersIn = null;
         }
 
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("DATA");
+        
+        return implCommands;
     }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/EhloCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/EhloCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/EhloCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/EhloCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -18,6 +18,7 @@
 package org.apache.james.smtpserver;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 
@@ -95,6 +96,16 @@
             }
         }
 
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("EHLO");
+        
+        return implCommands;
     }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/ExpnCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/ExpnCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/ExpnCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/ExpnCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -39,6 +42,16 @@
     public void onCommand(SMTPSession session) {
         String responseString = "502 "+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.SYSTEM_NOT_CAPABLE)+"
EXPN is not supported";
         session.writeResponse(responseString);
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("EXPN");
+        
+        return implCommands;
     }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HeloCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HeloCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HeloCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HeloCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -18,6 +18,9 @@
 package org.apache.james.smtpserver;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 
 
@@ -59,6 +62,16 @@
                         session.getRemoteIPAddress()).append("])");
         responseString = session.clearResponseBuffer();
         session.writeResponse(responseString);
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("HELO");
+        
+        return implCommands;
     }
     
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HelpCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HelpCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HelpCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/HelpCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -39,5 +42,14 @@
         session.writeResponse(responseString);
     }
 
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("HELP");
+        
+        return implCommands;
+    }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/MailCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/MailCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/MailCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/MailCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.util.mail.dsn.DSNStatus;
 import org.apache.mailet.MailAddress;
@@ -63,5 +66,15 @@
         responseString = session.clearResponseBuffer();
         session.writeResponse(responseString);
         
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("MAIL");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/NoopCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/NoopCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/NoopCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/NoopCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -38,6 +41,16 @@
     public void onCommand(SMTPSession session) {
         String responseString = "250 "+DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.UNDEFINED_STATUS)+"
OK";
         session.writeResponse(responseString);
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("NOOP");
+        
+        return implCommands;
     }
 
 

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/QuitCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/QuitCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/QuitCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/QuitCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -63,6 +66,15 @@
         session.endSession();
     }
 
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("QUIT");
+        
+        return implCommands;
+    }
 
 }
 

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RcptCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RcptCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RcptCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RcptCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -19,6 +19,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.util.mail.dsn.DSNStatus;
@@ -71,7 +72,17 @@
                 .append(recipientAddress).append("> OK");
         responseString = session.clearResponseBuffer();
         session.writeResponse(responseString);
-            
+             
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("RCPT");
         
+        return implCommands;
     }
+    
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RsetCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RsetCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RsetCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/RsetCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -62,6 +65,13 @@
         session.writeResponse(responseString);
     }
 
-
-
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("RSET");
+        
+        return implCommands;
+    }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
Tue Jul  4 00:22:40 2006
@@ -245,12 +245,23 @@
             if (handler instanceof CommandHandler) {
                 String commandName = config.getAttribute("command");
                 String cmds[] = commandName.split(",");
+                List implCmds = ((CommandHandler) handler).getImplCommands();
 
                 for (int i = 0; i < cmds.length; i++) {
                     commandName = cmds[i].trim().toUpperCase(Locale.US);
-                    addToMap(commandName, (CommandHandler) handler);
-                    if (getLogger().isInfoEnabled()) {
-                        getLogger().info("Added Commandhandler: " + className);
+
+                    // Check if the commandHandler implement the configured command
+                    if (implCmds.contains(commandName)) {
+                        addToMap(commandName, (CommandHandler) handler);
+                        if (getLogger().isInfoEnabled()) {
+                            getLogger().info(
+                                    "Added Commandhandler: " + className);
+                        }
+                    } else {
+                        // The Configured command is not implemented. Throw an exception
+                        throw new ConfigurationException("Commandhandler "
+                                + className + " not implement the command "
+                                + commandName);
                     }
 
                 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/UnknownCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/UnknownCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/UnknownCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/UnknownCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -49,6 +52,16 @@
         String responseString = session.clearResponseBuffer();
 
         session.writeResponse(responseString);
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("UNKNOWN");
+        
+        return implCommands;
     }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/VrfyCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/VrfyCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/VrfyCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/VrfyCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
@@ -36,6 +39,16 @@
     public void onCommand(SMTPSession session) {
         String responseString = "502 "+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.SYSTEM_NOT_CAPABLE)+"
VRFY is not supported";
         session.writeResponse(responseString);
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("VRFY");
+        
+        return implCommands;
     }
 
 

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/DataBaseFilterCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/DataBaseFilterCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/DataBaseFilterCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/DataBaseFilterCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver.basefilter;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.smtpserver.CommandHandler;
 import org.apache.james.smtpserver.SMTPSession;
@@ -68,5 +71,15 @@
             // After this filter match we should not call any other handler!
             session.getState().put(SMTPSession.STOP_HANDLER_PROCESSING, "true");
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("DATA");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/EhloBaseFilterCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/EhloBaseFilterCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/EhloBaseFilterCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/EhloBaseFilterCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,9 @@
 
 package org.apache.james.smtpserver.basefilter;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.smtpserver.CommandHandler;
 import org.apache.james.smtpserver.SMTPSession;
@@ -55,6 +58,16 @@
             // After this filter match we should not call any other handler!
             session.getState().put(SMTPSession.STOP_HANDLER_PROCESSING, "true");
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("EHLO");
+        
+        return implCommands;
     }
 
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/HeloBaseFilterCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/HeloBaseFilterCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/HeloBaseFilterCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/HeloBaseFilterCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -18,6 +18,9 @@
 package org.apache.james.smtpserver.basefilter;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.smtpserver.CommandHandler;
 import org.apache.james.smtpserver.SMTPSession;
@@ -58,5 +61,15 @@
             session.getState().put(SMTPSession.STOP_HANDLER_PROCESSING, "true");
          
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("HELO");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/MailBaseFilterCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/MailBaseFilterCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/MailBaseFilterCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/MailBaseFilterCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,6 +17,8 @@
 
 package org.apache.james.smtpserver.basefilter;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
@@ -240,6 +242,16 @@
             session.getState().put(MESG_SIZE, new Integer(size));
         }
         return true;
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("MAIL");
+        
+        return implCommands;
     }
 
 

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/RcptBaseFilterCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/RcptBaseFilterCmdHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/RcptBaseFilterCmdHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/basefilter/RcptBaseFilterCmdHandler.java
Tue Jul  4 00:22:40 2006
@@ -19,6 +19,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
@@ -269,4 +270,14 @@
         }
         return sb.toString();
     } 
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("RCPT");
+        
+        return implCommands;
+    }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/MaxRcptHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/MaxRcptHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/MaxRcptHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/MaxRcptHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,7 +17,9 @@
 
 package org.apache.james.smtpserver.fastfailfilter;
 
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
@@ -91,5 +93,15 @@
             // After this filter match we should not call any other handler!
             session.getState().put(SMTPSession.STOP_HANDLER_PROCESSING, "true");
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("RCPT");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ResolvableEhloHeloHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ResolvableEhloHeloHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ResolvableEhloHeloHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ResolvableEhloHeloHandler.java
Tue Jul  4 00:22:40 2006
@@ -30,6 +30,8 @@
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
 
 public class ResolvableEhloHeloHandler extends AbstractLogEnabled
         implements CommandHandler, Configurable, Serviceable {
@@ -107,5 +109,16 @@
                         "true");
             }
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("EHLO");
+        implCommands.add("HELO");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ReverseEqualsEhloHeloHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ReverseEqualsEhloHeloHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ReverseEqualsEhloHeloHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ReverseEqualsEhloHeloHandler.java
Tue Jul  4 00:22:40 2006
@@ -30,6 +30,8 @@
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
 
 public class ReverseEqualsEhloHeloHandler extends AbstractLogEnabled
         implements CommandHandler, Configurable, Serviceable {
@@ -123,5 +125,16 @@
                         "true");
             }
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("EHLO");
+        implCommands.add("HELO");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/TarpitHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/TarpitHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/TarpitHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/TarpitHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,7 +17,9 @@
 
 package org.apache.james.smtpserver.fastfailfilter;
 
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
@@ -119,5 +121,15 @@
             } catch (InterruptedException e) {
             }
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("RCPT");
+        
+        return implCommands;
     }
 }

Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ValidSenderDomainHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ValidSenderDomainHandler.java?rev=418931&r1=418930&r2=418931&view=diff
==============================================================================
--- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ValidSenderDomainHandler.java
(original)
+++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/fastfailfilter/ValidSenderDomainHandler.java
Tue Jul  4 00:22:40 2006
@@ -17,7 +17,9 @@
 
 package org.apache.james.smtpserver.fastfailfilter;
 
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
@@ -105,5 +107,15 @@
                 session.getState().put(SMTPSession.STOP_HANDLER_PROCESSING, "true");
             }
         }
+    }
+    
+    /**
+     * @see org.apache.james.smtpserver.CommandHandler#getImplCommands()
+     */
+    public List getImplCommands() {
+        ArrayList implCommands = new ArrayList();
+        implCommands.add("MAIL");
+        
+        return implCommands;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message