I’m on ubuntu 20.04 with LAMP server running.

I’m actually trying to setup my own mail server on my vps, on the same droplet as my website.

I’ve been trying to follow the tutorial : https://www.linuxbabe.com/ubuntu/install-roundcube-webmail-ubuntu-20-04-apache-nginx

So as I understood, I need to setup Postfix for SMTP and Dovecot for IMAP but at the beginning of this tutorial https://www.linuxbabe.com/mail-server/setup-basic-postfix-mail-sever-ubuntu

It’s asked to modified the FQDN, that’s where I’m facing an issue.

I don’t really understand the impact of FQDN and my website is in production, I don’t want to got it down again (I had a big issue after installing iRedMail)

So does somebody faced the same problem, like hosting your mail server on the same droplet that is hosting your website ?

I’m sorry if it’s a bit messy, feel free to ask me anything, I’m completely lost.

By the way, if you have a better way to have multiple email adresses on a custom domain, all hosted on my vps and free, I take it, I just don’t want to use external hosting.

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
3 answers

Hi @julienmauclair1,

So, the FQDN in the article you’ve posted is so that you can create an MX record afterwards. The FQDN will help with your SPF and DKIM record as well. Some providers do require FQDN in the SPF record and from the server that’s sending the mail.

Having said that, setting a new FQDN shouldn’t cause any issues with your website/application UNLESS you have some hardcoded stuff in your code with your current FQDN which is highly unlikely. With that being said, what you can just do is create a snapshot of your Droplet and if you break something on it just restore from the created snapshot.

If you are uncertain you can check the following article on how to use the snapshot feature:


  • Hi,

    Thank you very much for your answer !

    I don’t think that I have some hardcoded stuff with my actual FQDN because I’ve just got a Prestashop Website installed on the Droplet, I made a basic installation of LAMP thanks to the Digital Ocean guide (which is so well made as all the others guide).

    After having my website down, I’m used to do snapshot everytime I have to implement a new solution to the droplet, so I already know how it’s works, even though, I don’t really want my website down again :).

    But my main question still remain, what is the best solution to implement a mail server on a droplet that already host a website ?

    If you have any clue, I’m interested, I’ve tried to setup roundcube with postfix and dovecot, but I don’t really understand, what’s the adress of my IMAP and SMTP server, maybe it’s linked with my FQDN ?

Everything is solved !

I’ve setup my droplet to have my PTR record as : mail.domain.com

I’ve set my FQDN as : mail.domain.com

And everything is working with roundcube.

Just need to setup my DMARC.

Just need to know, does it affect SEO ?

Hi @julienmauclair1, how did you bypass the port 25 block?