Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cloudflare and WHM SMTP Connection

Discussion in 'E-mail Discussion' started by leandrorocha, Dec 29, 2017.

  1. leandrorocha

    leandrorocha Registered

    Dec 29, 2017
    Likes Received:
    Trophy Points:
    Rio de Janeiro
    cPanel Access Level:
    Root Administrator

    I am facing a issue with SMTP connections since I started to use cloudflare. I have a dedicated server and the main domain use cloudlflare. When I try to connect using a PHP SMTP script I have an issue if I try to connect to the secure SMTP server.

    The point is simple, however I couldnt found a solution. As the default secure SSL/TSL server mail for WHM is in domain.tld, I cant connect directly because cloudflare is protecting this DNS. However if I disable cloudflare or use the insecure SMTP server that points to mail.domain.tld, I am able to connect perfectly.

    So I need to find a way to move the secure SMTP server from the default domain.tld to a subdomain.domain.tld, however I dont know where I can change this setting. I already read some topics here that talk about this same issue, but couldnt find a solution. Someone already solved this?
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Is the PHP script located on the same server you are using to send out the email? If so, you could simply update the hostname setting in the PHP script to use "localhost". Otherwise, simply setup a new "A" record for the domain name (e.g. smtp.domain.tld) and then use that as the mail server name in your PHP script settings.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice