hi,
to avoid NPEs when having commented out "heloEhloEnforcement" like it is
in vanilla config.xml, I had great success changing line 226 of
SMTPServer into this
heloEhloEnforcement =
handlerConfiguration.getChild("heloEhloEnforcement", false) != null &&
handlerConfiguration.getChild("heloEhloEnforcement",
true).getValueAsBoolean();
Bernd
[EMAIL PROTECTED] wrote:
Author: bago
Date: Sat Apr 15 06:58:51 2006
New Revision: 394291
URL: http://svn.apache.org/viewcvs?rev=394291&view=rev
Log:
Configure option to disable heloEhloEnforcement for better compatibility with
earlier James versions (JAMES-477)
Patch by Norman Maurer
URL:
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/smtpserver/SMTPServer.java?rev=394291&r1=394290&r2=394291&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/smtpserver/SMTPServer.java
(original)
+++ james/server/trunk/src/java/org/apache/james/smtpserver/SMTPServer.java Sat
Apr 15 06:58:51 2006
@@ -93,6 +93,11 @@
private boolean verifyIdentity = false;
/**
+ * Whether the server needs helo to be send first
+ */
+ private boolean heloEhloEnforcement = false;
+
+ /**
* This is a Network Matcher that should be configured to contain
* authorized networks that bypass SMTP AUTH requirements.
*/
@@ -217,6 +222,10 @@
if (getLogger().isInfoEnabled()) {
getLogger().info("The idle timeout will be reset every " + lengthReset +
" bytes.");
}
+
+ heloEhloEnforcement = handlerConfiguration.getChild("heloEhloEnforcement").getValueAsBoolean();
+
+ if (authRequiredString.equals("true")) authRequired = AUTH_REQUIRED;
//set the logger
ContainerUtil.enableLogging(handlerChain,getLogger());
@@ -421,6 +430,13 @@
*/
public UsersRepository getUsersRepository() {
return SMTPServer.this.users;
+ }
+
+ /**
+ * @see
org.apache.james.smtpserver.SMTPHandlerConfigurationData#useHeloEnforcement()
+ */
+ public boolean useHeloEhloEnforcement() {
+ return SMTPServer.this.heloEhloEnforcement;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]