Connection from Azure VM to Exchange Online

Waldemar Werle 1 Reputation point
2022-06-27T08:52:29.777+00:00

Hello,

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 pseeng-de0i.mail.protection.outlook.com).

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 pseeng-de0i.mail.protection.outlook.com on port 587 - that would be fine for me I guess.

When I try to connect from my VM to pseeng-de0i.mail.protection.outlook.com (telnet pseeng-de0i.mail.protection.outlook.com:587) the connection times out. Using another host (e.g. telnet mail.timeline-shopping.de:587) works fine.

Where is the connection being blocked?

Thanks in advance!
Waldemar

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

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 21,966 Reputation points
    2022-08-02T07:22:15.497+00:00

    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 https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity#all-other-subscription-types

    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:
    https://learn.microsoft.com/en-us/answers/questions/4059/azure-vm-smtp-inbound-port-25-is-blocked.html
    https://stackoverflow.com/questions/48841712/cant-access-port-25-on-my-azure-vm-from-my-server
    https://social.msdn.microsoft.com/Forums/en-US/e0b345e3-1090-46c2-9122-9176fa7cc4fb/enable-port-25-communication-for-virtual-machine-on-azure?forum=WAVirtualMachinesforWindows

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

    0 comments No comments