Hi All,

We are using James 2.3.2 in our production and started to see some issues for 
one of the customer who is using SMTP feature to send email to James and this 
email will be stored on local disk. Customer is using Zimbra mail server.

We understand James 2.3.2 very old version and is out of support. But if anyone 
is still using James 2.3.2 and can help us on error that we are can see in 
James logs.

Recently we found this conversation where Noel J. Bergman had offered to help 
on any issue on 2.3.2. please find the link below.
https://www.mail-archive.com/server-dev@james.apache.org/msg70615.html


Exception we see in James logs:

08/07/21 14:41:21 ERROR smtpserver-tls: Unknown error occurred while processing 
DATA.
javax.mail.MessagingException: Error in input stream;
  nested exception is:
    java.net.ProtocolException: pre-mature end of data
    at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:365)
    at org.apache.james.core.MailHeaders.<init>(MailHeaders.java:61)
    at 
org.apache.james.smtpserver.DataCmdHandler.doDATA(DataCmdHandler.java:131)
    at 
org.apache.james.smtpserver.DataCmdHandler.onCommand(DataCmdHandler.java:81)
    at 
org.apache.james.smtpserver.SMTPHandler.handleConnection(SMTPHandler.java:393)
    at 
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnection.java:432)
    at 
org.apache.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:55)
    at org.apache.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:116)
Caused by: java.net.ProtocolException: pre-mature end of data
    at 
org.apache.james.util.CharTerminatedInputStream.read(CharTerminatedInputStream.java:103)
    at 
org.apache.james.util.watchdog.BytesReadResetInputStream.read(BytesReadResetInputStream.java:98)
    at 
org.apache.james.util.DotStuffingInputStream.read(DotStuffingInputStream.java:50)
    at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
    at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:342)
    ... 7 more

We have also found following code snippet from CharTerminatedInputStream.java 
which says the same.

  if (b == -1) {
                //End of stream reached without seeing the terminator
                throw new java.net.ProtocolException("pre-mature end of data");
   }


We suspect that this error is thrown when there is no termination is sent by 
the email data and end of stream is reached. We also observer for some of the 
email transfer, after the DATA command is issued we also see RESET command in 
the middle of data transfer after which there is no data received from mail 
server, is this normal behaviour ?


This issue is intermittent and does not happen for every email. We also cannot 
identify for which email transfer this error is thrown. We feel this issue may 
be due to some network related issue from Zimbra server which is failing to 
send full data to James server. Is our understanding correct here ?

Any help will be really appreciated.

Thanks & Regards,
Anup
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

Reply via email to