Emails can not be sent in 1.6.0
-
After solving the problem with the install/uninstall-loop of plugins and the not working new topic button yesterday https://community.nodebb.org/topic/11303/after-upgrade-from-1-5-x-to-1-6-0-new-topic-does-not-work/18 I got a new problem today...
Emails can not be sent anymore. Till yesterday emails worked. Today I got errors when I want to send emails:
4/10 17:10:38 [28675] - error: Error: Hostname/IP doesn't match certificate's altnames: "Host: localhost. is not in the cert's altnames: DNS:*.internalcname.hoster.de, DNS:internalcname.hoster.de" at Object.checkServerIdentity (tls.js:221:17) at TLSSocket.<anonymous> (_tls_wrap.js:1104:29) at emitNone (events.js:105:13) at TLSSocket.emit (events.js:207:7) at TLSSocket._finishInit (_tls_wrap.js:628:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:458:38)
The DNS-Part in the error-message in not the configured url in the config.json of nodebb. It is the internal cname of the webspace.
I have seen that you are working on an Update 1.6.1 for next week and there is a bugfix planned regarding the smtp emailer https://github.com/NodeBB/NodeBB/issues/5951 Will this bugfix adress my issues too or do I have a different problem?
Thanks for any help!
-
No, that won't fix it. It looks like your configuration is trying to send emails via hoster.de, is that correct?
NodeBB is identifying itself as "localhost", which is incorrect. It should be your domain that you use to access it... is it not set right in
config.json
? -
@julian it doesn't matter. The error is the same with built the in email-service or with the new external email server. As external email server we use the custom option with credentials of our emailprovider. The config.json is correct. As
url
is our complete domain (with http://) specified and not localhost. And as you can see, we are not using https for nodebb. -
I restarted nodebb and run
./nodebb build
before I started again with./nodebb dev
. The initializing-message in the startup-log is correct und it shows the same defined url as in theconfig.json
and notlocalhost
. When I try to send a testmail or try to invite a new user, I get always the same error-message as shown in my initial post.Why does nodebb act as
localhost
when sending mails and why does it looks for certificates? -
Right now the custom option is broken. So hopefully that's the only issue, and the fix will work for you. Fix should be released within the next week.
-
I have issues with gmail sends too. I don't see any errors... just nothing happens.
-
@julian I don't even see any hint that there is an attempt to contact gmail. And I already did the work to make sure gmail worked. I've had it working consistently since 1.3.x. It broke on the 1.5.x -> 1.6.0 upgrade.
It's like the mail queue isn't even processed. Is there some way I can debug it?
-
Turns out mail fails when I run nodebb using ./nodebb start but not as a service. I'm not sure why...
-
@christoffer-lernö That... is really weird! Do let us know if you figure out the underlying cause ...
-
Hi @PitaJ, I did the Upgrade to 1.6.1 and after a few hickups nodebb can send mails again, but only with the internal mailserver. The external option is still broken. Sending Mails via the internal mailserver is quite slow.
Here is the Error-Message, which I get when I try the externl mailserver option:
io: 2 on [ { type: 2, nsp: '/', id: 14, data: [ 'admin.email.test', { template: 'welcome' } ] } ] 12/10 12:38:27 [18738] - error: Error: 140483857790752:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:797:
-
@suparomana you need to make sure you have the correct port and security option set. What are you current settings? (Redact anything sensitive)
-
Thank you @PitaJ and @julian for your support! Everything works fine now.
The error was because of a wrong security option in the settings and the speed of sendmail increased by itself. Probably there was a problem on the shared server during my first test.
Keep up the great work! NodeBB is really great!