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

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 06-08-2011, 11:08 AM
Senior Member
 
Posts: 60
Default [SOLVED] zimbraSmtpHostname failing on 7.1.1_GA_3196

I've installed the Open Source version of Zimbra 7.1.1 to mess around with and test new features (we use the Network Edition version of 6.0.10 in production).

Everything is working fine except when zimbraSmtpHostname is set. We want to have all mail go through the external relay, but if we set zimbraSmtpHostname to anything except for localhost Zimbra spews out this error:



ExceptionId:btpool0-10://zimbra.example.com/service/soap/SendMsgRequest:1307475298155:0fd03bc515994351
Code:mail.SEND_FAILURE
at com.zimbra.cs.mailbox.MailServiceException.interna l_SEND_FAILURE(MailServiceException.java:459)
at com.zimbra.cs.mailbox.MailServiceException.SEND_FA ILURE(MailServiceException.java:471)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:621)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:425)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:385)
at com.zimbra.cs.service.mail.SendMsg.doSendMessage(S endMsg.java:193)
at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg. java:154)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:412)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:287)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:158)
at com.zimbra.soap.SoapServlet.doWork(SoapServlet.jav a:294)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:215)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:725)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:208)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:814)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1166)
at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(Set HeaderFilter.java:79)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1157)
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:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:218)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:422)
at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.rewrite.RewriteHandler.h andle(RewriteHandler.java:230)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.DebugHandler.handle(Debu gHandler.java:77)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:543)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:946)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:405)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:410)
at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:451)
Caused by: com.zimbra.cs.mailbox.MailSender$SafeSendFailedExc eption: MESSAGE_NOT_DELIVERED; chained exception is:
com.zimbra.cs.mailclient.CommandFailedException: DATA failed: 250 2.1.5 <lindsey@example.com>... Recipient ok
at com.zimbra.cs.mailclient.smtp.SmtpTransport.notify (SmtpTransport.java:289)
at com.zimbra.cs.mailclient.smtp.SmtpTransport.sendMe ssage(SmtpTransport.java:221)
at com.zimbra.cs.mailbox.MailSender.sendMessageToHost (MailSender.java:895)
at com.zimbra.cs.mailbox.MailSender.sendMessage(MailS ender.java:831)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:565)



We can send mail through the relay server by using telnet to port 25. In fact, from the mail server side it appears that Zimbra hangs up as soon as it receives a 'start mail input' command from the relay server. Here's the SMTP transaction:

21688 >>> 220-lorien.example.com ESMTP Sendmail 8.14.4/8.14.4; Tue, 7 Jun 2011 16:54:00 -0500
21688 >>> 220 NO UCE C=US L=IL
21688 <<< EHLO zimbra.example.com^M
21688 >>> 250-lorien.example.com Hello zimbra.example.com [10.0.0.1], pleased to meet you
21688 >>> 250-ENHANCEDSTATUSCODES
21688 >>> 250-PIPELINING
21688 >>> 250-8BITMIME
21688 >>> 250-SIZE 50000000
21688 >>> 250-AUTH GSSAPI
21688 >>> 250-STARTTLS
21688 >>> 250-DELIVERBY
21688 >>> 250 HELP
21688 <<< HELO zimbra.example.com^M
21688 >>> 250 lorien.example.com Hello zimbra.example.com [10.0.0.1], pleased to meet you
21688 <<< MAIL FROM:<lindsey@example.com>^M
21688 >>> 250 2.1.0 <lindsey@example.com>... Sender ok
21688 <<< RCPT TO:<lindsey@example.com>^M
21688 >>> 250 2.1.5 <lindsey@example.com>... Recipient ok
21688 <<< DATA^M
21688 >>> 354 Enter mail, end with "." on a line by itself
21688 <<< [EOF]
21688 >>> 421 4.4.1 collect: unexpected close on connection from zimbra.example.com, from=<lindsey@example.com>



Here are some relevant settings:

[zimbra@zimbra ~]$ zmprov gs zimbra.example.com | egrep -i 'mta|smtp'
zimbraMtaAntiSpamLockMethod: flock
zimbraMtaAuthEnabled: TRUE
zimbraMtaAuthHost: zimbra.example.com
zimbraMtaAuthTarget: TRUE
zimbraMtaAuthURL: http://zimbra.example.com:80/service/soap/
zimbraMtaDnsLookupsEnabled: TRUE
zimbraMtaMyDestination: localhost
zimbraMtaMyNetworks: 127.0.0.0/8 10.0.0.1/8 192.168.1.11/32
zimbraMtaRelayHost: smtp.example.com:25
zimbraMtaSaslAuthEnable: yes
zimbraMtaTlsAuthOnly: TRUE
zimbraMtaTlsSecurityLevel: may
zimbraServiceEnabled: mta
zimbraServiceInstalled: mta
zimbraSmtpHostname: localhost
zimbraSmtpPort: 25
zimbraSmtpSendPartial: FALSE
zimbraSmtpTimeout: 60


What we're trying to do is set zimbraSmtpHostname to be the same as zimbraMtaRelayHost (sans the port definition). ZImbra's MX records point to zimbraMtaRelayHost and all mail to it will go through that machine; we want all outbound mail to go through that machine too.

These are the same settings as we have on the 6.0.10 system, but it's working fine there.

Can anyone point out what I'm missing?

Thanks,

Chris

P.S. IPs and hostnames have been anonymized.
__________________
Christopher Lindsey, Technical Program Manager
National Center for Supercomputing Applications

Last edited by lindsey; 06-09-2011 at 07:26 AM..
Reply With Quote
  #2 (permalink)  
Old 06-09-2011, 07:41 AM
Senior Member
 
Posts: 60
Default

Followup... Changing zimbraSmtpHostname to any other relay server also results in failure. However, setting up port forwarding on a remote server to go back to the Zimbra server works.

So something in the SMTP transaction with these other relays is the problem; it *can* do SMTP to a remote host and not just LMTP to localhost.

Also, the telling line in the error is


com.zimbra.cs.mailclient.CommandFailedException: DATA failed: 250 2.1.5 ... Recipient ok


This is the line that it fails on, not the subsequent 354 return code.
__________________
Christopher Lindsey, Technical Program Manager
National Center for Supercomputing Applications
Reply With Quote
  #3 (permalink)  
Old 06-10-2011, 10:49 PM
mlo mlo is offline
Zimbra Employee
 
Posts: 8
Default

Does it work if you switch back to the JavaMail SMTP client?

zmlocalconfig -e javamail_zsmtp=false
zmmailboxdctl restart
Reply With Quote
  #4 (permalink)  
Old 06-13-2011, 05:44 AM
Senior Member
 
Posts: 60
Default

Yes, thank you! I wasn't aware of that key, but switching to the JavaMail default SMTP client fixed everything for me.
__________________
Christopher Lindsey, Technical Program Manager
National Center for Supercomputing Applications
Reply With Quote
  #5 (permalink)  
Old 06-13-2011, 07:13 AM
mlo mlo is offline
Zimbra Employee
 
Posts: 8
Default

Would you please file a "Mail - Server" bug against the new SMTP client with the details?
Reply With Quote
  #6 (permalink)  
Old 06-15-2011, 09:53 AM
Senior Member
 
Posts: 60
Default

Bug was posted, problem identified, and bug fix created.

https://bugzilla.zimbra.com/show_bug.cgi?id=60879

The problem was a multiline SMTP banner.
__________________
Christopher Lindsey, Technical Program Manager
National Center for Supercomputing Applications
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.