-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: write ECONNRESET when listening to validateSender #113
Comments
I get the following error when using
|
I also can confirm this behavior by using If the validation is activated the SMTPConnection.prototype._onCommand ( .\node_modules\smtp-server\lib\smtp-connection.js ) function is called with an empty command. The order of the commands the function is called is the following:
Seems that SMTPConnection.prototype._onCommand is called twice and the second time without a command what causes the error. Here the communication log between the Client and the Server:
SMTPConnection.prototype._onCommand is called with "EHLO"
SMTPConnection.prototype._onCommand is called with "MAIL" and will be accepted
After that and before the SMTPConnection.prototype._onCommand is called with "RCPT" the SMTPConnection.prototype._onCommand is called with an empty command.
|
The issue is that the As the event is handeled by the So my solution is to remove / comment out the line 460 in As I didn’t find any other case, where this event should be called twice, this seems to be the working solution for me. |
mailin.on('validateSender',function (connection, email, next) {
next(null);
});
mailin.on('message', mailModule.emailRecieved);
this causes :
error: Error: write ECONNRESET
at exports._errnoException (util.js:1022:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:804:14)
Error: Uncaught, unspecified "error" event. ([object Object])
at Mailin.emit (events.js:163:17)
at SMTPServer. (/home/bitnami/attacksServer/node_modules/mailin/lib/mailin.js:519:15)
at emitOne (events.js:96:13)
at SMTPServer.emit (events.js:188:7)
at SMTPServer._onError (/home/bitnami/attacksServer/node_modules/smtp-server/lib/smtp-server.js:237:10)
at emitOne (events.js:96:13)
at SMTPConnection.emit (events.js:188:7)
at SMTPConnection._onError (/home/bitnami/attacksServer/node_modules/smtp-server/lib/smtp-connection.js:274:10)
at emitOne (events.js:101:20)
at TLSSocket.emit (events.js:188:7)
at onwriteError (_stream_writable.js:346:10)
at onwrite (_stream_writable.js:364:5)
at WritableState.onwrite (_stream_writable.js:90:5)
at fireErrorCallbacks (net.js:471:13)
at TLSSocket.Socket._destroy (net.js:512:3)
at WriteWrap.afterWrite [as oncomplete] (net.js:806:10)
The text was updated successfully, but these errors were encountered: