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

e-mail out STARTTLS issue "SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795" #776

Closed
ghost opened this issue Dec 31, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 31, 2015

I am getting this error while trying to send email out of NR to postfix.

I believe this has something to do with NR or nodmailer not correctly using STARTTLS on 587(for me anyway) I can use gmail with the NR and send emails from terminal in the box NR is running on.

http://stackoverflow.com/a/22468122

secureConnection - use SSL (default is false, not needed with service). If you're using port 587 then keep secureConnection false, since the connection is started in insecure plain text mode and only later upgraded with STARTTLS

I am guessing here.
from


var smtpTransport = nodemailer.createTransport({
            host: node.outserver,
            port: node.outport,
            secure: true,
            auth: {
                user: node.userid,
                pass: node.password
            }
        });

I edited /usr/lib/node_modules/node-red/node_modules/node-red-node-email/61-email.js

and inserted
secureConnection: false, // added this
ignoreTLS: true, // added this

I am still receiving the same error
found here
https://github.com/nodemailer/nodemailer-smtp-transport/issues/21


var smtpTransport = nodemailer.createTransport({
            host: node.outserver,
            port: node.outport,
            secureConnection: false,          // added this
            ignoreTLS: true,                        // added this
            secure: true,
            auth: {
                user: node.userid,
                pass: node.password
            }
        });

Still not working. I am at a loss as to how to use STARTTLS

Thank you for any help.

Happy new year

@ghost ghost closed this as completed Dec 31, 2015
@ghost ghost reopened this Dec 31, 2015
@ghost ghost closed this as completed Jan 1, 2016
@ghost ghost reopened this Jan 1, 2016
@ghost
Copy link
Author

ghost commented Jan 1, 2016

I am opening this back up.

I cannot for the life of me figure this out.

is /usr/lib/node_modules/node-red/node_modules/node-red-node-email/61-email.js being used here?

It does not seem to be using this file to create the transport for nodemailer. Do I have to reload it somehow?

I have been working through nodemailer docs and added

tls: { rejectUnauthorized: false }

I then just deleted the whole variable to see if I could get a different error message. No change. leads me to believe this file is not being used or needs to be reloaded somehow. Forgive my ignorance as I am new to nodes inner workings.

I lightened up security in postfix
smtpd_tls_auth_only = no

I guess I will use gmail. These kinds of things eat at me so if anyone could explain what is happening I will sleep better.

I guess I will go smash my head against node-gyp for a while trying to install the node-red-xmpp-node :(

@dceejay
Copy link
Member

dceejay commented Mar 11, 2016

yes that is the file it uses. It get loaded when Node-RED starts so you have to stop it fully and restart. What platform are you on ? - if a Pi then use node-red-stop to stop it.
feel free to add some console.log("ping"); lines around line 60 of that file to check it gets called.

and xmpp shouldn't be too bad as long as you have npm 2.x installed.

@ghost
Copy link
Author

ghost commented Mar 11, 2016

Ubuntu. Thank you for the confirmation. I had success sending messages out with xmpp.

@ghost ghost closed this as completed Mar 11, 2016
@clickworkorange
Copy link

clickworkorange commented Aug 19, 2017

Here's what I did:

        var secureSmtp = node.outserver != "localhost";
        var smtpTransport = nodemailer.createTransport({
            host: node.outserver,
            port: node.outport,
            secure: secureSmtp,
            auth: secureSmtp ? {user: node.userid, pass: node.password} : secureSmtp,
            tls: { rejectUnauthorized: secureSmtp }
        });

This issue was closed.
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