Postfix SMTP Relay server in Azure VM

Marcus Wong Theen Nam 1,111 Reputation points

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,243 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,796 Reputation points MVP

    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.

    0 comments No comments

  2. Marcus Wong Theen Nam 1,111 Reputation points

    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