cosullivan / SmtpServer

A SMTP Server component written in C#
MIT License
675 stars 159 forks source link

Add option to hide SmtpServer version #187

Open bogdanst24 opened 1 year ago

bogdanst24 commented 1 year ago

When the connection is made, the server automatically responds with a 220 code followed by the Name and version. In a security audit, it was brought to our attention that this could constitute information leakage, consisting of a potential (very unlikely) security risk.

It is not a make-or-break change, but it would be helpful to either have the possibility of not showing it, or overwriting it. It would be very appreciated.

image

BrewingCoder commented 1 year ago

just fork the project and change line 179 of SmtpSession.cs and remove the "v{version} " from that line.

When new versions of SMTP are checked in just pull them down to your fork and make sure that line always stays the way you want it :)