Closed LongTengDao closed 2 years ago
Does this make any difference?
For example, different policy for early data before tls handshake is done?
I try to read the source, the only difference I can find, is that the options.onConnect
callback won't wait secure
event emit in needsUpgrade
mode.
This option was added because of ZoneMTA. ZoneMTA does not process SMTP connections normally but actually runs a wrapper around it. ZoneMTA listens for the sockets to be opened and then, if a worker process would be available, would pass that socket to the worker process. ZoneMTA would then call the SMTPServer.connect method directly so that the normal connection handler is bypassed and upgrading TLS would have to be handled separately. https://github.com/zone-eu/zone-mta/blob/b483b3162455ddf5085e43397ca1777b58063700/services/receiver.js#L137
Thank a lot!
If
needsUpgrade
is true andsecure
is also true, then SMTPServer runs TLS handshake after the TCP connection has been established and the connection object has been initiated. Otherwise, the TLS handshake is run before everything else.