mscdex/node-imap — pull request #363 by ruiaraujo (2014-03-18 23:10:07+00:00)
Title: Fix the need for rejectUnauthorized being false.

The tlsOptions object should include a host for certificate verification.

The documentation available at :http://nodejs.org/api/tls.html#tls_tls_connect_port_host_options_callback is a bit confusing but the tls.js file from Node.js clearly uses the hostname from the options object to do its certificate validation.

A workaround for the current version of the library would be to add, for example, host: 'imap.google.com' to the tlsOptions object.