I read the questionnaire, but I was not very inclined to reveal my hostnames. Anyway the host are pinty.fr and another one theredshiftempire.com
I have made some progress
How did you configure Dovecot?
Actually the mail server is a mailcow instance (with it's own nginx, and acme container), that I'm running behind a main nginx reverse proxy.
I figured out that the certificate weren't renewed by mailcow's acme container because for some reason, I think it won't follow the 80 to 443 redirection.
this is what the mailcow acme container outputs:
mailcowdockerized-acme-mailcow-1 | Found domains: mail.pinty.fr, autodiscover.theredshiftempire.com, autodiscover.pinty.fr, autoconfig.pinty.fr, autoconfig.theredshiftempire.com
mailcowdockerized-acme-mailcow-1 | Getting directory...
mailcowdockerized-acme-mailcow-1 | Directory found!
mailcowdockerized-acme-mailcow-1 | Registering account...
mailcowdockerized-acme-mailcow-1 | Already registered! Account ID: https://acme-v02.api.letsencrypt.org/acme/acct/XXXXXX
mailcowdockerized-acme-mailcow-1 | Creating new order...
mailcowdockerized-acme-mailcow-1 | Order created!
mailcowdockerized-acme-mailcow-1 | Verifying autoconfig.pinty.fr...
mailcowdockerized-acme-mailcow-1 | Traceback (most recent call last):
mailcowdockerized-acme-mailcow-1 | File "/usr/bin/acme-tiny", line 8, in <module>
mailcowdockerized-acme-mailcow-1 | sys.exit(main())
mailcowdockerized-acme-mailcow-1 | File "/usr/lib/python3.10/site-packages/acme_tiny.py", line 195, in main
mailcowdockerized-acme-mailcow-1 | signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact, check_port=args.check_port)
mailcowdockerized-acme-mailcow-1 | File "/usr/lib/python3.10/site-packages/acme_tiny.py", line 153, in get_crt
mailcowdockerized-acme-mailcow-1 | raise ValueError("Challenge did not pass for {0}: {1}".format(domain, authorization))
mailcowdockerized-acme-mailcow-1 | ValueError: Challenge did not pass for autoconfig.pinty.fr: {'identifier': {'type': 'dns', 'value': 'autoconfig.pinty.fr'}, 'status': 'invalid', 'expires': '2022-12-02T21:16:07Z', 'challenges': [{'type': 'http-01', 'status': 'invalid', 'error': {'type': 'urn:ietf:params:acme:error:connection', 'detail': '82.123.53.27: Fetching http://autoconfig.pinty.fr/.well-known/acme-challenge/AbgvaxbdLlGZwMVrA3EFh6XdArwg3I0fTXW8z5PL664: Connection refused', 'status': 400}, 'url': 'https://acme-v02.api.letsencrypt.org/acme/chall-v3/180472630947/ADAyuw', 'token': 'AbgvaxbdLlGZwMVrA3EFh6XdArwg3I0fTXW8z5PL664', 'validationRecord': [{'url': 'http://autoconfig.pinty.fr/.well-known/acme-challenge/AbgvaxbdLlGZwMVrA3EFh6XdArwg3I0fTXW8z5PL664', 'hostname': 'autoconfig.pinty.fr', 'port': '80', 'addressesResolved': ['82.123.53.27'], 'addressUsed': '82.123.53.27'}], 'validated': '2022-11-25T21:24:15Z'}]}
mailcowdockerized-acme-mailcow-1 | Fri Nov 25 22:24:18 CET 2022 - Failed to obtain certificate /var/lib/acme/mail.pinty.fr/cert.pem for domains 'mail.pinty.fr autoconfig.pinty.fr autoconfig.theredshiftempire.com autodiscover.pinty.fr autodiscover.theredshiftempire.com'
mailcowdockerized-acme-mailcow-1 | OK
mailcowdockerized-acme-mailcow-1 | Fri Nov 25 22:24:18 CET 2022 - Some errors occurred, retrying in 30 minutes...
mailcowdockerized-acme-mailcow-1 | OK
If I try
curl https://autoconfig.pinty.fr
I get a server response. But if I try:
curl http://autoconfig.pinty.fr
It gives a connection refused
But I checked in a browser that the redirection is functionnal, and acme challenge should follow de http to https redirection, so I have no clue why it doesn't renew. I suspect a misconfiguration in my Nginx main reverse proxy, but it's pretty standard.