Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Z-Push on CentOS8 not sending mails (5.0.0 Need RCPT)

    Z-Push when using other backends
    2
    4
    636
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • WieWaldi
      WieWaldi last edited by

      Hi,
      first I have to questions. Is this the right forum to get help troubleshooting Z-Push? I could not find any user forum on z-hub.io and z-push.sourceforge.net/phpbb/ seems to be dead since 2016. I’m not sure that I’ve found a bug in version 2.6.0 and don’t want to raise a bug report on jira.z-hub.io unnecessarily. In addition, is this the right place for me to get help even if I’m not using Kopano as backend?

      I’ve managed to get Z-Push up and running some years ago on a CentOS 6 server and had no issues. So I was pretty confident getting the newest version to work on a CentOS 8 server. I was wrong.

      As mentioned, Z-Push version 2.6.0 has been installed from the RHEL7 repo on a CentOS 8 based web server with all latest updates applied. Mail services (sendmail and dovecot) are running on a separate server within the same network. The following Z-Push packages have been installed.

      • z-push-autodiscover
      • z-push-backend-imap
      • z-push-common
      • z-push-config-apache
      • z-push-config-apache-autodiscover
      • z-push-ipc-sharedmemory

      Autodiscover works as well as pulling mails from the IMAP mailbox. But sending mails fails with the following error message.

      [ERROR] [username] Net_SMTP error: Invalid response code received from server
      [ERROR] [username] Mail<smtp> error: Failed to send data [SMTP:  (code: 503, response: 5.0.0 Need RCPT (recipient))]
      

      I’ve checked the mail flow on the mail server and indeed Z-Push sends “data” command without prior “rcpt-to” command. In addition the “mail-from” command is malformed and contains only the username without “@domain.tld”.

      I’ve gone through the configs several times with no luck and looking for help the get this solved.

      1 Reply Last reply Reply Quote 0
      • Manfred
        Manfred Kopano last edited by

        Hi @WieWaldi,

        yes, this forum the right place for Z-Push related issues.

        I’m not very familiar with the current state of the IMAP backend as it was mostly community contributed, but if I’m not completely mistaken, the IMAP backend uses other libraries to send emails.

        What is the setting of IMAP_SMTP_METHOD in the IMAP config? Is it the same as on your previous server?

        Also, did you configure IMAP_DEFAULTFROM?

        Manfred

        1 Reply Last reply Reply Quote 0
        • WieWaldi
          WieWaldi last edited by

          Hi @Manfred,

          sorry for my late respond. No, the config differs from the previous server. Current setup is a dedicated mail server (sendmail,dovecot) and a dedicated web server. Therefor I had the following setting in use.

          define('IMAP_SMTP_METHOD', 'smtp');
          $imap_smtp_params = array('host' => 'ssl://mail.domain.tld', 'port' => '465', 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');
          

          Since the mail server allows relaying from the web server’s IP address I tried with the following setting and had the same results.

          define('IMAP_SMTP_METHOD', 'smtp');
          $imap_smtp_params = array('host' => 'mail.domain.tld', 'port' => '25', 'auth' => false');
          

          No, I din’t messed with IMAP_DEFAULTFROM as I didn’t on the previous server. In addition I wasn’t sure how it would behave since I’m planning to serve several domains.

          In the meantime I’ve removed the packages from the repo and deployed from git using master branch and followed the install doc step by step. Furthermore I’ve installed sendmail on the webserver and configured it to use the dedicated mail server as a smart host. A simple php script using the mail function works fine and sets from address correctly to anything I want. I’ve changed the setting of the imap backend to:

          define('IMAP_SMTP_METHOD', 'mail');
          $imap_smtp_params = array();
          

          Using the simple php script to send a mail I see the whole communication in /var/log/maillog.

          Nov  5 14:12:38 rza-web1 sendmail[527341]: 0A5DCcFW527341: from=apache, size=193, class=0, nrcpts=1, msgid=<202011051312.0A5DCcFW527341@rza-web1.domain.tld>, relay=apache@localhost
          Nov  5 14:12:38 rza-web1 sendmail[527342]: NOQUEUE: connect from localhost [127.0.0.1]
          Nov  5 14:12:38 rza-web1 sendmail[527342]: AUTH: available mech=ANONYMOUS, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: Milter: no active filter
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 220 rza-web1.domain.tld ESMTP Commodore Int. AmigaOS ver5.91 being rza-mail1 slave.
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: <-- EHLO rza-web1.domain.tld
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-rza-web1.domain.tld Hello localhost [127.0.0.1], pleased to meet you
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-ENHANCEDSTATUSCODES
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-PIPELINING
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-EXPN
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-VERB
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-8BITMIME
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-SIZE
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-DSN
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-ETRN
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-STARTTLS
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250-DELIVERBY
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 250 HELP
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: <-- STARTTLS
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfw527342: --- 220 2.0.0 Ready to start TLS
          Nov  5 14:12:38 rza-web1 sendmail[527342]: STARTTLS: x509 cert verify: depth=0 /C=.....
          ....
          ....
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: <-- MAIL From:<apache@rza-web1.domain.tld> SIZE=193
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: --- 250 2.1.0 <apache@rza-web1.domain.tld>... Sender ok
          Nov  5 14:12:38 rza-web1 sendmail[527342]: STARTTLS=read, info: fds=9/6, err=2
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: <-- RCPT To:<lassmichinruhe@domain.tld>
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: --- 250 2.1.5 <lassmichinruhe@domain.tld>... Recipient ok
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: <-- DATA
          ....
          ....
          Nov  5 14:12:38 rza-web1 sendmail[527342]: 0A5DCcfx527342: --- 250 2.0.0 0A5DCcfx527342 Message accepted for delivery
          

          The mail gets forwarded to the dedicated mail server with no issue. Using an iPhone with Z-Push the only thing I see in /var/log/maillog is:

          Nov  5 14:10:47 rza-web1 sendmail[527042]: 0A5DAlqG527042: Authentication-Warning: rza-web1.domain.tld: apache set sender to username@localhost using -f
          Nov  5 14:10:47 rza-web1 sendmail[527042]: 0A5DAlqG527042: from=username@localhost, size=409, class=0, nrcpts=0, msgid=<202011051310.0A5DAlqG527042@rza-web1.domain.tld>, relay=apache@local
          

          /var/log/z-push/z-push.log shows:

          05/11/2020 14:38:58 [403533] [WARN] [username] /usr/local/z-push/include/mimeDecode.php:529 Uninitialized string offset: 0 (8)
          05/11/2020 14:38:58 [403533] [ INFO] [username] cmd='SmartReply' memory='1.87 MiB/2.00 MiB' time='1.11s' devType='iPhone' devId='n6i1hraqgh3n59400akgp65a50' getUser='username' from='10.222.220.53' idle='0s' version='GIT' method='POST' httpcode='200'
          05/11/2020 14:38:59 [ 1745] [ INFO] [username] ExportChangesDiff->InitializeExporter(): Found '0' changes for '4599b3f8'
          05/11/2020 14:38:59 [ 1745] [ INFO] [username] cmd='Sync' memory='2.05 MiB/2.00 MiB' time='0.92s' devType='iPhone' devId='n6i1hraqgh3n59400akgp65a50' getUser='username' from='10.222.220.53' idle='0s' version='GIT' method='POST' httpcode='200'
          05/11/2020 14:39:01 [197284] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:39:01 [197284] [ INFO] [username] SyncCollections->CheckForChanges(): Waiting for store changes... (lifetime 600 seconds)
          05/11/2020 14:39:03 [197284] [ INFO] [username] ExportChangesDiff->InitializeExporter(): Found '6' changes for 'hierarchy'
          05/11/2020 14:39:04 [197284] [ INFO] [username] ExportChangesDiff->InitializeExporter(): Found '0' changes for 'hierarchy'
          05/11/2020 14:39:04 [197284] [ INFO] [username] ExportChangesDiff->InitializeExporter(): Found '0' changes for 'hierarchy'
          

          /var/log/z-push/z-push-error.log shows:

          05/11/2020 14:17:29 [404195] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:18:25 [403533] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:24:34 [259494] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:33:46 [ 6692] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:38:58 [403533] [WARN] [username] /usr/local/z-push/include/mimeDecode.php:529 Uninitialized string offset: 0 (8)
          05/11/2020 14:39:01 [197284] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:39:19 [216137] [WARN] [username] /usr/local/z-push/lib/wbxml/wbxmldecoder.php:168 Trying to access array offset on value of type null (8)
          05/11/2020 14:39:50 [197264] [WARN] [username] SyncObject->Check(): object from type SyncMail: parameter 'from' contains an invalid email address 'username'. Address is removed.
          

          I can’t think of any setting within php.ini that I could have possibly messed up. Any hints what might cause this issue or how to troubleshoot any further are very much appreciated.

          Thanks a lot in advance.

          1 Reply Last reply Reply Quote 0
          • WieWaldi
            WieWaldi last edited by

            Hi @Manfred,

            never mind. Decision have been made to ditch this project. However, thanks for taking care.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post