Multiple mail servers for different hosts on the same VPS server

Operating system: ubuntu
OS version: 18.04
I have the following problem. I have my own VPS server where I host some websites (I use an apache server for that). The question is if there is a way to create a mail server for each website but in the same VPS server. And if this can happen using Postfix. None of the articles and videos refer to this situation.
Any help would be much valuable!
Thanks in advance

1 Like

Hello @thanos83 and welcome to the community.

Yes, Virtualmin does that: you will be able to host websites on multiple domain names. You will also be able to host multiple domain names on Postfix and create multiple mailboxes under each domain.

Additionally, Virtualmin will let you host multiple domains with each domain having its own website and email service and ftp service. In fact this is the default configuration when Virtualmin is used with default settings out of the box.

Hope this answers your questions.

Hi, calport.
Thanks a lot for your answer. It is very encouraging to hear that since I am a newbie in server administration and this setup has been a nightmare… Btw I use Webmin to host my websites by now. hope this is not a problem. Also, do you have any good resources to suggest regarding this topic?
Thanks again,
regards

Well, I use Virtualmin and not Webmin only to use a server for shared hosting. I do not have any experience with Webmin as a shared hosting tool.

In a very recent exchange with another user of this forum, an admin stated that Webmin is a general purpose system admin tool and Virtualmin a control panel for shared hosting.

Would you like me to point you to resources which pertain to using Virtualmin as a shared hosting control panel or do you want to do things the hard way and continue to use Webmin for shared hosting?

Yes, I would like you to provide me with resources about Virtualmin, and if possible on how to create separate mail servers for each hosting (website).
Thanks in advance.

Here is the best way to install Virtualmin: Automated Virtualmin Installation – Virtualmin

This must be done on a freshly installed OS, so you must either:

  1. Take a backup of your Webmin install, format the HDD and install an OS, then install Virtualmin via the method outlined in the link above
  2. Spin up a new virtual server and install Virtualmin via the method outlined in the link above

Let us know how it goes in a different topic.

Hi,

The question is if there is a way to create a mail server for each website but in the same VPS server.

If you wish to use mail.domain1.com and mail.domain2.com for sending mail then you should consider using Ubuntu 20.04 or Debian 10 as they have Postfix 3.4 which supports SNI.

How’d that happen? Virtualmin is generally the right tool for the job for hosting websites…so, how’d you end up with just Webmin?

Hi all and thanks for the support.
As I mentioned before I am a newbie in server administration and for the VPS server that I bought and use I chose ubuntu 18.04 and Webmin. Trying to set up mail servers for websites that I want to host was very hard for me and thus I searched for easier ways and that is how I found Virtualmin. I hope the whole process to be substantially simpler now . . .
I just finished the installation and started exploring the options!
Thanks again and I am sure that I’ll come back with more questions

Postfix 3.4 from Ghettoforge worked for me as a drop-in replacement on CentOS 7.9 and seems to be working on AlmaLinux 8.3, although I can’t fully test the latter because it’s not on a public server.

YMMV.

Richard

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.