IMAP certificate is not valid and sent mails are going to Junk folder after enabling Mail Client Autoconfiguration

Hi everyone. Sorry if this is the wrong place to ask my question.

Here’s the background:

  • I have domain which is both fully quilifed hostname and virtual serverand , and which is second virtual server.
  • Both and have Letsencrypt certificates
  • Certificate of was copied to Postfix and ProFTPD (as they don’t support multi domain SNI method)
  • Certificate of and were copied to Dovecot for multi domain IMAP SSL usage
  • I’m using for mail clients to be used for and, since is being used by Postfix SSL
  • Mail Client Autoconfiguration enabled

Here are my questions:

  1. When I configure either Thunderbird or Outlook, I get pop-up warning about IMAP certificate issue which points that I have invalid SSL certificate.
    Interestingly, CA information is all about auto generated (it’s not an example, it shows actual domain like this) certificate and has no information about Let’s Encrypt CA at all. But when I go to Virtualmin > Server Configuration > SSL Certificate, it shows me Dovecot (host and Dovecot (host
    At the end, I get IMAP certificate issue for both and

  2. I’ve changed Virtualmin > Email settings > Mail Client Configuration > Enable mail client autoconfiguration? to “Yes”. Since then, all emails sent from either and go to the Junk folder of receiver. Removed autoconfig.cgi to test if the issue started to occur after this or not, and I can confirm that everything is okay when I have no autoconfig.cgi. But I need autoconfig, because I will have more domains like, and etc. which will use as IMAP/SMTP address and without an autoconfig file I must manually configurate everything for end-user.

I hope it’s clear enough. Looking forward to see replies and appreciate any comment

Dead forum

Ultra dead forum

Extremely dead forum