Cheatsheet de IMAP y POP3
Madurezreviewed
Última revisión
Publicado
Última actualización
Sintaxis de recuperación rápida. Las condiciones están en el workflow y las diferencias de herramientas en automatización.
| Pregunta | Comando | Señal |
|---|---|---|
| Capacidades | nmap -sV -p 110,143,993,995 --script imap-capabilities,pop3-capabilities TARGET_IP |
capacidades por endpoint |
| IMAP STARTTLS | openssl s_client -connect FQDN:143 -starttls imap -servername FQDN -crlf -quiet |
handshake y diálogo |
| POP3 STARTTLS | openssl s_client -connect FQDN:110 -starttls pop3 -servername FQDN -crlf -quiet |
handshake y diálogo |
| IMAPS | openssl s_client -connect FQDN:993 -servername FQDN -crlf -quiet |
TLS implícito |
| POP3S | openssl s_client -connect FQDN:995 -servername FQDN -crlf -quiet |
TLS implícito |
| Buzones IMAP | curl --user USERNAME --url 'imaps://FQDN/' |
buzones visibles |
| Lista POP3 | curl --user USERNAME --url 'pop3s://FQDN/' |
identificadores y tamaños |
curl --silent --show-error \ --connect-timeout 5 --max-time 30 \ --user USERNAME \ --output evidence/imap-mailboxes.txt \ --url 'imaps://FQDN/'El código de salida distingue un listado vacío de un fallo del cliente. El perfil no prueba otros buzones ni permisos de recuperación. La automatización IMAP y POP3 explica la variante STARTTLS y el diagnóstico.
a1 CAPABILITYa2 LOGIN USERNAME PASSWORDa3 LIST "" "*"a4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)a5 LOGOUTCAPAUSER USERNAMEPASS PASSWORDSTATLISTQUITNo uses DELE, EXPUNGE ni clientes que borren o sincronicen por defecto durante una comprobación de lectura.