Question

How To Use Postfix Without Third Party Relay Service

Hi

I want to use postfix as send only smtp without any third party relay such as gmail :- https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-16-04

But many cloud providers block port 25. Is there any way to make work postfix on port 587?

Tried editing postfix configs but not worked.

Thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @rishi008,

You should be able to easily change the port from 25 to 587. You can follow the article you’ve provided to actually install Postfix.

As soon as you do, can do the following to enable port 587 using Postfix.

Before we start, here is some information that might confuse people if it’s not mentioned. Normally, everyone uses port 25 as it is the default port in emails. As it is extensively used by many, it conveys malware and spam. So most of the ISPs are filtering the emails coming through it.

Port 587 is another submission port as 25. This port ensures that the emails are submitted securely. Thus, most of the ISPs don’t block this port. This definitely reduces the rate of rejected messages on the server.

Now onto the configuration.

Once you have installed Postfix, open your master.cf file

vi /etc/postfix/master.cf

Fine the below line and remove the # symbol in front of it:

#submission inet n - n - - smtpd

It should look like so

submission inet n - n - - smtpd

After that, we restart the postfix using the below command.

service postfix restart

This will enable port 587 in postfix.

Regards, KDSys