nodemailer / smtp-server

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

useProxy option is broken #118

Closed rhclayto closed 5 years ago

rhclayto commented 5 years ago

It looks like there has been a regression in the smtp-server library. Support for useProxy was added in this commit: https://github.com/nodemailer/smtp-server/commit/1a5754e3acc88099849baecc7435a35d0850e455 of smtp-server. However, current code of smtp-server no longer has the code that deals with the useProxy option, so as of now useProxy seems to be ignored,

This means that if, for instance, one is trying to use the zone-mta MTA, which uses smtp-server, with useProxy set as an option, & with haproxy set to use PROXY protocol, the proxied connection will always close with a '421 You talk too soon' error, since haproxy is sending it PROXY information before the server HELO, & smtp-server isn't handling this.

andris9 commented 5 years ago

Could you try the latest version of zone-mta published today? Do you still get the Talk too soon error?

rhclayto commented 5 years ago

The update to zone-mta makes PROXY protocol & the useProxy option work correctly! Thanks for the quick fix.