Closed railty closed 4 weeks ago
Is there a reason you need CRAM-MD5? Instead if just relying on TLS?
No plans to support CRAM protocols. These are horrible and outdated protocols. Even using it usually raises suspicions that the person is trying something shady 🤔
Thanks for the explanition, I am pretty new to these and didn't realize that CRAM is outdated.
btw, there seems quite a bit of code in smtp-server/sasl.js support CRAM-MD5, but since you said it is outdated, I didn't bother too much
I am using a pretty standard nodemailer
const nodemailerCramMd5 = require('nodemailer-cram-md5'); let transporter = nodemailer.createTransport({ host: '127.0.0.1', port: 587, secure: false, // Port 587 does not use SSL, set to false auth: { type: 'custom', method: 'CRAM-MD5', user: 'alice@abc.com', pass: 'your-email-password' }, tls: { ciphers: 'SSLv3', rejectUnauthorized: false }, customAuth: { 'CRAM-MD5': nodemailerCramMd5 } });
and get the error:
response: '504 Error: Unrecognized authentication type', responseCode: 504, command: 'AUTH CRAM-MD5'
I managed to trace to the node_modules/smtp-server/smtp-connection.js, and found _server.options.authMethods have only LOGIN and PLAIN auth type.
Do I need another plugin to support CRAM-MD5, or if I need write one, where can I start?