Adding second separate domain to server


My company consists of two independent divisions. For our clients, they are actually two different companies, although they employ the same people (mail users), and each company has its own website and domain (for example, OurFund . com and OurDelivery . com).

Now the mail is set up one for all on the domain OurFund and it is very inconvenient. Customers are confused by the mail address, and employees are confused trying to figure out which division a particular email was sent to.

We have Axigen installed on the Ubuntu 22.04 server. There are two network interfaces configured with IP XXX.XXX.100.001 and XXX.XXX.100.002 . The second interface is virtual.

Each of the domains has its own separate DNS zone and for them issued their own wildcard SSL certificates.
I put MX records in DNS for each domain separately, added the second domain in Axigen and configured for each of the IP addresses their own Listeners for SMTP IMAP etc.
However, the mail of the added one is not being sent. Mail sent to a user on the second domain goes to that user on the first domain.
If I go into WebMail on the OurDelivery . com domain, I end up in the mailbox on despite the fact that the address bar of the browser says OurDelivery . com.
I’m afraid I’m completely lost.
Can you tell me what is the correct procedure for adding a second independent domain with its own IP to make mail work properly through both mailApps and WebMail
Thank you!!!

You need to check your routing settings for the second domain.
You need to allow delivery for the second domain.

Also for logging in to webmail. I suggest not to put primary domain so you need explicitly to login with full users email address, and on the user name.

You are being redirected to the account of because it is your primary domain and you are using username with the account name only without the domain. example “xxx”.

Hope this will help you sort our your issue