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 "Stefano Bagnara (JIRA)" <se...@james.apache.org> on 2005/09/03 19:06:30 UTC

[jira] Created: (JAMES-419) NPE during 8bit conversion of non-mime messages

NPE during 8bit conversion of non-mime messages
-----------------------------------------------

         Key: JAMES-419
         URL: http://issues.apache.org/jira/browse/JAMES-419
     Project: James
        Type: Bug
  Components: Remote Delivery  
    Versions: 2.3.0    
    Reporter: Stefano Bagnara
 Assigned to: Soren Hilmer 


Just sending a message with no mime informations:
---------------
Received: from localhost ([127.0.0.1])
          by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
          Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
Subject: test
Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
From: test@test.org

test
.
-----------
03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.NullPointerException
	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
	at java.lang.Thread.run(Thread.java:534)
-----------


-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]

Stefano Bagnara updated JAMES-419:
----------------------------------

    Fix Version: 2.3.0

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]
     
Stefano Bagnara resolved JAMES-419:
-----------------------------------

    Resolution: Fixed
     Assign To: Stefano Bagnara  (was: Soren Hilmer)

Thanks to Mirko for the patch.
I tryed Javamail 1.3.3 and the bug is still present so I added the workaround to the RemoteDelivery.

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-419?page=comments#action_12374636 ] 

Stefano Bagnara commented on JAMES-419:
---------------------------------------

There are problems also when accepting 8bit mails and trying to deliver to non 8bitmime servers. The conversion to 7bit corrupt the message headers (content transfer enconding) .

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug

>   Components: Remote Delivery
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>     Priority: Blocker
>      Fix For: 2.3.0a1
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Mirko Montanari (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]

Mirko Montanari updated JAMES-419:
----------------------------------

    Attachment: patch.txt

This issue appears to be a javamail bug: if the allow8bitmime property is set the sun's SMTPTransport checks the message to decide which encoding use to send it.  If the encoding information of a text mimepart is missing a null pointer exception is thrown.

The attached patch is a workaround for that: it adds the header "Content-Transfert-Encoding: 7bit" to all the text mime part where no encoding information is given.


> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0
>     Reporter: Stefano Bagnara
>     Assignee: Soren Hilmer
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]
     
Stefano Bagnara resolved JAMES-419:
-----------------------------------

    Fix Version: 2.3.0a2
                     (was: 2.3.0a1)
     Resolution: Fixed

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug

>   Components: Remote Delivery
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>     Priority: Blocker
>      Fix For: 2.3.0a2
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Reopened: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]
     
Stefano Bagnara reopened JAMES-419:
-----------------------------------


Hi guys,

i just log in  my mailet log and see this error: 

l1139901678401-5 to host 127.0.0.1 at 127.0.0.1 for addresses
[vpopmail@hxxx]
14/02/06 08:21:19 INFO  James.Mailet: RemoteDelivery: Exception caught
in RemoteDelivery.run()
java.lang.NullPointerException
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
        at
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
        at
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
        at java.lang.Thread.run(Thread.java:595)

what can be the problem ?
I use the latest james trunk version

bye

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0a1
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-419?page=all ]

Stefano Bagnara updated JAMES-419:
----------------------------------

    Priority: Blocker  (was: Major)

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug

>   Components: Remote Delivery
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>     Priority: Blocker
>      Fix For: 2.3.0a1
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-419) NPE during 8bit conversion of non-mime messages

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-419?page=comments#action_12367412 ] 

Stefano Bagnara commented on JAMES-419:
---------------------------------------

Javamail 1.3.2 SMTPTransport@702:
"if (enc.equalsIgnoreCase("quoted-printable") ||"
Probably you're trying to send a message with no encoding. Btw It should not throw an NPE!

Please post here the message your are trying to send so we can debug the problem.

Thank you for reporting it. 
---------------------------------------

Unfortunately generic exceptions in the delivery process ends in message purging:

} catch (Exception e) {
// Prevent unexpected exceptions from causing looping by removing
// message from outgoing.
// DO NOT CHNANGE THIS to catch Error!  For example, if there were an OutOfMemory condition
// caused because something else in the server was abusing memory, we would not want to
// start purging the outgoing spool!
outgoing.remove(key);
throw e;
}
} catch (Throwable e) {
if (!destroyed) log("Exception caught in RemoteDelivery.run()", e);
}


---------------------------

Norman Maurer wrote:
> But why not put the message to the error-processor so it wold be easier
> to trigger such errors.

Is not so easy: read the comment of the catch.

Eg: Now the NPE is a bug in javamail, but we can't know what to do: if the NPE was from the "store" of the repository then storing the message in the error-processor would end in an infinite loop.

We probably should change our behaviour only when the exception is caused by the "delivery" call.

I'll try to put in this improvement for 2.3.0a2. But I would also like to find out the NPE problem while working on that code.

Stefano


-------------------------------

Got again a Nullpointer..

is there no solution to store the email that do this ?


17/02/06 18:27:43 INFO  James.Mailet: RemoteDelivery: Exception caught
in RemoteDelivery.run()
java.lang.NullPointerException
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
        at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
        at
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
        at
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
        at java.lang.Thread.run(Thread.java:595)


Its quite hard to debug if the email is gone  :-( 

bye

> NPE during 8bit conversion of non-mime messages
> -----------------------------------------------
>
>          Key: JAMES-419
>          URL: http://issues.apache.org/jira/browse/JAMES-419
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0a1
>  Attachments: patch.txt
>
> Just sending a message with no mime informations:
> ---------------
> Received: from localhost ([127.0.0.1])
>           by BAGOMIPS (JAMES SMTP Server 2.3-dev) with SMTP ID 254;
>           Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> Subject: test
> Date: Sat, 3 Sep 2005 18:23:04 +0200 (CEST)
> From: test@test.org
> test
> .
> -----------
> 03/09/05 18:23:07 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:521)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1050)
> 	at java.lang.Thread.run(Thread.java:534)
> -----------

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org