Sunday, September 28, 2008

Sendmail | Banner change | Disabling VRFY | EXPN

Here is a quick howto on changing the Sendmail banner (usually to obscure information) and disabling VRFY and EXPN

To change Sendmail's baner just edit /etc/mail/, make sure to backup before editing it, then look for "SmtpGreetingMessage" and edit the line after "$j" then restart Sendmail, the line below is the default entry in

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

First a brief description of VRFY and EXPN before e disable it
  • VRFY permits someone to telnet to your server and verify that an email address is valid. Its purpose is to permit a remote server to check whether a particular email address is valid before sending email.
  • EXPN permits someone to telnet to your server and expand an alias into the list of actual email recipients. For example, if you have an email list called "greyhound-adoption", anyone could "expn greyhound-adoption" and get the list of all the member addresses in "greyhound-adoption".
I have been asked by security people to disable VRFY and EXPN on my servers running Sendmail, anyway to do this just look for "PrivacyOptions" line in your /etc/mail/, make sure to backup the file first before editing it, then add "novrfy,noexpn" to the line like the sample below, then restart your Sendmail.
# privacy flags
O PrivacyOptions=authwarnings,novrfy,noexpn

Just incase your new to command line, to backup a file just do the command below
$ cp fileyouwanttobackup filenameofbackupfile.datehere

To restart Sendmail, on most Unix and Linux use the following command
$ /etc/init.d/sendmail restart

On Solaris 10, you will need to use svcadm refresh Sendmail service to have sendmail reread teh configuration file.

Computer and Network problem | Windows | How to below:
Network Security System | IDS | IPS | Howto on Linux

No comments:

For suggestion and concerns E-mail