I'm setting up hMailServer on a new Azure Windows VM. I've successfully sent a mail from my email client, and it arrived in the hMailServer outbound queue, but from there it gets stuck. I ran

telnet mail.hmailserver.com 25

and it replies:

Connecting To mail.hmailserver.com...Could not open connection to the host, on port 25: Connect failed

I've made specific outbound rules opening port 25, both in the Windows Firewall, and in the Azure Network Security Group, even though both appear to be allowed by default even without a specific rule.

What else do I need to do?


Running your own SMTP mail server to directly send outgoing e-mail is not supported.

Source: https://docs.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity

Starting on November 15, 2017, outbound email messages that are sent directly to external domains (such as outlook.com and gmail.com) from a virtual machine (VM) are made available only to certain subscription types in Microsoft Azure. Outbound SMTP connections that use TCP port 25 were blocked.

Recommended method of sending email

We recommend you use authenticated SMTP relay services (that typically connect through TCP port 587 or 443 but support other ports, too) to send email from Azure VMs or from Azure App Services. These services are used to maintain IP or domain reputation to minimize the possibility that third-party email providers will reject the message. Such SMTP relay services include but aren't limited to SendGrid. It's also possible you have a secure SMTP relay service that's running on-premises that you can use.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.