IMAP servers may support different capabilities. There is a command named Capability
that allows clients to list these supported mail server capabilities, and we can use Nmap to automate this task.
This recipe shows you how to list the capabilities of an IMAP server with Nmap.
Open your favorite terminal and enter the following nmap
command:
$ nmap -p143,993 --script imap-capabilities <target>
The results will be included under the script output section:
993/tcp openssl/imap Dovecot imapd
|_imap-capabilities: LOGIN-REFERRALS completed AUTH=PLAIN OK
Capability UNSELECT THREAD=REFERENCES AUTH=LOGINA0001IMAP4rev1
NAMESPACE SORT CHILDREN LITERAL+ IDLE SASL-IRMULTIAPPEND