self-signed certificate error when attempting to send an email #1751

Closed
opened 2026-04-05 19:40:47 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Nightreaper77 on 3/2/2025

When attempting to send an email after configuring SMTP, I am getting the following error:

2025-02-22T22:27:34.217Z [error]: self-signed certificate
Stack: Error: self-signed certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1677:34)
    at TLSSocket.emit (node:events:518:28)
    at TLSSocket._finishInit (node:_tls_wrap:1076:8)
    at ssl.onhandshakedone (node:_tls_wrap:862:12)
    at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {"code":"ESOCKET","command":"CONN"}

I'm using ProtonMail Bridge as my SMTP server (unofficial docker container here: shenxn/protonmail-bridge-docker)

Relatively confident that the SMTP server is setup correctly, as I'm using the same configuration for other services like Nextcloud and they are working fine.

Here's my smtp configuration from config/config.yml:

email:
    smtp_host: "ip_address"
    smtp_port: 1025
    smtp_user: "username"
    smtp_pass: "password"
    no_reply: "email(same as username)"
    smtp_secure: false

ProtonMail Bridge is meant to use STARTTLS, which is normally configured as insecure, but I did try smtp_secure as well and got a TLS version mismatch (as expected).

Since it's a self-signed cert error, I imagine a config option could be added to ignore certificate warnings, but not sure.

*Originally created by @Nightreaper77 on 3/2/2025* When attempting to send an email after configuring SMTP, I am getting the following error: ``` 2025-02-22T22:27:34.217Z [error]: self-signed certificate Stack: Error: self-signed certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1677:34) at TLSSocket.emit (node:events:518:28) at TLSSocket._finishInit (node:_tls_wrap:1076:8) at ssl.onhandshakedone (node:_tls_wrap:862:12) at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {"code":"ESOCKET","command":"CONN"} ``` I'm using ProtonMail Bridge as my SMTP server (unofficial docker container here: shenxn/protonmail-bridge-docker) Relatively confident that the SMTP server is setup correctly, as I'm using the same configuration for other services like Nextcloud and they are working fine. Here's my smtp configuration from config/config.yml: ``` email: smtp_host: "ip_address" smtp_port: 1025 smtp_user: "username" smtp_pass: "password" no_reply: "email(same as username)" smtp_secure: false ``` ProtonMail Bridge is meant to use STARTTLS, which is normally configured as insecure, but I did try smtp_secure as well and got a TLS version mismatch (as expected). Since it's a self-signed cert error, I imagine a config option could be added to ignore certificate warnings, but not sure.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1751