1) To disable the version information from displaying, edit the sendmail.cf file. Make a backup copy of the file.
# vi /etc/mail/sendmail.cf
look for the line " GreetingMessage"remove the " Sendmail $v/$Z " after $j. After editing the line looks like below.
O SmtpGreetingMessage=$j $b
Restart the service
2) To disable the VRFY and EXPN ,look for "PrivacyOptions" line in the /etc/mail/sendmail.cf file. Edit the PrivacyOptions line and append "novrfy,noexpn" to the line as below. Make sure you made a backup copy of the file before editing.
# privacy flags
O PrivacyOptions=authwarnings,novrfy,noexpn
O PrivacyOptions=authwarnings,novrfy,noexpn
Restart the service
3) To disable the help, go to /etc/mail/ , move the helpfile to helpfile.old and touch an empty helpfile
#pwd
/etc/mail
# mv helpfile helpfile.old
# touch helpfile
Restart the service
# /etc/init.d/sendmail restart
or
# svcadm refresh sendmailAfter editing the configuration file telnet to port 25 will give the result as below
------------------------------------------------------------------------------
# telnet myhost 25
220 myhost ESMTP Mon, 8 Mar 2010 09:15:21 +0300 (AST)
help
214 2.0.0 End of HELP info
vrfy
252 2.5.2 Cannot VRFY user; try RCPT to attempt delivery (or try finger)
expn
502 5.7.0 Sorry, we do not allow this operation
quit
221 2.0.0 myhost closing connection
Connection to host lost.
----------------------------------------------------------------------
Keep posting such kind of information on your blog. I bookmarked it for continuous visit.
ReplyDelete