How to Configure Zimbra With External Email Address

You can add your external email accounts to your zimbra email  server from your end user  interface . But sometimes the testing from Zimbr -> Preferences -> Accounts  will fail with an   error like as follows,

--------------------
2013-05-05 12:29:59,533 WARN  [qtp1347725365-191:https://x.x.x.xservice/soap/TestDataSourceRequest] [name=mail@yourdomain.com;mid=3;ip=10.0.0.1;ua=ZimbraWebClient - FF17 (Linux)/8.0.3_GA_5664;] datasource - Test failed: DataSource{id=TestId, type=pop3, enabled=false, name=Test, host=yourdomain.com, port=110, connectionType=cleartext, username=mail@yourdomain.com, folderId=-1}
com.zimbra.common.service.ServiceException: system failure: Unable to connect to POP3 server: DataSource{id=TestId, type=pop3, enabled=false, name=Test, host=mail.yourdomain.com, port=110, connectionType=cleartext, username=mail@yourdomainc.om, folderId=-1}
ExceptionId:qtp1347725365-191:https://x.x.x.x:443/service/soap/TestDataSourceRequest:1367737199532:686e92b7a615f13b
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:258)
at com.zimbra.cs.datasource.Pop3Sync.connect(Pop3Sync.java:157)
at com.zimbra.cs.datasource.Pop3Sync.test(Pop3Sync.java:110)
at com.zimbra.cs.datasource.DataSourceManager.test(DataSourceManager.java:213)
at com.zimbra.cs.service.mail.TestDataSource.handle(TestDataSource.java:131)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:500)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:363)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:236)
at com.zimbra.soap.SoapServlet.doWork(SoapServlet.java:290)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:206)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:208)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1361)
at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(SetHeaderFilter.java:57)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332)
at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:77)
at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:181)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332)
at com.zimbra.cs.servlet.ZimbraQoSFilter.doFilter(ZimbraQoSFilter.java:114)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332)
at org.eclipse.jetty.servlets.DoSFilter.doFilterChain(DoSFilter.java:464)
at org.eclipse.jetty.servlets.DoSFilter.doFilter(DoSFilter.java:327)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:312)
at org.eclipse.jetty.server.handler.DebugHandler.handle(DebugHandler.java:77)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:191)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:722)
--------------------

It solutions is as follows

1) Login to your zimbra sever over ssh and  do the following ,

# su - zimbra
# zmlocalconfig | grep javamail_pop3_enable_starttls

If you see the result of the above command as  ”  javamail_pop3_enable_starttls = true ” , you need to change it to false

2)

# zmlocalconfig -e javamail_pop3_enable_starttls=false
# zmmailboxdctl restart

Now try to login to your zimbra and add the  email account  and test it. If  you still see an issue with ssl , please do the following too,

# zmlocalconfig | grep certs
  data_source_trust_self_signed_certs = false
  mailboxd_truststore = /opt/zimbra/java/jre/lib/security/cacerts
  ssl_allow_accept_untrusted_certs = true
  ssl_allow_mismatched_certs = true
  ssl_allow_untrusted_certs = false
# zmlocalconfig -e ssl_allow_untrusted_certs=true
# zmlocalconfig -e data_source_trust_self_signed_certs=true
# zmmailboxdctl restart

This will fix your issue with external email accounts in Zimbra.