Nodemailer 不适用于 Aruba Webmail
Nodemailer does not work with Aruba Webmail
我会将 nodemailer 连接到 Aruba Webmail。我试过这个
var smtpTransport = nodemailer.createTransport({
host: "smtps.aruba.it",
logger: true,
secure: true,
port: 465,
auth: {
user: "****",
pass: "****"
},
tls: {
rejectUnauthorized: false,
minVersion: 'TLSv1'
}
})
但是return这个错误
[2020-03-11 17:15:33] DEBUG Sending mail using SMTP/6.4.4[client:6.4.4]
[2020-03-11 17:15:33] DEBUG [aYJ1bl26Zc] Resolved smtps.aruba.it as 62.149.128.218 [cache miss]
[2020-03-11 17:15:33] ERROR [aYJ1bl26Zc] 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
[2020-03-11 17:15:33] ERROR [aYJ1bl26Zc]
[2020-03-11 17:15:33] DEBUG [aYJ1bl26Zc] Closing connection to the server using "destroy"
[2020-03-11 17:15:33] ERROR Send Error: 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
[2020-03-11 17:15:33] ERROR
[Error: 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
] {
library: 'SSL routines',
function: 'tls_process_ske_dhe',
reason: 'dh key too small',
code: 'ESOCKET',
command: 'CONN'
}
我也尝试过不使用 minVersion,但它 return 同样的错误,只有 ssl_choose_client_version
中的功能字段发生变化,unsupported protocol
中的原因字段发生变化。
我该如何解决这个问题?
更新:
我用这个
改变了我的代码
var smtpTransport = nodemailer.createTransport({
host: "smtp.mydomain.it",
logger: true,
secure: false,
port: 587,
auth: {
user: "******",
pass: "******"
},
tls: {
minVersion: 'TLSv1.2',
rejectUnauthorized: false
}
})
现在,由于此更改,nodemailer 可以建立连接,但错误并没有消失。
这是日志
[2020-03-13 17:35:41] DEBUG Sending mail using SMTP/6.4.4[client:6.4.4]
[2020-03-13 17:35:41] DEBUG [neeofoVybVs] Resolved smtp.mydomain.it as 62.149.128.200 [cache miss]
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection established to 62.149.128.200:587
[2020-03-13 17:35:41] ERROR [neeofoVybVs] 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
[2020-03-13 17:35:41] ERROR [neeofoVybVs]
[2020-03-13 17:35:41] DEBUG [neeofoVybVs] Closing connection to the server using "end"
[2020-03-13 17:35:41] ERROR Send Error: 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
[2020-03-13 17:35:41] ERROR
[Error: 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
] {
library: 'SSL routines',
function: 'ssl_choose_client_version',
reason: 'unsupported protocol',
code: 'ESOCKET',
command: 'CONN'
}
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection closed
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection closed
我已经解决了将我的代码更改为这个问题。
var smtpTransport = nodemailer.createTransport({
host: "smtps.aruba.it",
logger: true,
debug:true,
secure: true,
port:465,
auth: {
user: "*****",
pass: "*****"
},
tls:{
minVersion: 'TLSv1',
ciphers:'HIGH:MEDIUM:!aNULL:!eNULL:@STRENGTH:!DH:!kEDH'
}
})
我会将 nodemailer 连接到 Aruba Webmail。我试过这个
var smtpTransport = nodemailer.createTransport({
host: "smtps.aruba.it",
logger: true,
secure: true,
port: 465,
auth: {
user: "****",
pass: "****"
},
tls: {
rejectUnauthorized: false,
minVersion: 'TLSv1'
}
})
但是return这个错误
[2020-03-11 17:15:33] DEBUG Sending mail using SMTP/6.4.4[client:6.4.4]
[2020-03-11 17:15:33] DEBUG [aYJ1bl26Zc] Resolved smtps.aruba.it as 62.149.128.218 [cache miss]
[2020-03-11 17:15:33] ERROR [aYJ1bl26Zc] 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
[2020-03-11 17:15:33] ERROR [aYJ1bl26Zc]
[2020-03-11 17:15:33] DEBUG [aYJ1bl26Zc] Closing connection to the server using "destroy"
[2020-03-11 17:15:33] ERROR Send Error: 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
[2020-03-11 17:15:33] ERROR
[Error: 140671405623168:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../deps/openssl/openssl/ssl/statem/statem_clnt.c:2150:
] {
library: 'SSL routines',
function: 'tls_process_ske_dhe',
reason: 'dh key too small',
code: 'ESOCKET',
command: 'CONN'
}
我也尝试过不使用 minVersion,但它 return 同样的错误,只有 ssl_choose_client_version
中的功能字段发生变化,unsupported protocol
中的原因字段发生变化。
我该如何解决这个问题?
更新:
我用这个
var smtpTransport = nodemailer.createTransport({
host: "smtp.mydomain.it",
logger: true,
secure: false,
port: 587,
auth: {
user: "******",
pass: "******"
},
tls: {
minVersion: 'TLSv1.2',
rejectUnauthorized: false
}
})
现在,由于此更改,nodemailer 可以建立连接,但错误并没有消失。
这是日志
[2020-03-13 17:35:41] DEBUG Sending mail using SMTP/6.4.4[client:6.4.4]
[2020-03-13 17:35:41] DEBUG [neeofoVybVs] Resolved smtp.mydomain.it as 62.149.128.200 [cache miss]
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection established to 62.149.128.200:587
[2020-03-13 17:35:41] ERROR [neeofoVybVs] 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
[2020-03-13 17:35:41] ERROR [neeofoVybVs]
[2020-03-13 17:35:41] DEBUG [neeofoVybVs] Closing connection to the server using "end"
[2020-03-13 17:35:41] ERROR Send Error: 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
[2020-03-13 17:35:41] ERROR
[Error: 140658187040640:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929:
] {
library: 'SSL routines',
function: 'ssl_choose_client_version',
reason: 'unsupported protocol',
code: 'ESOCKET',
command: 'CONN'
}
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection closed
[2020-03-13 17:35:41] INFO [neeofoVybVs] Connection closed
我已经解决了将我的代码更改为这个问题。
var smtpTransport = nodemailer.createTransport({
host: "smtps.aruba.it",
logger: true,
debug:true,
secure: true,
port:465,
auth: {
user: "*****",
pass: "*****"
},
tls:{
minVersion: 'TLSv1',
ciphers:'HIGH:MEDIUM:!aNULL:!eNULL:@STRENGTH:!DH:!kEDH'
}
})