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 ba...@apache.org on 2006/12/31 18:54:31 UTC

svn commit: r491459 - in /james/server/sandbox/handlerapi-experiment: TODO src/test/org/apache/james/test/util/Util.java

Author: bago
Date: Sun Dec 31 09:54:30 2006
New Revision: 491459

URL: http://svn.apache.org/viewvc?view=rev&rev=491459
Log:
Remove unused code from Util, added few TODOs for the branch experiments.

Modified:
    james/server/sandbox/handlerapi-experiment/TODO
    james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/test/util/Util.java

Modified: james/server/sandbox/handlerapi-experiment/TODO
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/TODO?view=diff&rev=491459&r1=491458&r2=491459
==============================================================================
--- james/server/sandbox/handlerapi-experiment/TODO (original)
+++ james/server/sandbox/handlerapi-experiment/TODO Sun Dec 31 09:54:30 2006
@@ -6,3 +6,7 @@
 - Check AuthRequiredToRelayRcptHook to see if it is correct to return different SMTP codes if Auth is announced (for relaying denied)
 - Remove CURRENT_RECIPIENT key from state usage: I think we don't use it anymore but in tests.
 - Check why testDNSRBLRehectWorks was expecting 550, while we return now 554 (or maybe we should return 530, but not 550).
+- RcptOptions: introduce a new extension points to have Handlers to declare support for given command options so that the syntax check can support them.
+  - maybe also add to Mail and Rcpt standard hooks an options map parameter (MAIL's SIZE, RCPT's ORCPT/NOTIFY keyworks)
+  - or maybe another non public api hook to be implemented by smtp extensions.
+- The AuthHook define a way to hook plain text user-pass tuple: this mean this won't work as soon as we'll try to implement another SASL mechanism: this is a common issue with POP3 APOP and IMAP SALS auth.

Modified: james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/test/util/Util.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/test/util/Util.java?view=diff&rev=491459&r1=491458&r2=491459
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/test/util/Util.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/test/util/Util.java Sun Dec 31 09:54:30 2006
@@ -22,19 +22,6 @@
 import org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.james.smtpserver.core.AuthCmdHandler;
-import org.apache.james.smtpserver.core.DataCmdHandler;
-import org.apache.james.smtpserver.core.EhloCmdHandler;
-import org.apache.james.smtpserver.core.ExpnCmdHandler;
-import org.apache.james.smtpserver.core.HeloCmdHandler;
-import org.apache.james.smtpserver.core.HelpCmdHandler;
-import org.apache.james.smtpserver.core.MailCmdHandler;
-import org.apache.james.smtpserver.core.QuitCmdHandler;
-import org.apache.james.smtpserver.core.RcptCmdHandler;
-import org.apache.james.smtpserver.core.RsetCmdHandler;
-import org.apache.james.smtpserver.core.SendMailHandler;
-import org.apache.james.smtpserver.core.VrfyCmdHandler;
-import org.apache.james.smtpserver.core.WelcomeMessageHandler;
 import org.apache.james.test.mock.avalon.MockLogger;
 import org.apache.james.test.mock.james.MockMailServer;
 import org.apache.james.test.mock.javaxmail.MockMimeMessage;
@@ -113,35 +100,6 @@
     public static DefaultConfiguration createRemoteManagerHandlerChainConfiguration() {
         DefaultConfiguration handlerChainConfig = new DefaultConfiguration("test");
         return handlerChainConfig;
-    }
-    public static DefaultConfiguration createSMTPHandlerChainConfiguration() {
-        DefaultConfiguration handlerChainConfig = new DefaultConfiguration("handlerchain");
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("HELO", HeloCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("EHLO", EhloCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("AUTH", AuthCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("VRFY", VrfyCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("EXPN", ExpnCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("MAIL", MailCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("RCPT", RcptCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("DATA", DataCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("RSET", RsetCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("HELP", HelpCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("QUIT", QuitCmdHandler.class));
-        // mail sender
-        handlerChainConfig.addChild(createCommandHandlerConfiguration(null, SendMailHandler.class));
-        // welcome message handler
-        handlerChainConfig.addChild(createCommandHandlerConfiguration(null, WelcomeMessageHandler.class));
-        return handlerChainConfig;
-    }
-
-    private static DefaultConfiguration createCommandHandlerConfiguration(String command, Class commandClass) {
-        DefaultConfiguration cmdHandlerConfig = new DefaultConfiguration("handler");
-        if (command != null) {
-            cmdHandlerConfig.setAttribute("command", command);
-        }
-        String classname = commandClass.getName();
-        cmdHandlerConfig.setAttribute("class", classname);
-        return cmdHandlerConfig;
     }
 
     public static MockMail createMockMail2Recipients(MimeMessage m) throws ParseException {



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