Connection from Azure VM to Exchange Online

Waldemar Werle 1 Reputation point


we have the following setup:

Azure-VM (running Fortimail from Fortinet - a secure E-Mail Gateway with Antivirus, Antispam and Sandboxing) and Exchnage Online (MX record

I would like to forward the mails from my Azure-VM to Exchange Online. I understand that using port 25 is not possible for this due to restrictions and recommendations.
But for my understanding it should be posible to connect to on port 587 - that would be fine for me I guess.

When I try to connect from my VM to (telnet the connection times out. Using another host (e.g. telnet works fine.

Where is the connection being blocked?

Thanks in advance!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,243 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,193 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 22,486 Reputation points

    Hello @Waldemar Werle ,

    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.

    After the subscription is exempted from this block and the VMs are stopped and restarted, all VMs in that subscription are exempted going forward. The exemption applies only to the subscription requested and only to VM traffic that is routed directly to the internet.

    For all other subscription types:

    Refer to

    If you are using an Enterprise Agreement subscription and still need help, contact support to get your problem resolved quickly. Use this issue type: Technical > Virtual Network > Cannot send email (SMTP/Port 25).

    If none of the above helps, I would suggest you raise a support ticket with azure technical support. If you don't have the ability to open an technical support ticket, please let me know I can help you further on this.

    Similar threads:

    --please don't forget to upvote and accept as answer if the reply is helpful--

    0 comments No comments