4.5.4.1 /etc/mail/sendmail.cf - Hide sendmail version information

Information

The recommendation is to change both the default sendmail greeting and HELP output to not display the sendmail version.

Rationale:

The sendmail deamon has a history of security vulnerabilities. The recommendation is to change the default sendmail settings that display the sendmail version and other related information. Sendmail version information can be used by an attacker for fingerprinting purposes.

Solution

Create a backup copy of /etc/mail/sendmail.cf:

cp -p /etc/mail/sendmail.cf /etc/mail/sendmail.cf.pre_cis

Edit:

vi /etc/mail/sendmail.cf

Replace:

O SmtpGreetingMessage=$j Sendmail $b

With:

O SmtpGreetingMessage=mailerready

Ensure Sendmail helpfile exists

test -e /etc/mail/helpfile || touch /etc/mail/helpfile

Default Value:

SmtpGreetingMessage=$j Sendmail $b

Additional Information:

Reversion:

Copy back the original /etc/sendmail.cf file:

cp -p /etc/mail/sendmail.cf.pre_cis /etc/mail/sendmail.cf

See Also

https://workbench.cisecurity.org/benchmarks/13069

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-6(10)

Plugin: Unix

Control ID: 0978246ee4bbf437c4cfb6c59a2135eb1a834092011944ffe4112e9cacc465af