Using Classic Outlook on Windows for personal email, calendar, and contact management
Hi Minh Hiếu,
Thanks for reaching out in the Microsoft Q&A. I understand that you're setting up the email-oauth2-proxy tool to connect your Outlook account with the Windows Mail and Calendar app, but encountering repeated errors like: Client attempted to send command without waiting for server greeting OSError : [WinError 10057]
Let's break down the issue based on the log file you provided.
- Client Protocol Issue
◦ The Windows Mail client might not follow the IMAP protocol specifications when connecting to the proxy (sending commands before waiting for the server greeting).
◦ The log shows multiple connection attempts (e.g., 127.0.0.1:63097), all failing due to protocol errors.
- Proxy Configuration Issue
◦ email-oauth2-proxy listens on unsecured ports by default (e.g., 1993), but the client might mistakenly expect SSL/TLS.
- OAuth2 Authentication Incomplete
◦ If OAuth2 authentication is not properly completed (e.g., no login or invalid token), the proxy may fail to forward requests to Office 365.
Here are some suggestions that might help troubleshooting:
1. Check Client Configuration
• In the Windows Mail app, ensure:
◦ Server address: 127.0.0.1 (proxy address)
◦ Port: 1993 (IMAP) or 1587 (SMTP)
◦ Disable SSL/TLS: The proxy itself is unsecured (log shows unsecured), but it forwards to Office 365’s encrypted ports (e.g., 993).
◦ Username: Full email address (e.g., user@example.com).
◦ Password: May need to be left blank (relies on OAuth2 token) or filled with a dummy value (check proxy requirements).
2. Complete OAuth2 Authentication
- On the first run, the proxy should prompt you to log in via a browser to authorize the Microsoft account.
- Check if refreshtoken.txt or accesstoken.txt has been generated (in the proxy directory).
- If authentication fails, delete these token files and restart the proxy.
3. Modify Proxy Configuration
- Open emailproxy.config and verify:
- Make sure the Azure AD app is registered with correct client_id and client_secret (requires SMTP.Send, IMAP.AccessAsUser.All permissions).
[OAUTH2]
client_id = YOUR_AZURE_APP_CLIENT_ID
client_secret = YOUR_AZURE_APP_CLIENT_SECRET
tenant_id = common
redirect_uri = [http://localhost:8080]
If the issue still persists: Contact the Developer
Please note that email-oauth2-proxy is a community project developed and maintained by a user on GitHub, not an official Microsoft product. If you have followed all the steps above and are still facing issues, the problem may require a code-level fix or specific knowledge from the author.
Really hope this gets you back on track! Please feel free to reach out again if you need further assistance.
Best regards,
Winnie – MSFT | Microsoft Q&A Support Specialist