ha-email-sensor
ha-email-sensor copied to clipboard
Self signed certificates are not accepted
When I try to connect to my MS Exchange with self signed certificate it fails with
email: Error on device update!
[...]
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:997)
Config:
- platform: email
email: alex@<beep>.net
password: <beep>
imap_server: mail.<beep>.net
imap_port: 993
folder: ebay
days_old: 5
ssl: true
I tried without SSL, but then it seems TLS is epected. Is there an option to ignore a self signed certificate?
Have you tried imap_port: 587 ?
It's my own mailserver and running a self signed certificate as I use IMAP only internally. I did not enable port 587.
I took the opportunity to reconfigure the acme script to install the letsencrypt certificate also for the internal IMAP service, which fixed the symptom but not the issue. For me it's resolved but you may want to consider a setting to allow untrusted certs in future?