All emails are sent through one website

I’m having a bit of an issue with emails. Here’s the situation:
Webserver running centos 7 and the latest cyberpanel version. Several clients (~20) are hosted on this server and most of them use the emailserver for either sending out Woocommerce emails or using mailboxes on their account. All email seems to be routed through the client I se up first on this server. Let’s call this client myfirstdomain.com for my examples

For example Client john.com sends an email to me but makes a typo in the address. He receives an Undelivered Mail Returned to Sender starting with “This is the mail system at host myfirstdomain.com.”, while the actual server is not myfirstdomain.com but rather xmedias-strange-server.com

Another example is sending email using php mail() from the vhost somesystem.com as [email protected], the email arrives with this sender [email protected] [via] myfirstdomain.com

How can I make sure the emails are routed as their own domain? And whenever the emailserver sends a notification, it uses the clients domain (or the serverdomain)?

You can’t mails are routed thru domain you issued mail server SSL.

I changed the email config file to use my company domain instead of a random client domain. Stil not perfect, but a lot better