Hostname/IP 与证书的别名不匹配 [Meteor JS 电子邮件]
Hostname/IP doesn't match certificate's altnames [Meteor JS Email]
Using Meteor 1.5 with email
package installed.
我已经尝试了 smtps
和 smtps
,两者都不适合我。关于我为什么会遇到此错误的任何建议?
错误日志:
I20170719-19:56:59.430(5.5)? Exception while invoking method 'forgotPassword' Error: Hostname/IP doesn't match certificate's altnames: "Host: mail.xyz.com. is not in the cert's altnames: DNS:something.something.in, DNS:www.something.something.in"
I20170719-19:56:59.432(5.5)? at Object.Future.wait (C:\Users\a\AppData\Local\.meteor\packages\meteor-tool.5.0\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:449:15)
I20170719-19:56:59.435(5.5)? at Mail._syncSendMail (packages\meteor.js:213:24)
I20170719-19:56:59.437(5.5)? at smtpSend (packages\email.js:110:13)
I20170719-19:56:59.443(5.5)? at Object.Email.send (packages\email.js:168:5)
I20170719-19:56:59.447(5.5)? at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
I20170719-19:56:59.451(5.5)? at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
I20170719-19:56:59.461(5.5)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1737:12)
I20170719-19:56:59.466(5.5)? at packages/ddp-server/livedata_server.js:719:19
I20170719-19:56:59.468(5.5)? at [object Object]._.extend.withValue (packages\meteor.js:1122:17)
I20170719-19:56:59.476(5.5)? at packages/ddp-server/livedata_server.js:717:40
I20170719-19:56:59.478(5.5)? - - - - -
I20170719-19:56:59.480(5.5)? at Object.checkServerIdentity (tls.js:205:17)
I20170719-19:56:59.481(5.5)? at TLSSocket.<anonymous> (_tls_wrap.js:1071:29)
I20170719-19:56:59.484(5.5)? at emitNone (events.js:67:13)
I20170719-19:56:59.486(5.5)? at TLSSocket.emit (events.js:166:7)
I20170719-19:56:59.487(5.5)? at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:623:8)
I20170719-19:56:59.494(5.5)? at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:453:38)
我的 SMTP 设置如下;
smtp = {
username: 'info@xyz.com',
password: 'info@2017',
server: 'mail.xyz.com',
port: 465,
rejectUnauthorized : false
}
process.env.MAIL_URL = 'smtps://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
问题是使用较新版本的 Node(请参阅 link:Node.js Hostname/IP doesn't match certificate's altnames)正在测试域。
正确的 "fix" 是纠正服务器,一个(有点危险的)修复是告诉 Node 拒绝未经授权,您尝试这样做,但是源中的 smtp 对象被丢弃并且永远不会传递给 Meteor。
尝试添加以下内容:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
紧接着
process.env.MAIL_URL = 'smtps://' + ...
(注:此建议来源于:(Unable to verify leaf signature),但我测试过可以解决问题)。
Using Meteor 1.5 with
我已经尝试了 smtps
和 smtps
,两者都不适合我。关于我为什么会遇到此错误的任何建议?
错误日志:
I20170719-19:56:59.430(5.5)? Exception while invoking method 'forgotPassword' Error: Hostname/IP doesn't match certificate's altnames: "Host: mail.xyz.com. is not in the cert's altnames: DNS:something.something.in, DNS:www.something.something.in"
I20170719-19:56:59.432(5.5)? at Object.Future.wait (C:\Users\a\AppData\Local\.meteor\packages\meteor-tool.5.0\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:449:15)
I20170719-19:56:59.435(5.5)? at Mail._syncSendMail (packages\meteor.js:213:24)
I20170719-19:56:59.437(5.5)? at smtpSend (packages\email.js:110:13)
I20170719-19:56:59.443(5.5)? at Object.Email.send (packages\email.js:168:5)
I20170719-19:56:59.447(5.5)? at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
I20170719-19:56:59.451(5.5)? at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
I20170719-19:56:59.461(5.5)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1737:12)
I20170719-19:56:59.466(5.5)? at packages/ddp-server/livedata_server.js:719:19
I20170719-19:56:59.468(5.5)? at [object Object]._.extend.withValue (packages\meteor.js:1122:17)
I20170719-19:56:59.476(5.5)? at packages/ddp-server/livedata_server.js:717:40
I20170719-19:56:59.478(5.5)? - - - - -
I20170719-19:56:59.480(5.5)? at Object.checkServerIdentity (tls.js:205:17)
I20170719-19:56:59.481(5.5)? at TLSSocket.<anonymous> (_tls_wrap.js:1071:29)
I20170719-19:56:59.484(5.5)? at emitNone (events.js:67:13)
I20170719-19:56:59.486(5.5)? at TLSSocket.emit (events.js:166:7)
I20170719-19:56:59.487(5.5)? at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:623:8)
I20170719-19:56:59.494(5.5)? at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:453:38)
我的 SMTP 设置如下;
smtp = {
username: 'info@xyz.com',
password: 'info@2017',
server: 'mail.xyz.com',
port: 465,
rejectUnauthorized : false
}
process.env.MAIL_URL = 'smtps://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
问题是使用较新版本的 Node(请参阅 link:Node.js Hostname/IP doesn't match certificate's altnames)正在测试域。
正确的 "fix" 是纠正服务器,一个(有点危险的)修复是告诉 Node 拒绝未经授权,您尝试这样做,但是源中的 smtp 对象被丢弃并且永远不会传递给 Meteor。
尝试添加以下内容:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
紧接着
process.env.MAIL_URL = 'smtps://' + ...
(注:此建议来源于:(Unable to verify leaf signature),但我测试过可以解决问题)。