WHM/CPANEL REVERSE DNS PTR RECORDS

Favour Afula 0 Reputation points
2023-07-26T09:59:08.5166667+00:00

Hello, please i have a WHM/CPanel panel at my rocky linux azure virtual machine which can receive emails but can't send. i traced the issue to a reverse dns issue but have no idea on how exactly to fix it. can anyone direct me exactly on what to do because azure documentation is quite unclear.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
567 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,032 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 45,486 Reputation points Microsoft Employee
    2023-07-27T10:33:38.9766667+00:00

    Hello @Favour Afula ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you've a WHM/cPanel hosted in your Azure Linux VM which can receive emails but is unable to send emails and you traced the root cause to a reverse DNS issue but would need help in fixing it.

    I'm not familiar with WHM/cPanel but after some research, I found that the TCP port 25 is the standard port for SMTP (Simple Mail Transfer Protocol) services in cPanel and WHM.

    Refer: https://docs.cpanel.net/knowledge-base/general-systems-administration/how-to-configure-your-firewall-for-cpanel-services/

    However, Azure platform has some limitations when it comes to port 25.

    Outbound email messages that are sent directly to external domains (such as outlook.com and gmail.com) from a virtual machine (VM) are made available only to certain subscription types in Microsoft Azure.

    • For VMs that are deployed in standard Enterprise Agreement subscriptions, the outbound SMTP connections on TCP port 25 will not be blocked.
    • For Enterprise Dev/Test subscriptions, port 25 is blocked by default. It is possible to have this block removed. To request to have the block removed, go to the Cannot send email (SMTP-Port 25) section of the Diagnose and Solve blade in the Azure Virtual Network resource in the Azure portal and run the diagnostic. This will exempt the qualified enterprise dev/test subscriptions automatically.
    • For all other subscription types, the Azure platform will block outbound SMTP connections on TCP port 25 for deployed VMs. This is to ensure better security for Microsoft partners and customers, protect Microsoft’s Azure platform, and conform to industry standards. If you're using a non-enterprise subscription type, Azure encourages you to use an authenticated SMTP relay service (These relay services typically connect through TCP port 587, but they support other ports. SendGrid is one such SMTP relay service, but there are others).

    Refer: https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity

    I also found some references from cPanel articles which might be useful for you. Please take a look:

    https://support.cpanel.net/hc/en-us/articles/360041074753-Why-is-port-25-blocked-

    https://support.cpanel.net/hc/en-us/articles/360053203653

    So, could you please let me know what is your subscription type? And what is the error message that you are receiving, if any?

    Regarding reverse DNS, I found the below cPanel articles, which might be useful:

    https://support.cpanel.net/hc/en-us/articles/360053700793-How-to-setup-PTR-rDNS-records-on-your-cPanel-WHM-server

    https://support.cpanel.net/hc/en-us/articles/360052580554-How-to-update-rDNS-on-an-Azure-server?

    Azure documentation on how to configure reverse DNS for services hosted in Azure:

    https://learn.microsoft.com/en-us/azure/dns/dns-reverse-dns-for-azure-services

    For more detailed steps on the above configuration, you can refer the below Q&A thread where I've provided the steps after conducting a lab:

    https://learn.microsoft.com/en-us/answers/questions/564126/how-to-create-a-ptr-record

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments