Join the community today
Register Now

Grrrr... SMTP email issues.

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

Tags:
  1. SneakyDave

    SneakyDave Member

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    2:15 PM
    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

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    2:15 PM
    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

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    2:15 PM
    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"
    
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    12:45 AM
    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. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:15 AM
    1.11
    10.2
    I remember Eva said a while ago that this notice can be ignored.
     
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    yup it's more of notice than warning.. you can ignore
     
    • Like Like x 1
  8. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 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

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    not recommended to uninstall CSF ! security wise no no.. you're meant to do what @SneakyDave did in post 3 above
     
    • Like Like x 1
  10. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 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

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 AM
    dome9 allow all outgoing traffic unless modifications are done, i think its only for incoming
     
  13. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 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

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 AM
    csf uninstalled completly
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    what about with dome9 disabled ?
     
  17. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 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

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    5:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    maybe time to try a different VPS/web host too heh
     
  19. Oxide

    Oxide Active Member

    503
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    5:15 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

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    12:45 AM
    adding port tcp_out at csf.conf resolves my issue. Be sure to check you mail host ports, tls or ssl then whitelist them.