rallly icon indicating copy to clipboard operation
rallly copied to clipboard

Error sending email - wrong version number with protonmail SMTP

Open Nachtschwingeswildhunt opened this issue 1 year ago • 1 comments

Describe the bug Using the I am experiencing the the self-hosted version via docker, I get the same error as @VincenzoKoestler in this issue . I am trying to use the SMTP services from protonmail (they work with other services) which run on port 587 and use TLS. Is there something I can do here?

2023-12-15 20:22:02
 Prisma schema loaded from prisma/schema.prisma
2023-12-15 20:22:02
 Datasource "db": PostgreSQL database "db", schema "public" at "rallly_db:5432"
2023-12-15 20:22:02
 
2023-12-15 20:22:02
 42 migrations found in prisma/migrations
2023-12-15 20:22:02
 
2023-12-15 20:22:02
 
2023-12-15 20:22:02
 No pending migrations to apply.
2023-12-15 20:22:03
    ▲ Next.js 14.0.1
2023-12-15 20:22:03
    - Local:        http://rallly:3000
2023-12-15 20:22:03
    - Network:      http://100.0.0.244:3000
2023-12-15 20:22:03
 
2023-12-15 20:22:03
  ✓ Ready in 144ms
2023-12-15 20:22:09
 Error sending email [Error: C03753BF6F7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
2023-12-15 20:22:09
 ] {
2023-12-15 20:22:09
   library: 'SSL routines',
2023-12-15 20:22:09
   reason: 'wrong version number',
2023-12-15 20:22:09
   code: 'ESOCKET',
2023-12-15 20:22:09
   command: 'CONN'
2023-12-15 20:22:09
 }

To Reproduce Steps to reproduce the behavior:

  1. Run the self-hosted version via docker
  2. Fill out the SMTP env variables as dictated by protonmail

Expected behavior Rallly instance sending out mails

Desktop (please complete the following information):

  • NUC server running Ubuntu 22.04
  • Docker

Nachtschwingeswildhunt avatar Dec 21 '23 16:12 Nachtschwingeswildhunt

I'm also running into this issue. My SMTP credentials work in other apps, but do not with the docker self-hosted version of rallly.

Perhaps, some examples of the SMTP entries in config.env could be helpful. For example, I don't know if the double quotes surrounding the values are necessary or not... I've tried both ways to no avail.

My logs show the following when trying to register a new user:

Error sending email [Error: 000838D1E47F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
] {
  library: 'SSL routines',
  reason: 'wrong version number',
  code: 'ESOCKET',
  command: 'CONN'
}

thejohnha avatar Jan 15 '24 20:01 thejohnha

It is strange in a way, but I could fix this for protonmail by setting SMTP_SECURE to false. (source: https://stackoverflow.com/questions/66317125/node-js-nodemailer-error-wrong-version-number-invalid-greeting )

kokx avatar Feb 09 '24 16:02 kokx

Perhaps, some examples of the SMTP entries in config.env could be helpful. For example, I don't know if the double quotes surrounding the values are necessary or not... I've tried both ways to no avail.

@thejohnha This may or may not be helpful for the above but, I'm using a Proton business plan with a custom domain and these are my settings from the config.env file:

[email protected]
[email protected]
SMTP_HOST=smtp.protonmail.ch
SMTP_PORT=587
SMTP_SECURE=false
[email protected]
SMTP_PWD=1234567890ABCDEF
SMTP_TLS_ENABLED=true

rlew-is avatar Feb 13 '24 14:02 rlew-is

Thank you! This made me get it working!

Nachtschwingeswildhunt avatar Feb 22 '24 09:02 Nachtschwingeswildhunt