The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SMTP Fail using gmail service

Discussion in 'E-mail Discussions' started by john28uk, Nov 6, 2014.

  1. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I am trying to send email via a webform using smtp.gmail.com, the username and password are correct as on our internal server the mail is sent and recevied, but on our webserver the form shows the error SMTP Error: Could not connect to SMTP host.

    Do I need to enable something in the WHM??

    Thanks John
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    There is an issues with the firewall. You will have to enable your port in firewall. For the testing you can disable firewall and check your mail.
     
  3. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi, thanks for the reply, was not aware we even have a firewall, how can I see if we have??

    John
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Do you have root access to this server? If so, you could install a third-party firewall management utility such as CSF to manage your firewall rules.

    Thank you.
     
  5. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply, yes I have root access, also been intouch with host, they inform m I have firewall and need to open ports

    Thanks John
     
    #5 john28uk, Nov 6, 2014
    Last edited: Nov 6, 2014
  6. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello, still having issues with this, I have checked my ports and this /http://www.yougetsignal.com/tools/open-ports/ says 465 is open, but I still get the smtp cannot connect error.

    Is there anything else I can do to sort this?

    Thanks John
     
  7. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Further info, I have run this from root to open up the ports

    iptables -A INPUT -m state --state NEW -p tcp --dport 465 -j ACCEPT
    iptables -A OUTPUT -m state --state NEW -p tcp --dport 465 -j ACCEPT

    Is this the correct way to open the ports?

    John
     
  8. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    When I do iptables -L this is the output

    Capture.PNG

    No mention of port 465, yet i have opened it :confused:
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I suggest installing a third-party firewall management utility such as CSF to manage your firewall rules. Also, is this happening for all remote mail servers or is it isolated to Google?

    Thank you.
     
  10. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Will CSF be able to manage the firewall already installed on there?? Is this a plugin for WHM?

    Not sure, only used the smtp.gmail.com
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page