When using Thunderbird on Ubuntu 26.04 recently, an error pops up in a pop-up window:
Thunderbird cannot connect to imap.gmail.com, please try again later. If the problem persists, it may be that you exceed the maximum number of connections allowed by this server. The number of cached connections can be reduced in the IMAP server settings.
Although the maximum number of connections is adjusted to 1, even all Google-related cookies and saved passwords are cleared, and the OAuth 2.0 authentication is re-authenticated, the problem still exists. What’s even more strange is that all other mailboxes on Thunderbird (such as 163.com) are normal, but NetEase Mail Master on Android phones can receive Gmail emails normally.
2. Preliminary investigation: client and agent
Connection settings: has been set to 1 to exclude client concurrency restrictions.
Proxy configuration: Invalid TUN mode (virtual network card) or manual proxy using Clash Verge Rev. Even if the proxy is closed (Google cannot be accessed in the country), or the system proxy is used instead, Thunderbird still cannot connect.
Clear authentication information: Repeatedly delete cookies and passwords, reauthorize OAuth2, the authentication window can pop up, but the subsequent IMAP synchronization still fails.
3. In-depth server-side diagnosis
Since there is no problem with the client configuration, we log in to the VPN server (located in Los Angeles, self-built WireGuard + Wstunnel) for network testing.
1. Test basic connectivity
curl -v https://www.google.com
Returns 200 successfully, indicating that HTTPS (443) is reachable.
The domain name resolution is correct, the problem is not in DNS.
4. Try hosts bindings
Will imap.gmail.com Forcing IPs to SMTP (142.250.101.109), the result 993 port still times out, indicating that it is not an IP routing problem, butPort is shielded.
The data packet is lost immediately after leaving the server gateway, certifying that the service provider (zgovps.com) is exported to its networkClearly blocked TCP 993 ports(May also include 995, 143).
The root cause
Service provider restrictions:ZGoVPS filters non-web service common ports (IMAPS, POP3S) in the outbound direction, and only reserves SMTP (465/587) for sending letters.
Why can the mobile phone NetEase mailbox master receive letters? It does not directly use the IMAP protocol, but throughNetease server transferOr call Gmail API (based on HTTPS), avoiding port restrictions.
The solution
Since the service provider cannot release the port (the console has no relevant setting entry, and it may be fruitless after submitting the work order), we can only change the communication method between the client and Gmail.Switch to mail clients that support Gmail APIIt is the most direct way, because the Gmail API uses HTTPS (443), which is unblocked.
6. Summary and Reflection
Diagnostic Logic of Network Problems: From the client → proxy → server → port → routing, progress is the key to the positioning problem.
Transition value of third-party services: Applications such as NetEase Mail Master can ‘bypass’ the restrictions, thanks to its server cluster or API calls, which shows that we should make good use of the API instead of the traditional protocol under the restricted network.
Consider the network environment when selecting a tool: For domestic self-built VPN users, be sure to confirm whether the service provider is blocking the commonly used mail port, otherwise the HTTPS-based client should be preferred.
This experience has shifted me from relying on Thunderbird to the more modern Gmail API client. Although the habit needs to be changed, the efficiency and stability have been improved. I hope this record can help friends who encounter similar difficulties to avoid detours.
Stop the Hassle | Dedicated WireGuard VPN Deployment Service
I continuously test and evaluate various network optimization solutions. My personal setup has been running stably for over a month with zero downtime. If you are tired of troubleshooting, experimenting with different protocols, or managing complex server configurations, feel free to contact me for a dedicated solution.
Ideal For:
✅ Users of AI tools such as ChatGPT, Claude, and Gemini
✅ Remote workers who rely on stable international connectivity
✅ Developers and technical learners who need access to global resources
✅ Users who do not want to spend time managing VPS and proxy configurations
✅ Anyone who prefers a private VPN server instead of shared public services
What I Offer:
✅ Remote Deployment: Deploy a dedicated WireGuard VPN on your own server with full control over your data.
✅ Free Trial: Apply for a one-month free trial of my self-hosted VPN node before making a decision.
✅ Traffic Routing Optimization: Fine-tuned routing rules optimized for AI tools, development environments, and everyday browsing.
✅ Post-Deployment Support: Assistance with setup, client configuration, and troubleshooting after deployment.
If you would like to learn more or apply for a free trial, please contact me directly and mention: VPN Consultation.