Results 1 to 9 of 9

Thread: [SOLVED] JavaMail Exception when syncing external IMAP

  1. #1
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    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?!?

  2. #2
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    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.

  3. #3
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    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.

  4. #4
    Join Date
    Mar 2009
    Location
    Sarajevo
    Posts
    44
    Rep Power
    6

    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.

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    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


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    Join Date
    Mar 2009
    Location
    Sarajevo
    Posts
    44
    Rep Power
    6

    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

  7. #7
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

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


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  8. #8
    Join Date
    May 2008
    Posts
    92
    Rep Power
    7

    Default

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

    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.

  9. #9
    Join Date
    Mar 2009
    Location
    Sarajevo
    Posts
    44
    Rep Power
    6

    Default

    I also had this issue fixed after that change.
    For another another issue, slightly related to this one, please check:
    http://www.zimbra.com/forums/install...t-working.html

Similar Threads

  1. 'Couldn't access Yahoo! Zimbra Desktop server"
    By chirag1 in forum Error Reports
    Replies: 37
    Last Post: 06-12-2011, 06:14 PM
  2. Error using Zimbra Desktop with all folders
    By randhirv in forum Error Reports
    Replies: 3
    Last Post: 01-24-2009, 01:01 AM
  3. E61i IMAP sync - old bug back again?
    By matt_b in forum Zimbra Mobile
    Replies: 7
    Last Post: 08-10-2008, 03:38 PM
  4. problem importing external IMAP account
    By eleith in forum Administrators
    Replies: 0
    Last Post: 08-05-2008, 02:11 PM
  5. External IMAP account errors
    By Vladimir in forum Administrators
    Replies: 1
    Last Post: 04-29-2008, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •