Our VM is unable to establish outbound SMTP connections on Port 25. Every attempt results in a Connection Timed Out error. We require a Port 25 exemption for a legitimate email verification service.

Nilesh Kanawade 0 Reputation points
2026-01-19T02:28:28.4366667+00:00

Our VM is unable to establish outbound SMTP connections on Port 25. Every attempt results in a Connection Timed Out error. We require a Port 25 exemption for a legitimate email verification service.

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.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Praveen Bandaru 10,095 Reputation points Microsoft External Staff Moderator
    2026-01-19T06:44:28.64+00:00

    Hello **Nilesh Kanawade
    **It looks like you're running into some issues with outbound SMTP connections on Port 25, leading to those Connection Timed Out errors.

    Port 25 Blockage: By default, Azure blocks outbound SMTP connections on TCP port 25 for most subscription types. This is mainly for security reasons and to conform to industry standards.

    If you require access to SMTP port 25, you'll need an enterprise subscription. This port is not blocked for Enterprise Agreement (EA) or Microsoft Customer Agreement for Enterprise (MCA-E) subscriptions, though external domains may still be filtered.

    • Go to the Virtual Network resource linked to your VM (prm-staging).
    • Open the "Diagnose and Solve Problems" section.
    • Select “Cannot send email (SMTP-Port 25)”.
    • Once the block is removed, you'll need to stop and restart your virtual machine to apply the new network policy.

    Although enabling port 25 is an option, it's generally better to use authenticated SMTP relay services for improved reliability and IP reputation. Services such as SendGrid or Azure Communication Services are recommended and usually operate over TCP port 587, which is already open for connections.

    Check the below reference documents for more understanding:

    https://learn.microsoft.com/en-us/answers/questions/5535598/need-smtp-port-25-opened-on-virtual-machine

    https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity#enterprise-and-mca-e


    Hope the above answer helps! Please let us know do you have any further queries.

    Please do not forget to "accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Q&A Assist
    2026-01-19T02:28:35.5466667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Outbound SMTP connections on TCP port 25 are blocked by default for most Azure subscription types, including Pay-as-you-go subscriptions. However, if you are using an Enterprise Agreement or Microsoft Customer Agreement (MCA-E) subscription, outbound SMTP connections on port 25 are not blocked, but there is no guarantee that external domains will accept emails sent from your VMs.

    For Enterprise Dev/Test subscriptions, port 25 is blocked by default, but you can request to have this block removed. To do this, go to the Cannot send email (SMTP-Port 25) section of the Diagnose and Solve section in the Azure Virtual Network resource in the Azure portal and run the diagnostic. After the exemption is granted, you will need to stop, deallocate, and restart your VMs to apply the new network policy.

    If your subscription type does not allow for port 25 exemptions, it is recommended to use an authenticated SMTP relay service, which typically operates over TCP port 587 and is not blocked in Azure regardless of the subscription type.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.