How to setup Postfix on Ubuntu 20.04 (NGINX) with Multiple Server Blocks for Wordpress?

I’ve read many tutorials on Digital Ocean and some external website but couldn’t find a clear tutorial on setting up Postfix for a server with server blocks setup that’s hosting independent Wordpress sites.

Could someone please guide me as I just got to know that my Wordpress sites have been running for months without proper email setup.

Also what should be used for the “System Mail Name” if I’m running Wordpress on different server blocks?


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

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.

Hey there!

Typically a default Postfix server should be sufficient for sending mail from a server with multiple Wordpress installations. Postfix

For the system mail name you would typically have that set to your own servers hostname. Mail would be sent from that hostname.

If you need those to be sent from the individual sites domains and not your hostname you may want to setup Wordpress plugins that use their own external email relay services. Doing so will remove the additional work of maintaining IP reputation and blocking spam on your own email server.

Hope it helps! Nate