Reputation: 220
I would connect nodemailer to Aruba Webmail. I've tried this
var smtpTransport = nodemailer.createTransport({
host: "smtps.aruba.it",
logger: true,
secure: true,
port: 465,
auth: {
user: "****",
pass: "****"
},
tls: {
rejectUnauthorized: false,
minVersion: 'TLSv1'
}
})
but return this error
[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'
}
I've also tried without the minVersion, but it return the same error, only the function field change in ssl_choose_client_version
and the reason field in unsupported protocol
.
How can i resolve this issue?
Update:
I changed my code with this
var smtpTransport = nodemailer.createTransport({
host: "smtp.mydomain.it",
logger: true,
secure: false,
port: 587,
auth: {
user: "******",
pass: "******"
},
tls: {
minVersion: 'TLSv1.2',
rejectUnauthorized: false
}
})
Now, thanks to this change, nodemailer can establish a connection, but the error doesn't disappear.
This is the log
[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
Upvotes: 3
Views: 1834
Reputation: 220
I've solved changing my code to this.
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'
}
})
Upvotes: 13