open SMTP on Azure VM

Raizada, Atul 0 Reputation points
2024-06-02T02:06:42.29+00:00

Need to open outbound and inbound SMTP traffic.

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,256 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 16,420 Reputation points MVP
    2024-06-02T03:29:07.7266667+00:00

    This is blocked by design. For the rationale, exceptions, and workarounds, refer to https://video2.skills-academy.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Anveshreddy Nimmala 3,460 Reputation points Microsoft Vendor
    2024-06-03T06:51:23.61+00:00

    Hello Raizada, Atul,

    Welcome to microsoft Q&A, thankyou for posting your query here.

    Referring to the below documentation i would like to highlight some points here.

    https://video2.skills-academy.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity#recommended-method-of-sending-email

    There is a possibility to use port 25 for outbound communication on Azure VMs, but there are some subscription limitations as mentioned below:

    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.

    For all other subscription types, the Azure platform will block outbound SMTP connections on TCP port 25 for deployed VMs and this block cannot be removed. This includes Pay-as-you-go.

    So, when using a other than standard-enterprise subscription , users are recommended to use an authenticated SMTP relay service to send email from Azure VMs through TCP port 587, or other ports because port 25 is blocked by default and this block cannot be removed.

    There are various authenticated SMTP relay services available that support port 587.

    One such service is SendGrid, but there are others.

    https://www.twilio.com/docs/sendgrid/for-developers/partners/microsoft-azure-2021

    SendGrid accepts unencrypted and TLS connections on ports 25, 587, & 2525, and you can also connect via SSL on port 465.

    Refer: https://docs.sendgrid.com/for-developers/sending-email/getting-started-smtp#send-an-smtp-email-using-telnet

    Hope this helps you.

    If an answer has been helpful, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    4cd7d124-24a8-4b50-bf8b-74353977ec67

    0 comments No comments