Hack to protect sendmail advertising its version

Here is a very useful HACK to protect your sendmail server from potential hackers.
You should be knowing that anyone can get your sendmail identity (that means the server name / version) by just simply doing a telnet to your machine. As shown:

Sendmail showing its identity to world

Now this can be a very useful information for any dedicated hacker or any intruder.
We wish to HIDE this information from outside world !!
Here is a very simple but very useful TWEAK / hack that can be used to hide this information.
Just open the /etc/mail/sendmail.cf file and change the value of the SmtpGreetingMessage field.
Here I had commented the original line (above the highlighted line for your reference, which is a good practice also) and copied and edited the code, as shown:

Changing sendmail identity.

REMEMBER – do not use the m4 macro command after editing the /etc/mail/sendmail.cf file. So it should be your last step after configuring sendmail.
Just restart the sendmail service.
service sendmail restart
Now if you do the telnet again to check what sendmail is advertising, you will be more than happy, as shown:

Sendmail Identity Hidden from Outside world

Happy !!
Enjoy your Edge !!
God Bless.
Advertisements