[jira] Commented: (JAMES-52) 8bitmime capabilities missing

2006-05-10 Thread Stefano Bagnara (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-52?page=comments#action_12378964 ] 

Stefano Bagnara commented on JAMES-52:
--

You can read the current status here:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0605&L=javamail-interest&F=&S=&P=3478


> 8bitmime capabilities missing
> -
>
>  Key: JAMES-52
>  URL: http://issues.apache.org/jira/browse/JAMES-52
>  Project: James
> Type: Improvement

>   Components: SMTPServer
> Versions: 2.0a3, 2.1.3, 2.2.0
>  Environment: Operating System: All
> Platform: All
> Reporter: brady moritz
> Assignee: Stefano Bagnara
>  Fix For: 2.3.0a1

>
> I am using an IIS front end server which forwards email to the james backend 
> server. The front server accepts 8bitmime messages but then cannot forward 
> them 
> to the james server, resulting in an error message being sent to the 
> admininstrator(me). It should be a simple matter to add support for 8 bit and 
> it may even be supported intrinsicly, but the james server does nont 
> advertise 
> it via the EHLO commannd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-52) 8bitmime capabilities missing

2006-05-10 Thread Stefano Bagnara (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-52?page=comments#action_12378962 ] 

Stefano Bagnara commented on JAMES-52:
--

Unfortunately the 7bit/8bit/Encoding issue is still there.
In 1.4 they only applied a "workaround" to the getPart that now caches the 
getContent result so that multiple calls to getContent or modifications to the 
contentreturned are applied without calling the setContent, but the problem is 
that when you read a stream it should also call a savechanges that is not 
called, and I can't call the saveChanges after the SMTPTransport.convertTo8bit 
code.


> 8bitmime capabilities missing
> -
>
>  Key: JAMES-52
>  URL: http://issues.apache.org/jira/browse/JAMES-52
>  Project: James
> Type: Improvement

>   Components: SMTPServer
> Versions: 2.0a3, 2.1.3, 2.2.0
>  Environment: Operating System: All
> Platform: All
> Reporter: brady moritz
> Assignee: Stefano Bagnara
>  Fix For: 2.3.0a1

>
> I am using an IIS front end server which forwards email to the james backend 
> server. The front server accepts 8bitmime messages but then cannot forward 
> them 
> to the james server, resulting in an error message being sent to the 
> admininstrator(me). It should be a simple matter to add support for 8 bit and 
> it may even be supported intrinsicly, but the james server does nont 
> advertise 
> it via the EHLO commannd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-348) make JDK independent (e.g. also IBM JVM should work)

2006-05-10 Thread Stefano Bagnara (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-348?page=comments#action_12378948 ] 

Stefano Bagnara commented on JAMES-348:
---

No, we still depend on 
org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory
The document you linked is from the 2.1 documentation, and I don't see where it 
say something about not using the TLSServerSocketFactory.

We upgraded the cornerstone sockets to the latest 2.1 release, don't know if it 
fix anything.


> make JDK independent (e.g. also IBM JVM should work)
> 
>
>  Key: JAMES-348
>  URL: http://issues.apache.org/jira/browse/JAMES-348
>  Project: James
> Type: Improvement

>   Components: James Core
> Versions: 2.1.3
>  Environment: redhat 9
> Reporter: Ralf Hauser

>
> INFO2004-10-07 17:30:21.087 [Phoenix.] (): 18 Blocks to process for phase 
> "startup". Order of processing = [priva, dnsserver, o
> bjectstorage, database-connections, mailstore, users-store, thread-manager, 
> connections, sockets, scheduler, James, spoolmanager, r
> emotemanager, pop3server, smtpserver, nntp-repository, nntpserver, fetchpop].
> ERROR   2004-10-07 17:30:23.285 [Phoenix.] (): Component named "sockets" 
> failed to pass through the Initialization stage. (Reason:
> java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> ERROR   2004-10-07 17:30:23.286 [Phoenix.] (): There was an error running 
> phase "startup" for Block named "sockets". (Reason: Compo
> nent named "sockets" failed to pass through the Initialization stage. 
> (Reason: java.lang.NoClassDefFoundError: sun/security/provide
> r/Sun).).
> org.apache.excalibur.containerkit.lifecycle.LifecycleException: Component 
> named "sockets" failed to pass through the Initialization
>  stage. (Reason: java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> at 
> org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:289)
> at 
> org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:159)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:480)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:428)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:364)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:138)
> at 
> org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:251)
> rethrown from
> java.lang.NoClassDefFoundError: sun/security/provider/Sun
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
> at java.lang.Class.getConstructor1(Class.java:2063)
> at java.lang.Class.newInstance3(Class.java:331)
> at java.lang.Class.newInstance(Class.java:305)
> at 
> org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager.createFactory(DefaultSocketManager.java:135)
> at 
> org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager.setupServerSocketFactory(DefaultSocketManager.java:93)
> INFO2004-10-07 17:30:23.302 [Phoenix.] (): exception while 
> starting:Component named "sockets" failed to pass through the Initia
> lization stage. (Reason: java.lang.NoClassDefFoundError: 
> sun/security/provider/Sun).
> WARN2004-10-07 17:30:23.308 [Phoenix.] (): Failed to start application 
> james.
> org.apache.avalon.framework.CascadingException: Failed to start application 
> james.
> at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:195)
> at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:254)
> at 
> org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:353)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:498)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:491)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:476)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:466)
> rethrown from
> org.apache.avalon.phoenix.interfaces.ApplicationException: Component named 
> "sockets" failed to pass through the Initialization stag
> e. (Reason: java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:144)
> at 
> org.apache.avalon.framework.container.ContainerUtil.star

svn commit: r405795 [5/5] - in /james/server/trunk: ./ src/test/org/apache/james/ src/test/org/apache/james/core/ src/test/org/apache/james/mailrepository/ src/test/org/apache/james/pop3server/ src/te

2006-05-10 Thread bago
Modified: 
james/server/trunk/src/test/org/apache/james/util/ExtraDotOutputStreamTest.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/test/org/apache/james/util/ExtraDotOutputStreamTest.java?rev=405795&r1=405794&r2=405795&view=diff
==
--- 
james/server/trunk/src/test/org/apache/james/util/ExtraDotOutputStreamTest.java 
(original)
+++ 
james/server/trunk/src/test/org/apache/james/util/ExtraDotOutputStreamTest.java 
Wed May 10 09:46:54 2006
@@ -1,69 +1,69 @@
-/***
- * Copyright (c) 2000-2006 The Apache Software Foundation. *
- * All rights reserved.*
- * --- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you *
- * may not use this file except in compliance with the License. You*
- * may obtain a copy of the License at:*
- * *
- * http://www.apache.org/licenses/LICENSE-2.0  *
- * *
- * Unless required by applicable law or agreed to in writing, software *
- * distributed under the License is distributed on an "AS IS" BASIS,   *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
- * implied.  See the License for the specific language governing   *
- * permissions and limitations under the License.  *
- ***/
-package org.apache.james.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for the ExtraDotOutputStream
- */
-public class ExtraDotOutputStreamTest extends TestCase {
-
-public void testMain() throws IOException {
-String data = ".This is a test\r\nof the thing.\r\nWe should not have 
much trouble.\r\n.doubled?\r\nor not?\n.doubled\nor not?\r\n\r\n\n\n\r\r\r\n";
-ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-OutputStream os = new ExtraDotOutputStream(bOut);
-os.write(data.getBytes());
-os.flush();
-String expected = "..This is a test\r\nof the thing.\r\nWe should not 
have much trouble.\r\n..doubled?\r\nor not?\r\n..doubled\r\nor 
not?\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
-assertEquals(expected,bOut.toString());
-}
-
-/*
- * Test method for 
'org.apache.james.util.ExtraDotOutputStream.checkCRLFTerminator()'
- */
-public void testCheckCRLFTerminator() throws IOException {
-ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-ExtraDotOutputStream os = new ExtraDotOutputStream(bOut);
-// if the stream is empty then we should not add the CRLF.
-os.checkCRLFTerminator();
-os.flush();
-assertEquals("",bOut.toString());
-os.write("Test".getBytes());
-os.flush();
-assertEquals("Test",bOut.toString());
-os.checkCRLFTerminator();
-os.flush();
-assertEquals("Test\r\n",bOut.toString());
-// if the stream ends with \r we should simply add the \n
-os.write("A line with incomplete ending\r".getBytes());
-os.flush();
-assertEquals("Test\r\nA line with incomplete 
ending\r",bOut.toString());
-os.checkCRLFTerminator();
-os.flush();
-assertEquals("Test\r\nA line with incomplete 
ending\r\n",bOut.toString());
-// already correctly terminated, should leave the output untouched
-os.checkCRLFTerminator();
-os.flush();
-assertEquals("Test\r\nA line with incomplete 
ending\r\n",bOut.toString());
-}
-
-}
+/***
+ * Copyright (c) 2000-2006 The Apache Software Foundation. *
+ * All rights reserved.*
+ * --- *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you *
+ * may not use this file except in compliance with the License. You*
+ * may obtain a copy of the License at:*
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0  *
+ * *
+ * Unless required by applicable law or agreed to in writing, software *
+ * distributed under the License is distributed on an "AS IS" BASIS,   *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
+ * implied.  See the License for the specific language governing   *
+ * permissions and limit

svn commit: r405790 - in /james/server/trunk/src: java/org/apache/james/pop3server/POP3HandlerChain.java java/org/apache/james/pop3server/PassCmdHandler.java test/org/apache/james/pop3server/POP3Serve

2006-05-10 Thread bago
Author: bago
Date: Wed May 10 09:28:20 2006
New Revision: 405790

URL: http://svn.apache.org/viewcvs?rev=405790&view=rev
Log:
Readded "lost" STAT command to the default POP3HandlerChain, Added more error 
handling + logging to the PassCmdHandler (check the user inbox is valid), Fixed 
POP3ServerTest to always provide an inbox to the mock mailserver (fix a 
regression introduced in JAMES-487)

Modified:

james/server/trunk/src/java/org/apache/james/pop3server/POP3HandlerChain.java
james/server/trunk/src/java/org/apache/james/pop3server/PassCmdHandler.java
james/server/trunk/src/test/org/apache/james/pop3server/POP3ServerTest.java

Modified: 
james/server/trunk/src/java/org/apache/james/pop3server/POP3HandlerChain.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/pop3server/POP3HandlerChain.java?rev=405790&r1=405789&r2=405790&view=diff
==
--- 
james/server/trunk/src/java/org/apache/james/pop3server/POP3HandlerChain.java 
(original)
+++ 
james/server/trunk/src/java/org/apache/james/pop3server/POP3HandlerChain.java 
Wed May 10 09:28:20 2006
@@ -72,6 +72,7 @@
 cmds.setProperty("NOOP",NoopCmdHandler.class.getName());
 cmds.setProperty("RETR",RetrCmdHandler.class.getName());
 cmds.setProperty("TOP" ,TopCmdHandler.class.getName());
+cmds.setProperty("STAT",StatCmdHandler.class.getName());
 cmds.setProperty("QUIT",QuitCmdHandler.class.getName());
 Enumeration e = cmds.keys();
 while (e.hasMoreElements()) {

Modified: 
james/server/trunk/src/java/org/apache/james/pop3server/PassCmdHandler.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/pop3server/PassCmdHandler.java?rev=405790&r1=405789&r2=405790&view=diff
==
--- james/server/trunk/src/java/org/apache/james/pop3server/PassCmdHandler.java 
(original)
+++ james/server/trunk/src/java/org/apache/james/pop3server/PassCmdHandler.java 
Wed May 10 09:28:20 2006
@@ -17,10 +17,13 @@
 
 package org.apache.james.pop3server;
 
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.james.services.MailRepository;
+
 /**
   * Handles PASS command
   */
-public class PassCmdHandler implements CommandHandler {
+public class PassCmdHandler extends AbstractLogEnabled implements 
CommandHandler {
 
 /**
  * @see org.apache.james.pop3server.CommandHandler#onCommand(POP3Session)
@@ -41,16 +44,27 @@
 if (session.getHandlerState() == POP3Handler.AUTHENTICATION_USERSET && 
argument != null) {
 String passArg = argument;
 if 
(session.getConfigurationData().getUsersRepository().test(session.getUser(), 
passArg)) {
-StringBuffer responseBuffer =
-new StringBuffer(64)
-.append(POP3Handler.OK_RESPONSE)
-.append(" Welcome ")
-.append(session.getUser());
-responseString = responseBuffer.toString();
-session.setHandlerState(POP3Handler.TRANSACTION);
-session.writeResponse(responseString);
-
session.setUserInbox(session.getConfigurationData().getMailServer().getUserInbox(session.getUser()));
-session.stat();
+try {
+MailRepository inbox = 
session.getConfigurationData().getMailServer().getUserInbox(session.getUser());
+if (inbox == null) {
+throw new IllegalStateException("MailServer returned a 
null inbox for "+session.getUser());
+}
+session.setUserInbox(inbox);
+session.stat();
+StringBuffer responseBuffer =
+new StringBuffer(64)
+.append(POP3Handler.OK_RESPONSE)
+.append(" Welcome ")
+.append(session.getUser());
+responseString = responseBuffer.toString();
+session.setHandlerState(POP3Handler.TRANSACTION);
+session.writeResponse(responseString);
+} catch (RuntimeException e) {
+getLogger().error("Unexpected error accessing mailbox for 
"+session.getUser(),e);
+responseString = POP3Handler.ERR_RESPONSE + " Unexpected 
error accessing mailbox";
+session.setHandlerState(POP3Handler.AUTHENTICATION_READY);
+session.writeResponse(responseString);
+}
 } else {
 responseString = POP3Handler.ERR_RESPONSE + " Authentication 
failed.";
 session.setHandlerState(POP3Handler.AUTHENTICATION_READY);

Modified: 
james/server/trunk/src/test/org/apac

[jira] Commented: (JAMES-348) make JDK independent (e.g. also IBM JVM should work)

2006-05-10 Thread Ralf Hauser (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-348?page=comments#action_12378945 ] 

Ralf Hauser commented on JAMES-348:
---

I see 
http://james.apache.org/usingTLS_2_1.html#Configuring%20the%20Server%20Socket%20Factory
  , does this mean that the dependency on 
cornerstone/.../socket/SSLFactoryBuilder.java is gone...

> make JDK independent (e.g. also IBM JVM should work)
> 
>
>  Key: JAMES-348
>  URL: http://issues.apache.org/jira/browse/JAMES-348
>  Project: James
> Type: Improvement

>   Components: James Core
> Versions: 2.1.3
>  Environment: redhat 9
> Reporter: Ralf Hauser

>
> INFO2004-10-07 17:30:21.087 [Phoenix.] (): 18 Blocks to process for phase 
> "startup". Order of processing = [priva, dnsserver, o
> bjectstorage, database-connections, mailstore, users-store, thread-manager, 
> connections, sockets, scheduler, James, spoolmanager, r
> emotemanager, pop3server, smtpserver, nntp-repository, nntpserver, fetchpop].
> ERROR   2004-10-07 17:30:23.285 [Phoenix.] (): Component named "sockets" 
> failed to pass through the Initialization stage. (Reason:
> java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> ERROR   2004-10-07 17:30:23.286 [Phoenix.] (): There was an error running 
> phase "startup" for Block named "sockets". (Reason: Compo
> nent named "sockets" failed to pass through the Initialization stage. 
> (Reason: java.lang.NoClassDefFoundError: sun/security/provide
> r/Sun).).
> org.apache.excalibur.containerkit.lifecycle.LifecycleException: Component 
> named "sockets" failed to pass through the Initialization
>  stage. (Reason: java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> at 
> org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:289)
> at 
> org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:159)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:480)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:428)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:364)
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:138)
> at 
> org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:251)
> rethrown from
> java.lang.NoClassDefFoundError: sun/security/provider/Sun
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
> at java.lang.Class.getConstructor1(Class.java:2063)
> at java.lang.Class.newInstance3(Class.java:331)
> at java.lang.Class.newInstance(Class.java:305)
> at 
> org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager.createFactory(DefaultSocketManager.java:135)
> at 
> org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager.setupServerSocketFactory(DefaultSocketManager.java:93)
> INFO2004-10-07 17:30:23.302 [Phoenix.] (): exception while 
> starting:Component named "sockets" failed to pass through the Initia
> lization stage. (Reason: java.lang.NoClassDefFoundError: 
> sun/security/provider/Sun).
> WARN2004-10-07 17:30:23.308 [Phoenix.] (): Failed to start application 
> james.
> org.apache.avalon.framework.CascadingException: Failed to start application 
> james.
> at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:195)
> at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:254)
> at 
> org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:353)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:498)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:491)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:476)
> at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:466)
> rethrown from
> org.apache.avalon.phoenix.interfaces.ApplicationException: Component named 
> "sockets" failed to pass through the Initialization stag
> e. (Reason: java.lang.NoClassDefFoundError: sun/security/provider/Sun).
> at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:144)
> at 
> org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:251)
> at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:178)
>

[jira] Resolved: (JAMES-488) Remove static access of DNSServer

2006-05-10 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-488?page=all ]
 
Norman Maurer resolved JAMES-488:
-

Resolution: Fixed

All needed changes should be complete

> Remove static access of DNSServer
> -
>
>  Key: JAMES-488
>  URL: http://issues.apache.org/jira/browse/JAMES-488
>  Project: James
> Type: Improvement

>   Components: DNSServer
> Reporter: Norman Maurer
> Assignee: Norman Maurer
>  Attachments: DNSServer-non-static-usage2.patch, 
> DNSServer-not-static-usage.patch
>
> We should remove all static access to DNSServer and move the methods to the 
> DNSServer interface. After that we should be able to acces this via the 
> interface Serviceable. 
> This will it make easier to write junit tests etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r405788 [1/2] - in /james/server/trunk/src: conf/ java/org/apache/james/dnsserver/ java/org/apache/james/fetchmail/ java/org/apache/james/services/ java/org/apache/james/smtpserver/ java/o

2006-05-10 Thread norman
Author: norman
Date: Wed May 10 09:04:39 2006
New Revision: 405788

URL: http://svn.apache.org/viewcvs?rev=405788&view=rev
Log:
Changes for resolv this issue JAMES-488 
This remove all static calles of DNSServer methods. 

Modified:
james/server/trunk/src/conf/james-assembly.xml
james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java
james/server/trunk/src/java/org/apache/james/fetchmail/FetchMail.java
james/server/trunk/src/java/org/apache/james/fetchmail/FetchScheduler.xinfo
james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java

james/server/trunk/src/java/org/apache/james/fetchmail/ParsedConfiguration.java

james/server/trunk/src/java/org/apache/james/fetchmail/ProcessorAbstract.java
james/server/trunk/src/java/org/apache/james/services/DNSServer.java
james/server/trunk/src/java/org/apache/james/smtpserver/DNSRBLHandler.java
james/server/trunk/src/java/org/apache/james/smtpserver/EhloCmdHandler.java
james/server/trunk/src/java/org/apache/james/smtpserver/HeloCmdHandler.java
james/server/trunk/src/java/org/apache/james/smtpserver/SMTPServer.java

james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java

james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractNetworkMatcher.java

james/server/trunk/src/java/org/apache/james/transport/matchers/InSpammerBlacklist.java
james/server/trunk/src/java/org/apache/james/util/NetMatcher.java
james/server/trunk/src/test/org/apache/james/smtpserver/SMTPServerTest.java

Modified: james/server/trunk/src/conf/james-assembly.xml
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/conf/james-assembly.xml?rev=405788&r1=405787&r2=405788&view=diff
==
--- james/server/trunk/src/conf/james-assembly.xml (original)
+++ james/server/trunk/src/conf/james-assembly.xml Wed May 10 09:04:39 2006
@@ -114,6 +114,7 @@
  
role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/> 
   
 
+
   
 
   

Modified: james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java?rev=405788&r1=405787&r2=405788&view=diff
==
--- james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java 
(original)
+++ james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java Wed 
May 10 09:04:39 2006
@@ -509,14 +509,14 @@
 /**
  * @see java.net.InetAddress#getByName(String)
  */
-public static InetAddress getByName(String host) throws 
UnknownHostException {
+public InetAddress getByName(String host) throws UnknownHostException {
 return org.xbill.DNS.Address.getByName(allowIPLiteral(host));
 }
 
 /**
  * @see java.net.InetAddress#getByAllName(String)
  */
-public static InetAddress[] getAllByName(String host) throws 
UnknownHostException {
+public InetAddress[] getAllByName(String host) throws UnknownHostException 
{
 return org.xbill.DNS.Address.getAllByName(allowIPLiteral(host));
 }
 

Modified: james/server/trunk/src/java/org/apache/james/fetchmail/FetchMail.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/fetchmail/FetchMail.java?rev=405788&r1=405787&r2=405788&view=diff
==
--- james/server/trunk/src/java/org/apache/james/fetchmail/FetchMail.java 
(original)
+++ james/server/trunk/src/java/org/apache/james/fetchmail/FetchMail.java Wed 
May 10 09:04:39 2006
@@ -39,6 +39,7 @@
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.james.services.MailServer;
 import org.apache.james.services.UsersRepository;
+import org.apache.james.services.DNSServer;
 
 /**
  * Class FetchMail is an Avalon task that is periodically
@@ -394,8 +395,13 @@
/**
  * The Local Users repository
  */
-private UsersRepository fieldLocalUsers;
-
+private UsersRepository fieldLocalUsers; 
+
+/**
+ * The DNSServer
+ */
+private DNSServer dnsServer;
+
 /**
  * Constructor for POP3mail.
  */
@@ -424,7 +430,8 @@
 configuration,
 getLogger(),
 getServer(),
-getLocalUsers());
+getLocalUsers(),
+getDNSServer());
 setConfiguration(parsedConfiguration);
 
 // Setup the Accounts
@@ -594,7 +601,10 @@
 "does not implement the required interface.");
 throw new ServiceException("", errorBuffer.toString());
 }
-
+
+DNSServer dnsServer = (DNSServer) manager.lookup(DNSServer.ROLE);
+setDNSServer(dnsServer);
+
 UsersRepository usersRepos

[jira] Commented: (JAMES-52) 8bitmime capabilities missing

2006-05-10 Thread Soren Hilmer (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-52?page=comments#action_12378915 ] 

Soren Hilmer commented on JAMES-52:
---

So SUN finally closed this bug (4403733) as fixed apparently in JavaMail 1.4. 
Great!

> 8bitmime capabilities missing
> -
>
>  Key: JAMES-52
>  URL: http://issues.apache.org/jira/browse/JAMES-52
>  Project: James
> Type: Improvement

>   Components: SMTPServer
> Versions: 2.0a3, 2.1.3, 2.2.0
>  Environment: Operating System: All
> Platform: All
> Reporter: brady moritz
> Assignee: Stefano Bagnara
>  Fix For: 2.3.0a1

>
> I am using an IIS front end server which forwards email to the james backend 
> server. The front server accepts 8bitmime messages but then cannot forward 
> them 
> to the james server, resulting in an error message being sent to the 
> admininstrator(me). It should be a simple matter to add support for 8 bit and 
> it may even be supported intrinsicly, but the james server does nont 
> advertise 
> it via the EHLO commannd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-486) Spool managing commands for remote manager

2006-05-10 Thread Norman Maurer (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-486?page=comments#action_12378900 ] 

Norman Maurer commented on JAMES-486:
-

Just commit the RemoteDelivery-fix.patch and add a bugreport JAMES-489. I 
consider to add this patch before Stefano has complete his work cause its a bug.

> Spool managing commands for remote manager
> --
>
>  Key: JAMES-486
>  URL: http://issues.apache.org/jira/browse/JAMES-486
>  Project: James
> Type: New Feature

> Reporter: Norman Maurer
> Assignee: Norman Maurer
>  Attachments: RemoteDelivery-retry-fix.patch, 
> RemoteManager-SpoolManagement.patch
>
> Spool managing commands for remote manager - first proposal for review

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (JAMES-489) ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate and error_message 0

2006-05-10 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-489?page=all ]
 
Norman Maurer resolved JAMES-489:
-

Resolution: Fixed

> ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate 
> and error_message 0
> 
>
>  Key: JAMES-489
>  URL: http://issues.apache.org/jira/browse/JAMES-489
>  Project: James
> Type: Bug

> Reporter: Norman Maurer
> Assignee: Norman Maurer

>
> The RemoteDelivery Mailet throws an ArrayIndexOutOfBoundsException if it 
> retry to send an email with state error and error_message 0. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-489) ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate and error_message 0

2006-05-10 Thread Norman Maurer (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-489?page=comments#action_12378899 ] 

Norman Maurer commented on JAMES-489:
-

Commit the patch

> ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate 
> and error_message 0
> 
>
>  Key: JAMES-489
>  URL: http://issues.apache.org/jira/browse/JAMES-489
>  Project: James
> Type: Bug

> Reporter: Norman Maurer
> Assignee: Norman Maurer

>
> The RemoteDelivery Mailet throws an ArrayIndexOutOfBoundsException if it 
> retry to send an email with state error and error_message 0. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r405730 - /james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java

2006-05-10 Thread norman
Author: norman
Date: Wed May 10 05:06:17 2006
New Revision: 405730

URL: http://svn.apache.org/viewcvs?rev=405730&view=rev
Log:
Fix ArrayIndexOutOfBoundsException descripted in JAMES-489

Modified:

james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java

Modified: 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java?rev=405730&r1=405729&r2=405730&view=diff
==
--- 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
 (original)
+++ 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
 Wed May 10 05:06:17 2006
@@ -155,6 +155,10 @@
 if (state.equals(Mail.ERROR)) {
 //Test the time...
 int retries = Integer.parseInt(errorMessage);
+
+// If the retries count is 0 we should try to send the mail 
now!
+if (retries == 0) return true;
+
 long delay = getNextDelay (retries);
 long timeToProcess = delay + lastUpdated;
 
@@ -1172,7 +1176,7 @@
 private long getNextDelay (int retry_count) {
 if (retry_count > delayTimes.length) {
 return DEFAULT_DELAY_TIME;
-}
+} 
 return delayTimes[retry_count-1];
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Assigned: (JAMES-489) ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate and error_message 0

2006-05-10 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-489?page=all ]

Norman Maurer reassigned JAMES-489:
---

Assign To: Norman Maurer

> ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate 
> and error_message 0
> 
>
>  Key: JAMES-489
>  URL: http://issues.apache.org/jira/browse/JAMES-489
>  Project: James
> Type: Bug

> Reporter: Norman Maurer
> Assignee: Norman Maurer

>
> The RemoteDelivery Mailet throws an ArrayIndexOutOfBoundsException if it 
> retry to send an email with state error and error_message 0. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (JAMES-489) ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate and error_message 0

2006-05-10 Thread Norman Maurer (JIRA)
ArrayIndexOutOfBoundsException in RemoteDelivery when an mail has errorstate 
and error_message 0


 Key: JAMES-489
 URL: http://issues.apache.org/jira/browse/JAMES-489
 Project: James
Type: Bug

Reporter: Norman Maurer


The RemoteDelivery Mailet throws an ArrayIndexOutOfBoundsException if it retry 
to send an email with state error and error_message 0. 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-263) SMTPAuthSuccessful and authorizedAddresses

2006-05-10 Thread Norman Maurer (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-263?page=comments#action_1237 ] 

Norman Maurer commented on JAMES-263:
-

Can we mark this as resolved cause we only query RBLLists on DNSRBLHandler when 
the connections come from a unauthorized ip. This behavoir was changes .. See  
JAMES-478

> SMTPAuthSuccessful and authorizedAddresses
> --
>
>  Key: JAMES-263
>  URL: http://issues.apache.org/jira/browse/JAMES-263
>  Project: James
> Type: Wish

>   Components: SMTPServer, Matchers/Mailets (bundled)
> Reporter: Hontvari Jozsef
> Priority: Minor

>
> There should be a matcher (and a mail attribute) which "returns true" if the 
> sender agent is smtp authorized OR it is coming from an authorized address so 
> no smtp authentication is required. 
> This is useful to avoid querying blacklists for local servers.
> Either we should create a new matcher (SMTPAuthorized?) or change the 
> behaviour of SMTPAuthSuccessful, which currently doesn't match in case of 
> authorized addresses.
> In order to do this I believe a new (boolean?) mail attribute is required, 
> similar to the existing org.apache.james.SMTPAuthUser, for example 
> org.apache.james.SMTPFromAuthorizedAddress.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Assigned: (JAMES-124) Add the ability to "kick" the outgoing queue

2006-05-10 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-124?page=all ]

Norman Maurer reassigned JAMES-124:
---

Assign To: Norman Maurer

This feature will be added (passed on my patch) after Stefano complete the 
refactoring of RemoteManager. 

> Add the ability to "kick" the outgoing queue
> 
>
>  Key: JAMES-124
>  URL: http://issues.apache.org/jira/browse/JAMES-124
>  Project: James
> Type: New Feature

>   Components: MailStore & MailRepository
> Versions: 2.1.3, 2.0a3, 2.2.0
>  Environment: Operating System: All
> Platform: All
> Reporter: Jason Webb
> Assignee: Norman Maurer
> Priority: Minor

>
> It would be nice to be able to "kick" the outgoing queue to force the queue 
> to 
> deliver all it's pending mail. This is useful after a problem that affects 
> all 
> mail deliveries.
> On a related note the SMTP might also want to support ETRN as well if there 
> anybody uses it anymore.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]