Webmail on multiple IPs

Hi, I set up a VPS on OVH with Debian 11 and HestiaCP and created two domains with different IPs. The websites are good to go, but I’m running into trouble with my email domains. I can send and receive emails through external mail clients, but Roundcube is only working on IP1. On IP2, all I see is the “Success” page.

I’ve got the MX settings in check and both web servers are working fine, but I just can’t seem to get Roundcube on IP2 up and running. I need some help figuring this out!

Here’s my setup:

VPS on OVH with Debian 11 and HestiaCP
Two domains with different IPs
DNS settings for both domains:

domain.1 → IP1
mail.domain.1 → IP1
webmail.domain.1 → IP1

domain.2 → IP2
mail.domain.2 → IP2
webmail.domain.2 → IP2

MX settings are correct and both work with external clients like outlook or thunderbird
Both web servers are functioning properly on IP1 and IP2

The problem is with Roundcube, it’s only working on IP1. On IP2, I’m stuck with the “Success” page. I need some help to get it working on both IPs.

Thanks!

If domain.2 is assginged to ip2 it should also take webmail.domain.2 to the same ip adress.

The issue is that Roundcube only functions when the web domain has the first IP assigned to it. If I add a new domain and its corresponding mail domain, Roundcube will only open if I set the domain to the first IP. If I change the IP, I will only receive a “Success” page. Both domains have the same DNS settings (only changing the destination IPs)

Could this be related to this?

Whenever I add a new domain with a different assigned IP and check the “Enable mail for this domain” checkbox, the IP that appears in the mail settings is always the IP1, even if the assigned IP is different.