Outgoing connection timeout on port 25 despite unlock, using App Function and NAT Gateway

Cedric 21 Reputation points
2021-08-04T08:29:56.743+00:00

Hi,

we have the requirement to connect to an SMTP server via port 25 and traffic must originate from a well known public IP.
So we did setup a NAT Gateway, connected our Function (Premium Plan) to the subnet and linked everything to use the public IP for outbound traffic.

In the subscription (Pay as you go) settings we also followed the process to unlock port 25, it says to no longer be restricted.

Despite all of this, our connection attempts still timeout. Our debugging attempts via telnet / netcat run into the same errors.
We used a second provider (mailtrap) to verify the connectivity issues are not related to the other party. Also there, connection attempts on port 25 run into timeouts.
Other outgoing requests, e.g. to port 2525 or 587 with mailtrap are successful and use the public IP.

What else is there we can do to further debug the issue and enable us to send the mails via port 25?
Is any of our components blocking this without a chance to unlock? (Function, NAT Gateway, ...)?

Any help is much appreciated. Thanks!
Cedric

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,029 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,472 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Devaraj G 2,096 Reputation points
    2021-08-07T10:41:04.833+00:00

    Hope the Microsoft confirmed on the port 25 exemption.

    Have your ruled out all the NSG and port bocks from the vnet/subnet for port 25 deny ?

    As part of debugging, can you create a small VM in azure and test the SMTP outbound from windows or linux box?


  2. MayankBargali-MSFT 70,466 Reputation points
    2021-08-09T06:49:10.95+00:00

    @Cedric As mentioned in this document Azure platform will block outbound SMTP connections on TCP port 25.
    Alternative you can leverage third party service such as SendGrid that provides these type of services. You can refer to Troubleshoot outbound SMTP connectivity problems in Azure for more details.

    Sharing previous discussion on the same.


Your answer

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