nodemailer / smtp-server

Create custom SMTP servers on the fly
Other
846 stars 145 forks source link

Access to challenge and challengeResponse (CRAM-MD5) #146

Closed 0xb4lint closed 3 years ago

0xb4lint commented 4 years ago

Currently the only way to validate a password with CRAM-MD5 method is thevalidatePassword() function.

From SMTP Server docs:

validatePassword is a function for validating CRAM-MD5 challenge responses. Takes the password of the user as an argument and returns true if the response matches the password

I've added challenge and challengeResponse variables to auth object. In this way you can write a custom validator (or send challenge data to a different server for) in the onAuth() handler.

0xb4lint commented 3 years ago

Hi @andris9, did you have a chance to take a look at this PR?

0xb4lint commented 3 years ago

Thank you @andris9!