[Solved] The client lacks sufficient authorization :: Invalid response from

Hello, I have seen various topics on the forum about this problem, but I do not understand how to solve this problem.
I am French speaking English, I beg you in advance of my bad English.

My server has several domains, but one of the certificates le’ts encrypt is not renewed.

Here is the error:

Blockquote Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Performing the following challenges: http-01 challenge for mail.pkmia.fr Using the webroot path /home/user-data/ssl/lets_encrypt/webroot for all unmatched domains. Waiting for verification… Cleaning up challenges Failed authorization procedure. mail.pkmia.fr (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mail.pkmia.fr/.well-known/acme-challenge/Y39tlLc7waSvrhQZWx2K_mGQjjpvocBrOTHbLHSjpt8: q%!(EXTRA string=<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p) IMPORTANT NOTES: - The following errors were reported by the server: Domain: mail.pkmia.fr Type: unauthorized Detail: Invalid response from http://mail.pkmia.fr/.well-known/acme-challenge/Y39tlLc7waSvrhQZWx2K_mGQjjpvocBrOTHbLHSjpt8: q%!(EXTRA string=<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p) To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.

Thank you in advance for your help.

What is the main domain of your MiaB installation?

It appears that you are wanting to use external DNS rather than your MiaB installation for your DNS, is this correct? At the moment mail.pkmia.fr is not resolving in DNS.

Hello, the main domain is mail.pkmia.fr, there is a dns problem?

Exactly I use the dns of the domain provider.

If you are using the domain registrar’s dns you need to add entries for your MiaB server.

You need an A record for mail.pkmia.fr pointing to the IP address of the MiaB server as well as a MX record pointing to mail.pkmia.fr. You will need to also set up the records shown in the admin area under Settings>External DNS.

There was a MX duplicate. I just deleted it, and I recreated an MX record to mail.pkmia.fr.
I executed ./ssl_certificates.py.
Great, the certificate is well generated, great, thank you very much.