Discussion:
[Classpathx-javamail] [JIRAH / PROD] Problem retrieving a message from a POP3 server
Jean-Guillaume BATTAGLIA
2006-11-13 13:50:41 UTC
Permalink
Hello.

I'm trying to run an application named JIRA on an application server named
JOnAS.

JOnAS uses GNU javamail.

When I try to connect to a POP3 Server, I can't retrieve any message.

Here are the log files :

javax.mail.MessagingException: Unexpected response: ;
nested exception is:
java.net.ProtocolException: Unexpected response:
at
gnu.mail.providers.pop3.POP3Message.fetchContent(POP3Message.java:107)
at
gnu.mail.providers.pop3.POP3Message.getDataHandler(POP3Message.java:120)
at
javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1295)
at com.atlassian.mail.MailUtils.getBody(MailUtils.java:109)
at
com.atlassian.jira.service.util.handler.CreateIssueHandler.getDescription(CreateIssueHandler.java:254)
at
com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:143)
at
com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:119)
at
com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:182)
at
com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59)
at
com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
nested exception is:
java.net.ProtocolException: Unexpected response:
at
org.jpackage.mail.inet.pop3.POP3Connection.getResponse(POP3Connection.java:791)
at
org.jpackage.mail.inet.pop3.POP3Connection.retr(POP3Connection.java:597)
at
gnu.mail.providers.pop3.POP3Message.fetchContent(POP3Message.java:96)
at
gnu.mail.providers.pop3.POP3Message.getDataHandler(POP3Message.java:120)
at
javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1295)
at com.atlassian.mail.MailUtils.getBody(MailUtils.java:109)
at
com.atlassian.jira.service.util.handler.CreateIssueHandler.getDescription(CreateIssueHandler.java:254)
at
com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:143)
at
com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:119)
at
com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:182)
at
com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59)
at
com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)


2006-11-07 14:13:19,229 : pop3 : JiraQuartzScheduler_Worker-0 :
POP3Connection.send : > RETR 1
2006-11-07 14:13:19,231 : pop3 : JiraQuartzScheduler_Worker-0 :
POP3Connection.getResponse : <


Do you have any idea about what could cause this problem ?

Thanks in advance for your help.


Jean-Guillaume BATTAGLIA

Tél interne : 23 99 83
Tél externe : +33 (0)1 43 23 99 83
Chris Burdess
2006-11-13 15:42:31 UTC
Permalink
Post by Jean-Guillaume BATTAGLIA
I'm trying to run an application named JIRA on an application server named
JOnAS.
JOnAS uses GNU javamail.
When I try to connect to a POP3 Server, I can't retrieve any message.
POP3Connection.send : > RETR 1
POP3Connection.getResponse : <
Do you have any idea about what could cause this problem ?
Your POP3 server is not speaking POP3.
--
Chris Burdess
Jean-Guillaume BATTAGLIA
2006-11-13 16:14:54 UTC
Permalink
Hello.

Thanks for your answer.

Could you develop your answer please because we have the same problem with
a Lotus Notes Server and a Microsoft Server ?

What can we do to make them speak POP3 ?

It's working with the Sun javamail implementation...


TIA for your answer.


Jean-Guillaume BATTAGLIA

Tél interne : 23 99 83
Tél externe : +33 (0)1 43 23 99 83





Chris Burdess <***@bluezoo.org>
Sent by: ***@dinopsis.arachsys.com
13/11/2006 16:42

To
classpathx-***@gnu.org
cc
Adminet SITS <***@ca-sits.com>
Subject
Re: [Classpathx-javamail] [JIRAH / PROD] Problem retrieving a message from
a POP3 server
Post by Jean-Guillaume BATTAGLIA
I'm trying to run an application named JIRA on an application server
named
Post by Jean-Guillaume BATTAGLIA
JOnAS.
JOnAS uses GNU javamail.
When I try to connect to a POP3 Server, I can't retrieve any message.
POP3Connection.send : > RETR 1
POP3Connection.getResponse : <
Do you have any idea about what could cause this problem ?
Your POP3 server is not speaking POP3.
--
Chris Burdess
Chris Burdess
2006-11-13 18:41:26 UTC
Permalink
Post by Jean-Guillaume BATTAGLIA
Could you develop your answer please because we have the same
problem with a Lotus Notes Server and a Microsoft Server ?
What can we do to make them speak POP3 ?
It's working with the Sun javamail implementation...
I might be able to work around the problem if I had a Lotus Notes
server or a Microsoft server to test against, but I don't. It seems
likely that your server is including additional empty response lines
for some reason. This is not spec compliant: see

http://www.ietf.org/rfc/rfc1939.txt

section 3.

If you were willing to set up a test server with external access, and
give me valid credentials for it, I could test this hypothesis and
perhaps come up with a patch for GNU JavaMail. Otherwise I recommend
you use the RI, which will be published under GPL shortly.
--
犬 Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
Jean-Guillaume BATTAGLIA
2006-11-14 11:13:41 UTC
Permalink
Hello.

I won't be able to give you access to our mail servers or setup a test
server.

I have Ethereal traces of the communication between the application and
the POP3 server.

Perhaps it will help you see the problem more precisely.


One trace was made using Sun javamail.




The other one using GNU mail :





What did you mean by "I recommend you use the RI". What is the RI ?



Thanks in advance for your help.


Jean-Guillaume BATTAGLIA

T?l interne : 23 99 83
T?l externe : +33 (0)1 43 23 99 83



Chris Burdess <***@bluezoo.org>
13/11/2006 19:41

To
Jean-Guillaume BATTAGLIA <jean-***@ca-sits.com>
cc
classpathx-***@gnu.org
Subject
Re: [Classpathx-javamail] [JIRAH / PROD] Problem retrieving a message from
a POP3 server
Post by Jean-Guillaume BATTAGLIA
Could you develop your answer please because we have the same
problem with a Lotus Notes Server and a Microsoft Server ?
What can we do to make them speak POP3 ?
It's working with the Sun javamail implementation...
I might be able to work around the problem if I had a Lotus Notes
server or a Microsoft server to test against, but I don't. It seems
likely that your server is including additional empty response lines
for some reason. This is not spec compliant: see

http://www.ietf.org/rfc/rfc1939.txt

section 3.

If you were willing to set up a test server with external access, and
give me valid credentials for it, I could test this hypothesis and
perhaps come up with a patch for GNU JavaMail. Otherwise I recommend
you use the RI, which will be published under GPL shortly.
--
$B8$(B Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
Chris Burdess
2006-11-14 11:31:26 UTC
Permalink
Post by Jean-Guillaume BATTAGLIA
I have Ethereal traces of the communication between the application
and the POP3 server.
Perhaps it will help you see the problem more precisely.
I don't understand. In both of these traces the client uses TOP, not
RETR, to get the message, and the transaction is successful. However
in the details of the error you sent the client was using RETR.
Post by Jean-Guillaume BATTAGLIA
What did you mean by "I recommend you use the RI". What is the RI ?
The reference implementation, Sun's implementation.
--
犬 Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
Jean-Guillaume BATTAGLIA
2006-11-14 14:41:06 UTC
Permalink
Sorry for the misunderstanding.

The first log files I sent were from our environment (with the RETR
messages).

The Ethereal traces were from the JOnAS support Team who made tests on
their POP3 server.


I'm really sorry to hear you say that Lotus Notes and Microsoft Exchange
(which are two of the most common mail servers) don't speak a correct POP3
language but there is really nothing I can do about this.
Could you tell me which POP3 servers were "certified" with GNU javamail ?


So I guess I will use the Sun javamail implementation.


Thank you for your answers.


Jean-Guillaume BATTAGLIA

T?l interne : 23 99 83
T?l externe : +33 (0)1 43 23 99 83



Chris Burdess <***@bluezoo.org>
14/11/2006 12:31

To
Jean-Guillaume BATTAGLIA <jean-***@ca-sits.com>
cc
classpathx-***@gnu.org, "Adminet SITS" <***@ca-sits.com>
Subject
Re: [Classpathx-javamail] [JIRAH / PROD] Problem retrieving a message from
a POP3 server
Post by Jean-Guillaume BATTAGLIA
I have Ethereal traces of the communication between the application
and the POP3 server.
Perhaps it will help you see the problem more precisely.
I don't understand. In both of these traces the client uses TOP, not
RETR, to get the message, and the transaction is successful. However
in the details of the error you sent the client was using RETR.
Post by Jean-Guillaume BATTAGLIA
What did you mean by "I recommend you use the RI". What is the RI ?
The reference implementation, Sun's implementation.
--
$B8$(B Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
Chris Burdess
2006-11-14 14:50:48 UTC
Permalink
Post by Jean-Guillaume BATTAGLIA
I'm really sorry to hear you say that Lotus Notes and Microsoft
Exchange (which are two of the most common mail servers) don't
speak a correct POP3 language but there is really nothing I can do
about this.
Could you tell me which POP3 servers were "certified" with GNU
javamail ?
It was tested with Courier, qpopper, and ipop3d.
--
犬 Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
Loading...