Postfix SMTP Relay server in Azure VM

Marcus Wong Theen Nam 1,111 Reputation points
2022-08-30T14:34:10.84+00:00

Due to some requirements we need to have one Azure VM and install postfix on it to serve as a SMTP Relay server. As I read from some MS articles I can see that port 25 is blocked for my subscription so I'll have to use port 587 for relay purpose.

Can I do any of the following?

  1. Setup Ubuntu postfix to send email directly to destination email server using DNS lookup and via port 587 as Azure VM.
  2. Setup Ubuntu postfix and configure O365 as relayhost and send thru port 587.

Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,196 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,791 Reputation points MVP
    2022-08-30T15:23:04.697+00:00

    Hi Marcus,

    Yes port 25 is blocked for all but EA subscription types but you should be able to send authenticated emails through port 587.

    https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity#recommended-method-of-sending-email
    236187-screenshot-2022-08-30-162030.jpg

    0 comments No comments

  2. Marcus Wong Theen Nam 1,111 Reputation points
    2022-09-06T02:13:54.527+00:00

    May I know is it possible to send out directly from postfix via port 587 without relaying to any SMTP server?

    0 comments No comments