Let's encrypt for email domain

I have read all the similar threads here, but could not solve my problem. I created a web domain and successfully obtained a certificate for it, but when I tried to get ssl in the mail section I got error 400. I have the necessary records (mail/webmail) in DNS and they are accessible from the outside world.
From the logs it seems that the web address mail.MY_DOMAIN.com is missing and I really did not find anything about it in the nginx configs. Maybe I should create it manually?

==[Debug information Step 5]==
{
  "type": "http-01",
  "status": "invalid",
  "error": {
    "type": "urn:ietf:params:acme:error:unauthorized",
    "detail": "XXX.XXX.XXX.XXX: Invalid response from http://mail.MY_DOMAIN.com/.well-known/acme-challenge/VamVjSP8dLmFSMcaERwht07G4WknxowGb4BW5MwjabU: 404",
    "status": 403
  },
  "url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/208332787817/nrsCTQ",
  "token": "VamVjSP8dLmFSMcaERwht07G4WknxowGb4BW5MwjabU",
  "validationRecord": [
    {
      "url": "http://mail.MY_DOMAIN.com/.well-known/acme-challenge/VamVjSP8dLmFSMcaERwht07G4WknxowGb4BW5MwjabU",
      "hostname": "mail.MY_DOMAIN.com",
      "port": "80",
      "addressesResolved": [
        "XXX.XXX.XXX.XXX"
      ],
      "addressUsed": "XXX.XXX.XXX.XXX"
    }
  ],
  "validated": "2023-03-05T06:25:42Z"
}


==[Abort Step 5]==
=> Wrong status

looks like you’ve added mail.domain.tld or webmail.domain.tld as webdomain or used a *.domain.tld somewhere in the web section. Your domain shows the default success page from web and no webmail at all. PS: You may want to hide the letsencrypt status link aswell, it shows your domain name.

Right now it looks like this. I created MY_DOMAIN.com and put a checkbox in it to create mail. In my last attempt, I didn’t create anything in the web section at all and got the same result. Anyway, I don’t need any web right now, I just need mail.

I found what the problem was. I tried to create domains from the admin account, but was warned not to do so. I switched to a user account, but forgot to delete the domains. Thank you.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.