An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Inbound SMTP on TCP port 25 to Azure VMs is not blocked by the Azure platform. The platform-level restriction described in the documentation applies to outbound SMTP on port 25, and is subscription-type dependent.
For Pay-As-You-Go subscriptions specifically:
- Outbound port 25 is blocked from all resources and this restriction cannot be removed. An SMTP relay service (such as Azure Communication Services on port 587) must be used for outbound mail.
- The documentation does not state any Azure platform block on inbound port 25. Inbound access is controlled by:
- Network Security Group (NSG) rules on the VM NIC and subnet
- Any Azure Firewall / NVA in front of the VM
- The guest OS firewall on the VM
To receive inbound email on port 25 to the mailcow server VM:
- Ensure DNS MX and A records for the mail domain point to the VM’s public IP (or to a load balancer that fronts it).
- In the Azure portal, on the VM’s NIC and subnet NSGs, create an inbound rule:
- Port: 25
- Protocol: TCP
- Source: as required (typically Internet or restricted IP ranges)
- Action: Allow
- Priority: lower number than any deny rule that might block it.
- If using Azure Firewall or another NVA, add a DNAT rule to forward TCP 25 from the public IP to the VM’s private IP, and allow that traffic in the firewall rules.
- Inside the VM, open TCP 25 in the OS firewall and confirm the mailcow service is listening on port 25.
Because Pay-As-You-Go subscriptions cannot have the outbound port 25 block removed, continue using Azure Communication Services (or another authenticated SMTP relay) for outbound mail on port 587 as recommended.
For support contact:
- For Pay-As-You-Go, the platform will not remove the outbound port 25 restriction. If there are issues beyond that (for example, subscription type behavior not matching the documented rules), open a Technical support request under Virtual Network or Virtual Machines, selecting the closest issue type (for SMTP issues, the documented path is under Virtual Network → “Cannot send email (SMTP/Port 25)” but exemptions are not granted for Pay-As-You-Go). Provide:
- Subscription ID and region
- VM name and resource group
- Confirmation of NSG rules and firewall configuration
- Packet captures or connection test results if inbound 25 still fails.
There is no documented Azure mechanism to request unblocking outbound port 25 for Pay-As-You-Go subscriptions without moving to a subscription type that allows it. Inbound port 25, however, is achievable via NSG/firewall and DNS configuration as described.
References:
and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.