CPSA ยท Unix user enumeration and mail/file services
Sendmail, EXPN, VRFY and relaying
Valid user discovery, open relays, historic Sendmail flaws and mitigation.
Key points
- VRFY confirms a mailbox and EXPN expands a mailing list, so both leak valid users unless disabled.
- An open relay forwards mail from anyone to anyone and is abused for spam.
- Old Sendmail releases had serious remote flaws, so keep the MTA patched, disable VRFY and EXPN, and restrict relaying to authenticated or local clients.
Source: https://www.rfc-editor.org/rfc/rfc5321.html
Practice questions
What does the SMTP EXPN command do?
- Expands a mailing list to its member addresses
- Expires an old mailbox
- Encrypts the current session
- Exports the mail queue to a file
Show answer
Answer: A. Expands a mailing list to its member addresses
EXPN asks the server to expand a mailing list or alias into its member addresses. VRFY, by contrast, checks one address.
Which measures reduce SMTP user discovery and relay abuse?
- Disable VRFY and EXPN
- Restrict relaying to local or authenticated clients
- Keep the mail server software patched
- Accept relay requests from any sender
- Publish the list of valid mailboxes
Show answer
Answer: A. Disable VRFY and EXPN, B. Restrict relaying to local or authenticated clients, C. Keep the mail server software patched
Disabling VRFY and EXPN stops easy user discovery, and limiting relay to local or authenticated clients stops open-relay abuse. Accepting all relayed mail or publishing the user list does the opposite.
RFC 5321 forbids an SMTP server from disabling VRFY or EXPN.
Show answer
Answer: False
False. The RFC says servers should support them but may disable them for security reasons, and a server that disables them is a normal, safer configuration.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
