mail.mydomain.tld related questions — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

mail.mydomain.tld related questions

I'm trying to understand the structure and how all work together.

Whenever I create a new "website" the following happens (among others):

* Created: /home/mydomain.tld/public_html (OK)
* Created: /home/mydomain.tld/public_html/mail.mydomain.tld (NOT-OK)
* And in DNS Zone Records the following exist:

A mail.mydomain.tld (OK)
A mail.mail.mydomain.tld (NOT-OK)
CNAME www.mail.mydomain.tld mail.mydomain.tld (NOT-OK)
MX mydomain.tld mail.mydomain.tld (OK)
MX mail.mydomain.tld mail.mail.mydomain.tld (NOT-OK)

So:
mail.mydomain.tld is created as a child website. If you write mail.mydomain.tld to your browser you get a welcome page as it has a vHost. As this is a website, it also has a recursive mail.mail.* ...

Is this a bug, is this only related to my server or is it intended to work like this? If it is correct, can someone please explain me why do they exist? If not, how can I correct this?

Thank you in advance...

Comments

  • mail.domain.com is created for this reason -> https://cyberpanel.net/docs/6-self-signed-ssl-error-on-outlook-thunderbird/

    Because usually mail clients detect mail.domain.com as hostname while connecting.
  • @CyberPanel

    Thank you, that explains it.

    I know mail.* must be a subdomain. But it should not be served by the web server but dovecot - just saying without knowing the implementation.

    In any case, with the current implementation, can I assume the following:

    1) I can delete the following without any problems:

    A mail.mail.mydomain.tld (NOT-OK)
    CNAME www.mail.mydomain.tld mail.mydomain.tld (NOT-OK)
    MX mail.mydomain.tld mail.mail.mydomain.tld (NOT-OK)

    2) I should write some htaccess to return a "not allowed" code or put an emty index.html

    Thank you again...
  • 1. Yes you can safely delete those.

    2. Yes upto you, but you can not delete mail.domain.com from child-domains because if you delete this child-domain its SSL will fail to renew thus causing problems.
  • Thank you, much clearer now.
    Perhaps it is best not to create those extra DNS records during Website creation...
  • Type your comment> @bozden said:
    > Thank you, much clearer now.
    > Perhaps it is best not to create those extra DNS records during Website creation...

    Its a part of the mail.domain creation. The creation of the mail.mail makes no difference it would not cause a problem as the correct mail. record is present.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • I mean something like that would solve it (pseudo code):

    Option - 1 : Send a parameter to the subroutine
    ...
    call createChildDomain(bool blCreateMail)
    ...

    Option - 2 : Hardcoded
    ...
    if (left(strChildDomainName, 5) != "mail.") {
    ; do create DNS records
    ...
    }
    ...
  • If you think that is going to resolve it you need to submit the code for review on github.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • Fixed.
    https://github.com/usmannasir/cyberpanel/pull/395
  • Nope. The solution was not correct. Not merged. Proposed another solution to @usmannasir to take a look
    https://github.com/istiak101/cyberpanel/commit/a0f2cf9e870c76fc7368286ad2957568b39518b7#diff-8e80ce10f2ad16ff76973b5388eb1096
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!