Whilst trying to connect Gmail to a POP3/IMAP Virtualmin system, you might encounter the following issue:
"Gmailify is not available for this provider."
The issue is on the Virtualmin side, with the the Dovecot setup.
Here is a more detailed analysis on how to troubleshoot:
The first error that appears is ‘Gmailify is not available for this provider.’
The only other option available is ‘Import emails from my other account (POP3)’.
One enters email address and password, select SSL and port 995. Then you get this:
"Unable to establish secure SSL connection to xxxx.domain.com" Server returned error: "SSL error: Leaf certificate is self-signed"
When you tail -f /var/log/maillog you see this on each attempt:
Jul 4 10:18:25 hostname dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=yyy.85.208.29, lip=zzz.119.250.85, TLS: Connection closed, session=<ruxNwClw+o7RVdAd>
The clue is in Webmin / Servers / Dovecot IMAP/POP3 Server. There is a problem with the certificate.
Using Edit Config files scroll to the bottom. You should see some certificate information added to the config file. Make a backup of the config file and remove the certificate information.
Then re-generate a certificate for Dovecot.