Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Sending Mail via SSL #195

Closed
Lukeva opened this issue May 15, 2021 · 4 comments
Closed

Problem Sending Mail via SSL #195

Lukeva opened this issue May 15, 2021 · 4 comments

Comments

@Lukeva
Copy link

Lukeva commented May 15, 2021

Expected Behavior

Password reset mails get send.

Actual Behavior

Error "Error sending email: { [Error: 140439642179392:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:"

Possible Solution

Unfortunately I have no Idea. I have tried using my Mail Server with Hetzner mail.your-server.de as well as Google SMTP Relay smtp-relay.gmail.com both give the same error when trying to send password reset mails. I am thankful for any Ideas!

Specifications

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Node version: 10.24
  • Database engine (e.g., SQLite): SQLite
@rds13
Copy link
Contributor

rds13 commented May 16, 2021

Can you share your configuration file with password removed so it can be look at ?

@Lukeva
Copy link
Author

Lukeva commented May 16, 2021

Sure! Here is the complete file - I tried all possibilities with "secure" and "require tls" option, but didn´t get lucky so far. Perhaps I am missing something very basic since I am also having trouble with video files converting ... see #196

"team_name": "Spacedeck netzwerk n",
"contact_email": "[email protected]",

"host": "::",
"port": 9666,
"endpoint": "https://deck.netzwerk-n.org",
"invite_code": "XXX",

"storage_dialect": "sqlite",

"storage_host": "localhost",
"storage_database": "spacedeck",
"storage_username": "username",
"storage_password": "password",

"storage_local_path": "./storage",
"storage_local_db": "./database.sqlite",
"storage_bucket": "spacedeck",
"storage_cdn": "/storage",
"storage_endpoint": "https://deck.netzwerk-n.org",

"mongodb_host": "localhost",
"redis_mock": true,
"redis_host": "localhost",

"export_api_secret": "XXX",

"mail_provider": "smtp",
"mail_smtp_host": "mail.your-server.de",
"mail_smtp_port": 587,
"mail_smtp_secure": true,
"mail_smtp_require_tls": false,
"mail_smtp_user": "[email protected]",
"mail_smtp_pass": "XXX",

@rds13
Copy link
Contributor

rds13 commented May 24, 2021

This looks like issue #38 where server port was not configured to handle tls. Can you check that the smtp host handle tls on port 587 ?
You can use this command for example :

     openssl s_client -connect mail.your-server.de:587

Besides nodemailer documentation configuration show that mail_smtp_secure flag should be false for ports other than 465 (See https://nodemailer.com/smtp/).

@Lukeva
Copy link
Author

Lukeva commented May 24, 2021

@rds13 Thank you so much for your help! I did mix up SSL and TLS Ports. Checking with the command you suggested, I found out that my Mailserver (as well as the G-Mail SMTP-Relay) don´t support TLS on Port 587 but do on Port 465. However when trying around before I also forgot to rebuild the docker image, and thus didn´t see any changes. I got it working now. Thank you very much!

@Lukeva Lukeva closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants