pentesting, updated
SMTP service checks
Check an SMTP service for open relay, user enumeration and version disclosure.
Goal
Determine whether the mail server can be abused to relay mail for unauthorized domains, or to enumerate valid usernames.
How to test
nmap --script smtp-open-relay,smtp-commands,smtp-enum-users -p25 10.10.10.5
nc 10.10.10.5 25
> VRFY root # user enumeration via VRFY
> MAIL FROM:<test@external.com>
> RCPT TO:<test@another-external.com> # open relay test — never actually send through a real target
What to look for
An open relay (accepts RCPT TO for a domain the server does not host), VRFY/EXPN returning different responses for valid vs invalid users, or a version banner matching a known CVE.
Notes
Never actually complete an open-relay test by sending real mail through someone else’s infrastructure — confirm the relay accepts the message up to the DATA stage and stop there, or get explicit sign-off first.