Home-Assistant-Mail-And-Packages: ISSUE: Error connecting into IMAP Server: [SSL] tlsv1 alert no application protocol (_ssl.c:1018)
Describe the bug
My provider is fastmail, who offer IMAPS via imap.fastmail.com:993 (TLS, not STARTLS. https://www.fastmail.help/hc/en-us/articles/1500000278342-Server-names-and-ports)
I’m unable to connect via this addon because it appears as though the client is doing some ALPN stuff that is not supported by the server; if you google for this same error message you’ll see that pgsql recently had some issues with this sort of thing.
It feels like maybe there are some options for TLS in the IMAP client that should be relaxed?
Environment (please complete the following information):
- OS: HassOS
- Home Assistant version: 2025.1.3
- Component version: 0.4.2
Logs
Error connecting into IMAP Server: [SSL] tlsv1 alert no application protocol (_ssl.c:1018)
Screenshots Nothing more useful than the log!
Additional context
While I won’t share my credentials, I think you should be able to replicate this issue by also trying to connect to the host and port mentioned above: if you get as far as authentication then it is working. For me, I haven’t gotten that far.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19
I have also been experiencing this issue, but the patched file fixes it for me after also updating to M&P beta.
Initially that drop-in failed to load because I was running v0.4.2, but after updating to the beta and reloading with the fixed file, it appears to be working again, all happily connected and sensors properly set.
Sorry for that, unfortunately the logfile doesn’t seem to provide much more detail:
Attached is the “full” log, which shows some success with b11, until it doesn’t. I’ve filtered it down to
custom_components.mail_and_packagesmessages, but stripped out thecustom_components.mail_and_packages.cameramessages, as they seemed to just add noise.home-assistant.log
Please try this file:
https://github.com/firstof9/Home-Assistant-Mail-And-Packages/raw/refs/heads/fix-1052/custom_components/mail_and_packages/helpers.py
Drop it into
/config/custom_components/mail_and_packages/and overwrite the old one and give it a try after restarting Home Assistant, and let me know if that resolves your issue please?Thanks.