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.
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).
I also found some references from cPanel articles which might be useful for you. Please take a look:
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:
Azure documentation on how to configure reverse DNS for services hosted in Azure:
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:
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.