smtp-server icon indicating copy to clipboard operation
smtp-server copied to clipboard

Add `resolver` option similar to mailauth resolver option

Open titanism opened this issue 2 years ago • 1 comments

Right now it's not possible to pass a custom resolver function to resolve hostname lookup.

https://github.com/nodemailer/smtp-server/blob/2bd0975292208f1cf77d7a93cb3d8b3c4d48acb8/lib/smtp-connection.js#L214

The package mailauth supports a resolver option, and it would be helpful to have this across the entire smtp-server stack for DNS queries.

Thanks!

titanism avatar May 20 '22 16:05 titanism

Also, you may want to catch the error code instead for dns.reverse errors thrown, e.g. https://github.com/omrilotan/reverse-dns-lookup/blob/main/index.js#L40.

titanism avatar May 20 '22 16:05 titanism