Multiple mail serve...
 
Notifications
Clear all

Multiple mail servers in one installation

5 Posts
3 Users
0 Reactions
1,563 Views
Posts: 13
Topic starter
(@jlight)
Eminent Member
Joined: 7 years ago

I realize this is a bit obscure and definitely an edge case, but is it possible to manage two mail servers from a single SolidCP installation?
I'm currently merging hosting accounts from two servers at different hosting companies to a single server.  One server is running MailEnable, the other server is running hMailServer.  Ideally I'd like one reseller account to use one mail server and another reseller account to use the other mail server.
I was able to install both onto the new server and have each using different IP addresses, so from a physical server standpoint it seems to work fine.  I was able to add both mail servers to SolidCP as mail servers and give them different names, but there doesn't seem to be any way of specifying which mail server to use in the hosting plans or anywhere else.  I tried adding mail accounts to both mail servers manually and then pulling them in using Import Hosting Space Resources, but I'm only seeing the domains from MailEnable (the first one I installed) and not seeing any of the domains in hMailServer.  I can always manage mail accounts manually on the server, but I'd like to give my customers the ability to add mail accounts or reset passwords without having to get me involved.
Is what I want to do even possible, and if so how?

4 Replies
Posts: 13
Topic starter
(@jlight)
Eminent Member
Joined: 7 years ago

I thought I came up with a solution that would work, but in testing it does not.  I created two Virtual Servers, the only difference between the two is one is using hMailServer for mail the other is using MailEnable for mail.  I then created Hosting Plans so that one had the Target Server to the virtual server with MailEnable and the other had the Target Server set to the virtual server with hMailServer.  I then edited the account spaces to use those new plans.  However in adding a mail account to the space using hMailServer it still showed up in MailEnable instead of hMailServer.  Hmm.
FYI, I'm using Windows Server 2016 as the OS, not that it should make any difference.

Reply
Posts: 13
Topic starter
(@jlight)
Eminent Member
Joined: 7 years ago

OK. I figured it out. Even though I had updated the space setting to use the new hosting plan the service setting didn't get updated. Deleting the space and creating a new one fixed it. So now I have spaces under one plan using one mail server and spaces under another plan using the other mail server.  This same technique can be used for other services as well, for example if you wanted to use different FTP providers.

Reply
Posts: 60
 Jade
(@shabsta)
Member
Joined: 7 years ago

We run a similar setup with 4 active servers configured within our virtual servers pool. The only caveat with this setup is the logic of SolidCP in that it does not allow one hosting space to have domains on different resources.
The structure of the code relies on the hosting space to dictate the server resource rather than each domain having its own resourceid assigned to it to allow domains in one hosting space to exist on different servers.

In future you could run the following which will assist in identifying your resources

Replace solid_db with your solidcp database name

/** get service details with names **/
SELECT [solid_db].[dbo].[PackageServices].*,[solid_db].[dbo].[Services].ServiceName , [solid_db].[dbo].[Servers].ServerName
FROM
[solid_db].[dbo].[PackageServices],
[solid_db].[dbo].[Services],
[solid_db].[dbo].[Servers]
WHERE
[solid_db].[dbo].[PackageServices].ServiceID=[solid_db].[dbo].[Services].ServiceID AND
[solid_db].[dbo].[Services].ServerID=[solid_db].[dbo].[Servers].ServerID AND
[solid_db].[dbo].[PackageServices].PackageID = '3549';

The above returns the services assigned to that hosting plan. With this we are able to update the hosting plan resources to point to another server. In some cases you may want to detach the services, run the update script, and then re-import the services.
If the services have DNS resources assigned to them, then rebuild dns

For web services we use
These update OS, FTP and IIS Resources
update [solid_db].[dbo].[PackageServices] set serviceid = '1069' where serviceid = '1009' and PackageID = '3346';
update [solid_db].[dbo].[PackageServices] set serviceid = '1071' where serviceid = '1010' and PackageID = '3346';
update [solid_db].[dbo].[PackageServices] set serviceid = '1068' where serviceid = '1008' and PackageID = '3346';

For mail services we use
update [solid_db].[dbo].[PackageServices] set [ServiceID] = '3' where [ServiceID] = '1047' and [PackageID] = '3414';

Reply
Posts: 237
(@hxkd)
Reputable Member
Joined: 8 years ago

We added multiple mail servers in to a single virtual server, so each client gets created on separate servers, unfortunately all the clients domains get created on one server

Reply
Share: