Author: norman
Date: Tue Sep 27 19:05:46 2011
New Revision: 1176531
URL: http://svn.apache.org/viewvc?rev=1176531&view=rev
Log:
Finish the "import" of the lmtpserver code base. Its now reusable without any
dependencies on james server. See PROTOCOLS-1
Modified:
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/CoreCmdHandlerLoader.java
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/netty/LMTPServer.java
Modified:
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/CoreCmdHandlerLoader.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/CoreCmdHandlerLoader.java?rev=1176531&r1=1176530&r2=1176531&view=diff
==============================================================================
---
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/CoreCmdHandlerLoader.java
(original)
+++
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/CoreCmdHandlerLoader.java
Tue Sep 27 19:05:46 2011
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.james.lmtpserver.hook.MailboxDeliverToRecipientHandler;
import org.apache.james.protocols.api.handler.HandlersPackage;
import org.apache.james.protocols.lmtp.LhloCmdHandler;
-import org.apache.james.protocols.lmtp.LhloWelcomeMessageHandler;
+import org.apache.james.protocols.lmtp.WelcomeMessageHandler;
import org.apache.james.protocols.smtp.core.ExpnCmdHandler;
import org.apache.james.protocols.smtp.core.log.HookResultLogger;
import org.apache.james.protocols.smtp.core.NoopCmdHandler;
@@ -61,7 +61,7 @@ public class CoreCmdHandlerLoader implem
private final String RSETCMDHANDLER = RsetCmdHandler.class.getName();
private final String VRFYCMDHANDLER = VrfyCmdHandler.class.getName();
private final String MAILSIZEHOOK = MailSizeEsmtpExtension.class.getName();
- private final String WELCOMEMESSAGEHANDLER =
LhloWelcomeMessageHandler.class.getName();
+ private final String WELCOMEMESSAGEHANDLER =
WelcomeMessageHandler.class.getName();
private final String POSTMASTERABUSEHOOK =
PostmasterAbuseRcptHook.class.getName();
private final String AUTHREQUIREDTORELAY =
AuthRequiredToRelayRcptHook.class.getName();
private final String RECEIVEDDATALINEFILTER =
ReceivedDataLineFilter.class.getName();
Modified:
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/netty/LMTPServer.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/netty/LMTPServer.java?rev=1176531&r1=1176530&r2=1176531&view=diff
==============================================================================
---
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/netty/LMTPServer.java
(original)
+++
james/server/trunk/lmtpserver/src/main/java/org/apache/james/lmtpserver/netty/LMTPServer.java
Tue Sep 27 19:05:46 2011
@@ -28,8 +28,8 @@ import org.apache.james.lmtpserver.jmx.J
import org.apache.james.protocols.api.handler.HandlersPackage;
import org.apache.james.protocols.impl.ResponseEncoder;
import org.apache.james.protocols.lib.netty.AbstractProtocolAsyncServer;
-import org.apache.james.protocols.smtp.SMTPConfiguration;
-import org.apache.james.protocols.smtp.SMTPProtocol;
+import org.apache.james.protocols.lmtp.LMTPConfiguration;
+import org.apache.james.protocols.lmtp.LMTPProtocol;
import org.apache.james.smtpserver.netty.SMTPChannelUpstreamHandler;
import org.jboss.netty.channel.ChannelUpstreamHandler;
import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
@@ -43,7 +43,7 @@ public class LMTPServer extends Abstract
* 0, means no limit.
*/
private long maxMessageSize = 0;
- private LMTPConfiguration lmtpConfig = new LMTPConfiguration();
+ private LMTPConfigurationImpl lmtpConfig = new LMTPConfigurationImpl();
private String lmtpGreeting;
@@ -89,7 +89,7 @@ public class LMTPServer extends Abstract
/**
* A class to provide SMTP handler configuration to the handlers
*/
- public class LMTPConfiguration implements SMTPConfiguration {
+ public class LMTPConfigurationImpl extends LMTPConfiguration {
/**
* @see
org.apache.james.protocols.smtp.SMTPConfiguration#getHelloName()
@@ -98,12 +98,7 @@ public class LMTPServer extends Abstract
return LMTPServer.this.getHelloName();
}
- /**
- * @see
org.apache.james.protocols.smtp.SMTPConfiguration#getResetLength()
- */
- public int getResetLength() {
- return -1;
- }
+
/**
* @see
org.apache.james.protocols.smtp.SMTPConfiguration#getMaxMessageSize()
@@ -113,46 +108,13 @@ public class LMTPServer extends Abstract
}
/**
- * Relaying not allowed with LMTP
- */
- public boolean isRelayingAllowed(String remoteIP) {
- return false;
- }
-
- /**
- * No enforcement
- */
- public boolean useHeloEhloEnforcement() {
- return false;
- }
-
- /**
* @see
org.apache.james.protocols.smtp.SMTPConfiguration#getSMTPGreeting()
*/
public String getSMTPGreeting() {
return LMTPServer.this.lmtpGreeting;
}
- /**
- * @see
org.apache.james.protocols.smtp.SMTPConfiguration#useAddressBracketsEnforcement()
- */
- public boolean useAddressBracketsEnforcement() {
- return true;
- }
-
- /**
- * @see
org.apache.james.protocols.smtp.SMTPConfiguration#isAuthRequired(java.lang.String)
- */
- public boolean isAuthRequired(String remoteIP) {
- return true;
- }
-
- /**
- * @see
org.apache.james.protocols.smtp.SMTPConfiguration#isStartTLSSupported()
- */
- public boolean isStartTLSSupported() {
- return false;
- }
+
}
/*
@@ -197,7 +159,7 @@ public class LMTPServer extends Abstract
@Override
protected ChannelUpstreamHandler createCoreHandler() {
- SMTPProtocol protocol = new SMTPProtocol(getProtocolHandlerChain(),
lmtpConfig);
+ LMTPProtocol protocol = new LMTPProtocol(getProtocolHandlerChain(),
lmtpConfig);
return new SMTPChannelUpstreamHandler(protocol, getLogger());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]