Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-11-2009, 09:42 AM
Advanced Member
 
Posts: 203
Default [SOLVED] JavaMail Exception when syncing external IMAP

Ok, this is acting like it's a problem not related to Zimbra, but I'm only experiencing it from within Zimbra, so here goes...

Trying to add an external IMAP account (to a local sendmail/dovecot system), I get this error:



Here's the corresponding log:

2009-02-11 08:11:22,375 WARN [btpool0-643] [name=bking@lakecoe.org;mid=22;ip=10.3.2.249;ua=Zim braWebClient - FF3.0 (Win)/5.0.12_GA_2789.RHEL5_64;] datasource - Test failed: DataSource: { id=TestId, type=imap, isEnabled=false, name=Test, host=mail.lake-coe.k12.ca.us, port=143, connectionType=cleartext, username=test, folderId=-1 }
com.zimbra.common.service.ServiceException: system failure: Unable to connect to mail store: DataSource: { id=TestId, type=imap, isEnabled=false, name=Test, host=mail.lake-coe.k12.ca.us, port=143, connectionType=cleartext, username=test, folderId=-1 }
ExceptionId:btpool0-643:1234368682375:da150e11905c0755
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE (ServiceException.java:253)
at com.zimbra.cs.datasource.ImapImport.connect(ImapIm port.java:918)
at com.zimbra.cs.datasource.ImapImport.test(ImapImpor t.java:116)
at com.zimbra.cs.datasource.DataSourceManager.test(Da taSourceManager.java:64)
at com.zimbra.cs.service.mail.TestDataSource.handle(T estDataSource.java:129)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:429)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:286)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:160)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:269)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:190)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1093)
at org.mortbay.servlet.UserAgentFilter.doFilter(UserA gentFilter.java:81)
at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter .java:132)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:716)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:406)
at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
at org.mortbay.jetty.handler.rewrite.RewriteHandler.h andle(RewriteHandler.java:350)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:442)
Caused by: javax.mail.MessagingException: * BYE JavaMail Exception: java.net.SocketException: Socket closed;
nested exception is:
com.sun.mail.iap.ProtocolException: * BYE JavaMail Exception: java.net.SocketException: Socket closed
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPSt ore.java:556)
at javax.mail.Service.connect(Service.java:275)
at com.zimbra.cs.datasource.ImapImport.connect(ImapIm port.java:915)
... 33 more
Caused by: com.sun.mail.iap.ProtocolException: * BYE JavaMail Exception: java.net.SocketException: Socket closed
at com.sun.mail.imap.protocol.IMAPProtocol.capability (IMAPProtocol.java:131)
at com.sun.mail.imap.IMAPStore.login(IMAPStore.java:5 72)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPSt ore.java:536)
... 35 more

And I can connect to IMAP port 143 from Zimbra:

[root@zmail log]# telnet mail.lake-coe.k12.ca.us 143
Trying 10.2.1.6...
Connected to mail.lake-coe.k12.ca.us (10.2.1.6).
Escape character is '^]'.
* OK Dovecot ready.


So all I have left is that IMAP is not working correctly on my remote server... but I have IMAP clients (Outlook Express) that work correctly, and are able to move messages back and forth with no problems.

So help me! What is my problem?!?
Reply With Quote
  #2 (permalink)  
Old 02-11-2009, 12:31 PM
Advanced Member
 
Posts: 203
Default

Note: I'm able to setup an external IMAP account to Gmail in Zimbra, and this is happening for all accounts that I've tried on Zimbra to all IMAP accounts on the external dovecot IMAP server.
Reply With Quote
  #3 (permalink)  
Old 02-11-2009, 01:32 PM
Advanced Member
 
Posts: 203
Default

Ok, finally figured it out... Zimbra Desktop helped me diagnose the problem. The external IMAP server was not using SSL, only port 143 was open. Apparently it was still trying to accept the unsigned SSL certificate, which was throwing the error above. Disabling all SSL on the external IMAP server forced Zimbra to connect to the correct IMAP version.
Reply With Quote
  #4 (permalink)  
Old 03-19-2009, 05:48 AM
Active Member
 
Posts: 43
Default

I'm experiencing this problem with 5.0.14, but it didn't exist with 5.0.10.
It's not convenient to ask ISP, i.e. external mail provider, to change it's settings, if that's the solution.
Reply With Quote
  #5 (permalink)  
Old 03-19-2009, 05:55 AM
Zimbra Consultant & Moderator
 
Posts: 19,655
Default

Quote:
Originally Posted by tim_ba View Post
It's not convenient to ask ISP, i.e. external mail provider, to change it's settings, if that's the solution.
That isn't what was said in the post above yours, disable the use of SSL in the external account settings - if that really is your problem. You've actually not given much detail about your problem and 'me too' doesn't always explain what your problem is.
__________________
Regards


Bill
Reply With Quote
  #6 (permalink)  
Old 03-19-2009, 06:02 AM
Active Member
 
Posts: 43
Default

SSL option is not checked in my external account, Zimbra 5.0.14 web interface, IMAP port is 143.
I know, by the way, that my mail provider does not use SSL at all.
This seems to me to be the same?
Bug 33683 – Online IMAP data sources fail due to STARTTLS requirement
Reply With Quote
  #7 (permalink)  
Old 03-19-2009, 06:05 AM
Zimbra Consultant & Moderator
 
Posts: 19,655
Default

Well, you'd better vote on that bug and wait for the fix.
__________________
Regards


Bill
Reply With Quote
  #8 (permalink)  
Old 04-06-2009, 06:52 AM
Partner (VAR/HSP)
 
Posts: 92
Default

@Bill: I think you are being a bit unfair to tim_ba, as I also read this

Quote:
Disabling all SSL on the external IMAP server forced Zimbra to connect to the correct IMAP version.
to mean disabling SSL on the remote server, not in "external accounts" on zimbra. He's is right to point out, that this fix isn't possible for everyone.

Anyway, several of my clients were having this issue. It seems zimbra requires a CA trusted cert, even if SSL is disabled on the client side. Setting data_source_trust_self_signed_certs in localconfig.xml to be true (as per the referenced bugzilla discussion) fixed it for me.
Reply With Quote
  #9 (permalink)  
Old 04-06-2009, 07:11 AM
Active Member
 
Posts: 43
Default

I also had this issue fixed after that change.
For another another issue, slightly related to this one, please check:
TLS not working?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.