Results 1 to 10 of 10

Thread: Error Sending

  1. #1
    dmoring is offline Junior Member
    Join Date
    Sep 2005
    Posts
    7
    Rep Power
    9

    Default Error Sending

    Installed on FC 4 and running/receiving messages fine. However, when a message is attempted to be sent an error is thrown (below). I know it is not the connection as I can telnet to that domains mx from the Zimbra machine on port 25 and talk fine with the other mail server.

    msg - system failure: MessagingException
    code - service.FAILURE
    method - ZmCsfeCommand.invoke
    detail - soap:Receiver
    constructor -
    function ZmCsfeException(msg, code, method, detail) {
    if (arguments.length == 0) {
    return;
    }
    AjxException.call(this, msg, code, method, detail);
    }

    toString -
    function () {
    return "ZmCsfeException";
    }

    dump -
    function () {
    return "AjxException: msg=" + this.msg + " code=" + this.code + " method=" + this.method + " detail=" + this.detail;
    }

  2. #2
    anand is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    9

    Default check zimbra.log on the server

    The full stack trace/exception message in /opt/zimbra/log/zimbra.log should have more detail on why SMTP send from the tomcat process -> postfix is failing.

  3. #3
    dmoring is offline Junior Member
    Join Date
    Sep 2005
    Posts
    7
    Rep Power
    9

    Default

    Ah... OK.... Here appears to be the germain part of the entry:
    SendMsg - exception ocurred during SendMsg
    com.sun.mail.smtp.SMTPSendFailedException: 451 Error: queue file write error

  4. #4
    dmoring is offline Junior Member
    Join Date
    Sep 2005
    Posts
    7
    Rep Power
    9

    Default

    Please ignore previous post... wrong error. Error is posted below. Here's the funny thing... the message gets through! After completion, the remote server issues the 250 and 221 Quit ack, but Zimbra appears to timeout waiting...

    Caused by: javax.mail.MessagingException: Exception reading response;
    nested exception is:
    java.net.SocketTimeoutException: Read timed out
    at com.sun.mail.smtp.SMTPTransport.readServerResponse (SMTPTransport.java:1349)
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(S MTPTransport.java:1263)
    at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTra nsport.java:1149)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTr ansport.java:527)
    at javax.mail.Transport.send0(Transport.java:151)
    at javax.mail.Transport.send(Transport.java:80)
    at com.zimbra.cs.service.mail.SendMsg.sendMimeMessage (SendMsg.java:253)
    ... 25 more

  5. #5
    anand is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    9

    Default strange indeed

    which SMTP server is tomcat trying to connect to? What is your setting
    of zimbraSmtpHostname and zimbraSmtpPort?

    $ zmprov GetAllServers
    <your-server-name>
    $ zmprov GetServer <your-server-name> | grep Smtp

    Looks like tomcat+javamail is waiting for a 250 after DATA command
    and is not getting it? Are you making your "is sending 250/221" conclusions
    from tcpdump?

  6. #6
    dmoring is offline Junior Member
    Join Date
    Sep 2005
    Posts
    7
    Rep Power
    9

    Default You got me!

    Quote Originally Posted by anand
    which SMTP server is tomcat trying to connect to? What is your setting
    of zimbraSmtpHostname and zimbraSmtpPort?

    $ zmprov GetAllServers
    <your-server-name>
    $ zmprov GetServer <your-server-name> | grep Smtp
    The setting is the local host name (linhost.tmcentral.net) and the Zimbra smtp port is port 25. It appears to occur on any given remote smtp server (tested using exchange and mdaemon as the remote servers).

    Quote Originally Posted by anand
    Looks like tomcat+javamail is waiting for a 250 after DATA command
    and is not getting it? Are you making your "is sending 250/221" conclusions
    from tcpdump?
    No, I am making them from a remote server's log (to which I have access) of the smtp session between it and the Zimbra host box. I can also confirm that all tested remote servers accept the mail and send the 250/221 commands (and deliver the mail to their respective boxes). Any other ideas?

  7. #7
    anand is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    9

    Default check postfix health next

    The message path in your setup should be:

    tomcat (zimbra/localhost) -> postfix (zimbra/localhost) -> exchange (remote host)

    We should now check that the middle piece is happy.

    Check /var/log/maillog (FYI: in the future we will have zimbra installed postfix log to /var/log/zimbra.log - log consolidation).

    Looks to me like the postfix is unhappy for some reason and tomcat is timing out on postfix. There should be something useful in the postfix logs.

    (PS: on a related note, did you set relay host in the zimbra admin console so postfix can relay to exchange? if you set in the admin console, we have a periodic script than scans LDAP and pushed postfix config, so after a certain delay you should see postfix pick up the change - the reason I bring this up is because postfix will wedge if it thinks mail loops to itself etc - because of a misconfiguration.)

  8. #8
    dmoring is offline Junior Member
    Join Date
    Sep 2005
    Posts
    7
    Rep Power
    9

    Default It gets weirder...

    Quote Originally Posted by anand
    The message path in your setup should be:

    tomcat (zimbra/localhost) -> postfix (zimbra/localhost) -> exchange (remote host)

    We should now check that the middle piece is happy.

    Check /var/log/maillog (FYI: in the future we will have zimbra installed postfix log to /var/log/zimbra.log - log consolidation).
    Here's a funny thing... I just tried to send again and it worked flawlessly! Not really sure whats going on since I didn't change anything! Nevertheless, I'm going to compare the postfix log you note with the zimbra.log and will post the results where it errored, just to understand what went wrong!
    Quote Originally Posted by anand
    (PS: on a related note, did you set relay host in the zimbra admin console so postfix can relay to exchange? if you set in the admin console, we have a periodic script than scans LDAP and pushed postfix config, so after a certain delay you should see postfix pick up the change - the reason I bring this up is because postfix will wedge if it thinks mail loops to itself etc - because of a misconfiguration.)
    I did not set any relaying/"Smart Host" up at all.; should I have? This is a lab with another server on the local subnet that has no issue sending (all RFC reqs are met for the IP) so I didn't see any need to have a backup relay for testing (after all, in testing my goal is to make sure the native process works; the email contents are garbage at this point anyway!)

  9. #9
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

    Default Dns

    Quote Originally Posted by dmoring
    I did not set any relaying/"Smart Host" up at all.; should I have? This is a lab with another server on the local subnet that has no issue sending (all RFC reqs are met for the IP) so I didn't see any need to have a backup relay for testing (after all, in testing my goal is to make sure the native process works; the email contents are garbage at this point anyway!)
    You don't need a smart host, unless the DNS lookups from the ZCS server aren't working - if postfix can't find the next hop (which doesn't appear to have been the case) it won't send the message.

  10. #10
    kplau is offline Junior Member
    Join Date
    Apr 2007
    Posts
    6
    Rep Power
    8

    Default don't panic!

    I had similar problems just as described and the logs were all similar, timeout and yeap it was the fact postfix wasn't happy.

    In this case it was my fault - if you ever find yourself managing distribution lists and adding mailing list protections (which imvho should have been done via a gui) - and if you ever mess with the internal files as I did (there wasn't any other way anyhow) - as described here - RestrictPostfixRecipients - ZimbraWiki..

    Don't..ever.. remove.. the .db and permitted senders list file on its own - you will have to retrace all your steps and remove all the referals to these files such as those in the script /opt/zimbra/postfix/conf/update_protected_recipients as well as in /opt/zimbra/postfix/conf/main.cf

    Gave me quite a scare this morning as I know nothing about email servers nor how to troubleshoot them!

    p/s:dont forget to reload postfix after that
    Last edited by kplau; 06-14-2007 at 07:00 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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