Running V12.0.0, Windows 10.0.19045 Build 19045, Vara 4.8.9
Upon configuring the new incoming mail gateway confirmation, IMAP Test consistently fails. SMTP and IMAP configurations both are using the same password (with spaces). SMTP Send Test Email succeeds, IMAP Test fails.

From the VarAC.log, the following message is typical.
"06/07/2025 13:33:18 - SHUTTING DOWN EMAIL GATEWAY. Too many retries (exceeded limit of 5 retries)
06/07/2025 13:34:19 - Email gateway error: Unable to receive email from IMAP server. An error occurred while attempting to establish an SSL or TLS connection.
The server's SSL certificate could not be validated for the following reasons:
• The server certificate has the following errors:
• The revocation function was unable to check revocation for the certificate."
Here is what you need to do :
Identify Your Anti-Virus Software: First, determine which anti-virus software you are using (e.g., Avast, AVG, Bitdefender, Kaspersky, Norton, Windows Defender, etc.).
Check Anti-Virus Settings for SSL/HTTPS Scanning:
Open your anti-virus software's settings or preferences.
Look for features like "Web Protection," "HTTPS Scanning," "SSL Scanning," "Encrypted Connections Scan," or similar.
Disable this feature temporarily to see if it resolves the issue. If it does, you've found the culprit.
Configure Exclusions (Best Practice):
If disabling the feature works, look for an option within your anti-virus to "exclude" specific applications or domains from HTTPS scanning.
Exclude your C# application's executable from being scanned for SSL/HTTPS traffic.
Alternatively, try to exclude the domain imap.google.com (and potentially smtp.google.com if you're also sending emails) from HTTPS scanning.
Why Anti-Virus Can Cause This (MITM Proxy):
Many anti-virus programs, especially those with "web protection" or "HTTPS scanning" features, act as a Man-in-the-Middle (MITM) proxy for SSL/TLS connections. Here's how it generally works:
Intercepting the Connection: When your C# app tries to connect to imap.google.com over SSL (port 993), the anti-virus intercepts this connection.
Generating a Fake Certificate: Instead of allowing your app to directly connect to Google, the anti-virus generates its own SSL certificate on the fly. This fake certificate claims to be for imap.google.com but is actually signed by the anti-virus's own (private) root certificate.
Presenting the Fake Certificate: The anti-virus presents this fake certificate to your C# application.
Forwarding Traffic: Your C# app then establishes an SSL connection with the anti-virus (using the fake certificate). The anti-virus then establishes a separate SSL connection with the actual Google IMAP server, decrypts the traffic, scans it for malware, and re-encrypts it before sending it to your app.
Revocation Check Failure: The problem arises when your C# application tries to perform a revocation check on the fake certificate presented by the anti-virus.
Untrusted Root: The root certificate used by the anti-virus to sign its fake certificates is not a globally trusted Certificate Authority (CA). While the anti-virus might install its root certificate into your system's trust store (which is why web browsers usually don't complain), your C# application's default certificate validation might not implicitly trust it, especially if the anti-virus's root isn't configured correctly or if your app's environment is sandboxed.
No Revocation Information for Fake Cert: The anti-virus-generated certificate typically doesn't have valid Certificate Revocation List (CRL) or Online Certificate Status Protocol (OCSP) endpoints. These are the mechanisms used to check if a certificate has been revoked. Since the anti-virus generates these certificates dynamically, it doesn't typically maintain public revocation information for them. When your app tries to check for revocation, it fails because there's no revocation server to query for that specific, locally-generated certificate.
Some Anti-Virus software blocks SSL communication with self signed SSL certificates. I got this from W1IZZ who also experiance it :
"The server's SSL certificate could not be validated for the following reasons: • The server certificate has the following errors: • The revocation function was unable to check revocation for the certificate."
I looked up the error and one of the possible issues was A/V software. I disabled the email scanner in the A/V software, which cleared the issue.
I haven't figured out why the A/V software found an issue with the IMAP settings and not the SMTP settings.