Question & Answer
How do I turn off VRFY/EXPN in sendmail.
VRFY and EXPN
The vrfy command allows a user to connect to your Sendmail server and ask to verify that an address is valid. Using this command a user can verify if an account is valid.
The expn command allows someone to telnet to your Sendmail server and give the server an alias. The expn command expands the alias into the list of actual recipients
To Disable EXPN and VRFY do the following:
Search for the line that reads:
To disable expn and vrfy, change the line to read the following:
O PrivacyOptions=noexpn novrfy
Or, to set all of sendmail's privacy options to their most private settings:
save the file, and refresh the sendmail daemon.
#refresh -s sendmail
17 June 2018