SMTP fails with SSL on self-hosted instance

Hi everyone,
i hope anyone has any idea how to solve this. Actually quite straight forward, but no.

Describe the problem/error/question

I try to send emails via SMTP on Proton. How to set up SMTP to use business applications or devices with Proton Mail | Proton
SMTP host: smtp.protonmail.ch
Port: 587
Authentication method: PLAIN
Encryption: STARTTLS

What is the error message (if any)?

00E8C38FAF7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:

Please share your workflow

None, simply try to invite a user via mail

Information on your n8n setup

  • n8n version: 1.81.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted via npm
  • Operating system: Ubuntu

N8N_SMTP_PASS=SECRET N8N_SMTP_PORT=587 N8N_SMTP_SSL=true
N8N_SMTP_HOST=smtp.protonmail.ch N8N_PROTOCOL=https N8N_SSL_CERT=/home/ht/cert.pem
N8N_SSL_KEY=/home/ht/key.pem N8N_EMAIL_MODE=smtp [email protected]

Solution is: export N8N_SMTP_SSL=false
This is so strange - but you need to disable SSL

2 Likes

The issue is that SSL being enabled by default does not enable STARTTLS. Maybe We could detect the TLS failure and automatically switch to STARTTLS, but I don’t know if that might cause any backward compatibility issues.

Plus, personally I’d prefer if more people move away from STARTTLS (if they can). Many STARTTLS implementations are unmaintained, and could be vulnerable.
Stuff like this is still true even over a decade later.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.