1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Email Problem

Discussion in 'Troubleshooting and Problems' started by Set3sh, Mar 15, 2015.

  1. Set3sh

    Set3sh Active Member

    Hello,

    I have upgraded to php 5.6 from 5.5 and I'm experiencing some problems with xenforos mailing function.

    ErrorException: fwrite(): send of 6 bytes failed with errno=32 Broken pipe - library/Zend/Mail/Protocol/Abstract.php:324

    Might I mention that I set in php.ini

    [openssl]
    openssl.cafile = /usr/local/lsws/php/ca/cert.pem

    The pem was downloaded from http://curl.haxx.se/ca/cacert.pem
    Also the smtp server is well configured, had not a single problem with php 5.5.



    Kind regards,
    George.
     
  2. Mike

    Mike XenForo Developer Staff Member

    I don't think this is necessarily caused by the 5.5 to 5.6 upgrade. This is mostly a network related issue. It seems likely that the network connection was closed unexpectedly (PHP thought it was still open when it was used).

    When did this occur specifically? Is it happening consistently and stopping all mails?
     
  3. Set3sh

    Set3sh Active Member

    Hello,

    Yes, it's happening every time xenforo needs to send an email.

    Kind regards,
    George.
     
  4. Mike

    Mike XenForo Developer Staff Member

    It does seem like the SSL changes in PHP 5.6 would be at the core of this then, though I'm not sure why it'd be triggering this specific error. Is it possible that something else changed with the upgrade to 5.6, such as being compiled against a different SSL library or different version? What SMTP server are you trying to connect to?
     
  5. Set3sh

    Set3sh Active Member

    Hello,

    I am using a postfix+dovecot system.
    Postfix is configured to use only TLSv1 protocol and the certificate it uses is issued by a valid certification authority.

    Kind regards,
    George.
     
  6. Set3sh

    Set3sh Active Member

    I have figured the cause of this:

    Mar 19 13:21:56 xxxxx postfix/submission/smtpd[12843]: connect from localhost[127.0.0.1]
    Mar 19 13:21:58 xxxxx postfix/submission/smtpd[12843]: warning: localhost[127.0.0.1]: SASL LOGIN authentication failed: dUqasjnvkqb
    Mar 19 13:21:58 xxxxx postfix/submission/smtpd[12843]: disconnect from localhost[127.0.0.1]


    And in master.cf postfix submission is:

    submission inet n - - - - smtpd
    -o syslog_name=postfix/submission
    -o smtpd_enforce_tls=yes
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
    -o cleanup_service_name=subcleanup
    -o milter_macro_daemon_name=ORIGINATING
    -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
    -o smtpd_sasl_security_options=noanonymous
    -o smtpd_sasl_tls_security_options=noanonymous
    -o smtpd_sasl_type=dovecot
    -o smtpd_sasl_path=private/auth
    -o smtpd_etrn_restrictions=reject


    Any suggestions to fixing this are most welcomed.
     
  7. Puntocom

    Puntocom Well-Known Member

    I have the same errors in the log. I'm using PHP 5.6. I also get this: Could not read from 127.0.0.1. I try to create a new account and the email works.

    I'm using SMTP as Email Transport Method without authentication/encryption.
     
    Last edited: Jun 23, 2015
  8. Set3sh

    Set3sh Active Member

    Hello,


    I fixed this by adding openssl.cafile variable in php.ini

    openssl.cafile = /full/path/to/your/certificate-issuer-ca-bundle.pem
    (chmod that certificate to 0644)

    Kind regards,
    George.
     
  9. Puntocom

    Puntocom Well-Known Member

    Finally I think that I solved it. The problem was that, due to firewall configuration, 127.0.0.1 was not accesible from the server.
     

Share This Page