Want to subscribe to topics you're interested in?
Become a Member

Grrrr... SMTP email issues.

Discussion in 'System Administration' started by SneakyDave, Oct 23, 2014.

Tags:
  1. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    9:46 AM
    1.0.15
    I've got 2 XenForo package installations, one on Digital Ocean using stock CentOS 6.5, the other on Linode using Centminmod.

    I have an email account from rackspace.com apps that I use to send SMTP mail out on the DO server. It has always worked great with XenForo

    But when I use the same account and credentials to send email via XenForo on the Linode/Centminmod setup, I get time out errors connecting to the rackspace mail server at secure.emailsrvr.com:443.
    Code:
    Zend_Mail_Protocol_Exception: Email to email@theemail.com failed: Connection timed out - library/Zend/Mail/Protocol/Abstract.php:277
    Generated By: Unknown Account, 3 minutes ago
    
    Would there be a better error listed somewhere? There are no errors listed in the site's nginx error.log.


    The reason I believe it's server related is that I was using a gmail account to process bounced messages through the XenForo admincp, and I was getting timeout errors connecting to imap.gmail.com with that account too.
     
  2. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    9:46 AM
    1.0.15
    Could this be an CSF firewall issue? Maybe I can't make those connections outside of the server?
     
    Last edited: Oct 23, 2014
  3. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    9:46 AM
    1.0.15
    Aha, this seems to be the culprit:
    CSF - CSF Firewall info | Centmin Mod Community

    I use 465 and 993 as rackspace and gmail ports, so I had to add them:
    Code:
    # Allow outgoing TCP ports
    TCP_OUT = "111,2049,1110,1194,9418,20,21,22,25,53,80,110,113,443,465,993"
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. quicksalad

    quicksalad Member

    228
    13
    18
    May 31, 2015
    Ratings:
    +20
    Local Time:
    8:16 PM
    got this error when I added port for SMTP, any idea why?
    Code:
    *WARNING* RESTRICT_SYSLOG is disabled. See SECURITY WARNING in /etc/csf/csf.conf.
    
     
  6. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:46 PM
    Mainline
    10.2
    I remember Eva said a while ago that this notice can be ignored.
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yup it's more of notice than warning.. you can ignore
     
  8. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    I have same issue. I've uninstalled csf completely too.

    Zend_Mail_Protocol_Exception: Email to myemail@msn.com failed: Connection timed out - library/Zend/Mail/Protocol/Abstract.php:277
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    not recommended to uninstall CSF ! security wise no no.. you're meant to do what @SneakyDave did in post 3 above
     
  10. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    yeah i use dome9 instead to ip protect ssh etc.

    [root@root ~]# iptables -I OUTPUT -o eth0 -d 0.0.0.0/0 -j ACCEPT
    [root@root ~]# iptables -I INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

    also ran these to open all outgoing traffic.. still timing out :(
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh forgot you have dome9.. maybe that is what is blocking smtp emails out or is it working with csf gone ?
     
  12. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    dome9 allow all outgoing traffic unless modifications are done, i think its only for incoming
     
  13. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    Interesting.

    I rebooted, it worked but then it stopped working again. It's like there are something that blocks or breaks it.

    This time I'm ot timing out, it's just giving 502.
     
  14. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    with csf enabled/installed ? if you reinstall csf it won't have all the default tweaks and optimisations and port allowances that a fresh centmin mod install does from inc/csfinstall.inc and inc/csftweaks.inc
     
  15. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    csf uninstalled completly
     
  16. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what about with dome9 disabled ?
     
  17. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    Yes, i uninstalled that as well.

    Same issue, one issue that I solved now was timing out. I solved this by disabling BuyVM/FranTech DDoS Protection.

    Now, I am still getting 502 Gateaway - but not timing out at least.

    appreciate your help man, i am updating php, nginx etc with centminbeta now to see if that does anything.
     
  18. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    maybe time to try a different VPS/web host too heh
     
  19. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    12:46 AM
    It's PHP-FPM Bro.

    I restarted php-fpm works, after some time it doesn't work.

    I consider to create a crontab to restart it regularly, would this hurt anything? Until i've managed to fix.
     
  20. quicksalad

    quicksalad Member

    228
    13
    18
    May 31, 2015
    Ratings:
    +20
    Local Time:
    8:16 PM
    adding port tcp_out at csf.conf resolves my issue. Be sure to check you mail host ports, tls or ssl then whitelist them.