Question

Set up You Mail Server as well as host your dynamic site.

Posted December 4, 2021 128 views
Ubuntu 18.04

As I was following the tutorial on the topic.
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-postfix-e-mail-server-with-dovecot

But In that, I am not able to host my site. Actually, I want to host the Dynamic site and also run a mail server on the same system.
Is It Possible.?

1 comment
  • The last Time I create Droplet. I Run a mail server via mail-in-a-box and Successfully Run and am also able to Host the site but a static site
    via folder /home/user-data/www/example.com. And, Able to run example.com but a problem is that I want to run the MERN site. If anyone knows how to run the MERN site via mail-in-a-box, then it is also better for me.

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.

×
Submit an Answer
1 answer

Hello, @YJB

You can host your site and install postfix to send emails from the same droplet, this is not an issue at all. You can first configure a LAMP or LEMP stack droplet and then configure everything related to your site and then follow our tutorial for the Postfix + Dovecot setup.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-20-04

and then install Postfix:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-postfix-e-mail-server-with-dovecot

Also, make sure to check this article before going with the Postfix installation:

https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server

Hope that this helps
Regards,
Alex

by Lukas Erlacher
This tutorial will tell you how to setup a basic mail server and attempts to teach you a bit about the Postfix MTA (Mail Transfer Agent) in the process.