DeltaChat on Android and Desktop, using a Virtualmin mail server with a wildcard certificate, is unable to automatically detect the SMTP server

I’m having an issue with DeltaChat automatically discovering my mail server’s SMTP settings.
I’ve already added the required discovery A and SRV records, and my MX record is detected correctly.

When I try to log in, I get a NotValidForName error. However, if I manually enter my SMTP address in the SMTP server field, everything works.

My Virtualmin server is using a wildcard certificate, and ChatGPT previously suggested switching to a domain‑specific certificate for my mail.mydomain.com address.

Does anyone know how I can fix this?