How can I set up Email accounts on my domain and use RoundCube for managing mails? + Send mails (SMTP with PHPMailer)

I’m normally used to using cPanel and that kind of stuff, so I’m pretty green to Ubuntu and managing stuff myself, but you gotta start somewhere.

Anyway, I would like to set up email accounts on my domain which I had on my previous server. Such as this: etc…

I have been reading around for some info about this, for example this tutorial:

But I’m unsure whether or not it will meet my needs, first of all the Roundcube needs to be installed on or, and NOT on root domain.

I also need to use SMTP for sending out verification mails such as Registration Welcome, and reset mails. For this I have used PHPMailer on my previous server, but how do I go about setting up SMTP on my web server? So emails are sent from etc.

My droplet is running Ubuntu 16.04 with LAMP stack installed.

Any help is appreciated.


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.

Still no responses :(

I just realised I posted a similar question here: but it also hasn’t gotten a response yet.

Hopefully, it will be seen…

I have also tried to follow this tutorial for installing Postfix:

But got stuck at Can’t canonicalize “/home/anders/Maildir”