Would like help with understanding mail server, and how to use mail server without a site

Hello,

The server in question has Ubuntu 18.04.6 LTS.

It has the most current Cyberpanel version and build:

Current Version:  2.3
Build:  4
Current Commit:  5aee24ae593cdbbf5b1ccea5ad3f9c8898d5a7b1
Latest Version:  2.3
Latest Build:  4
Latest Commit:  5aee24ae593cdbbf5b1ccea5ad3f9c8898d5a7b1

I have a situation where I want to use Cyberpanel just for the email aspect of a domain. The site for the domain is hosted elsewhere.

I notice that on recent versions of Cyber when adding a new “Site” it has the option to also add “Create Mail Domain”. I don’t see that mentioned in the video tutorial I watched, and associated article. So I was not sure whether to use this option or not.

I would be very grateful to have some help with the following questions:

  1. First off, is there documentation that covers this for the newer version of Cyber (those that have the “Create Mail Domain” option)? If there’s documentation for this, perhaps the following questions are answered there. I wasn’t able to find it though.

  2. When adding the domain (via Add New Site) to Cyber, should I use the “Create Mail Domain” option?

  3. If I use that option, I will (of course) have a mail.mydomain.net and mydomain.net listed on Cyber. So when issuing the Mail SSL do I do that for the mail.mydomain.net, or mydomain.net, or both?

  4. Do I point the MX record (on Cloudflare) to mail.mydomain.net or mydomain.net?

I think that’s all, although I may have other questions once I figure out the above and implement it.

Jonathan

Further to the above …

What I’ve now done is:

  1. I added a “Site” for mydomain.net, and used the “Create Mail Domain” option.
  2. I have added an MX record for both mail.mydomain.net and for mydomain.net.
  3. I have attempted to issue an SSL certificate for mail.mydomain.net. It was reported as successful. However when I try to access the IMAP server it is dishing up the SSL from another domain I set up for mail services on this server. So I am not able to connect to mail.mydomain.net over IMAP due to an SSL mismatch. Previously it was dishing up a self-sign certificate (with www.example.com as the domain`), so something has for sure occurred when issuing the SSL cert, but the server isn’t providing the correct cert on incoming IMTP requests.

Is there a way around that?

Is it not possible to have the server handle the emails for more than one domain? I find that hard to imagine, so I’m guessing something isn’t right with the way I’ve set this up.

UPDATE:
I did a test via https://www.checktls.com/TestReceiver and I can see that mail.mydomain.net is correctly linking through to the server IP, but then the server is directing the request to mail.otherdomain.net. otherdomain.net is another domain I’ve previously set up on the server for mail and a website.