En primer lugar, debe conocer los IP y los puertos del servidor. A menudo se incluyen descripciones de qué protocolo se hablan en qué puerto:
Googlemail - Gmail
Server: Authentication: Port:
SMTP Server smtp.gmail.com SSL 465
smtp.gmail.com StartTLS 587
IMAP Server imap.gmail.com SSL 993
Server List de ARCLAB.
Para comprobarlo usted mismo, puede usar openssl
:
openssl s_client -crlf -connect smtp.gmail.com:993
y la salida:
---
SSL handshake has read 3238 bytes and written 435 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : RC4-SHA
Session-ID: 92C91152E2BBD7BC1A40889A4B31BB343045275F823F658B5042752B5FFCD072
Session-ID-ctx:
Master-Key: DE4696E40209CB2358ECD9A57537BCBAAC8892E4B1E243C9218F102997741B780C987F4CF7CFEFE7F66919496AFF1D4A
Key-Arg : None
Start Time: 1403632088
Timeout : 300 (sec)
Verify return code: 20 (unable to get local issuer certificate)
---
* OK Gimap ready for requests from 87.17X.XXX.XX qbxmb6xx690wic
Las conexiones seguras entre MTP SMTP se realizan principalmente a través de TLS. TLS es, a diferencia de SSL, una característica adicional que se inicializa con el comando SMTP STARTTLS
.
Nunca sabrás si un servidor SMTP de Google está enviando a través de TLS a yahoo y viceversa, excepto que tienes acceso a la red entre ellos y puedes detectarlos. Pero al menos puedes verificar si los servidores entienden TLS. Entonces, si un servidor está configurado para TLS, se conectará a los servidores de yahoo o google a través de TLS.
host -t mx yahoo.com
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
openssl s_client -starttls smtp -connect mta5.am0.yahoodns.net:25 -showcerts
y lo mismo para google
host -t mx google.com
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
openssl s_client -starttls smtp -connect alt1.aspmx.l.google.com:25
Y la salida:
---
SSL handshake has read 3985 bytes and written 470 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : RC4-SHA
Session-ID: 5BD83CAF6233F40A7CE5161232DDDDEB89D548C2E35CD12904ED766A4725CA83
Session-ID-ctx:
Master-Key: CA3AB66161D5A6464D0CAE30E614CABE5B44EFAAE7CE41377A7C18607DBC010E12C0DE42095CABE76E569ED77359367D
Key-Arg : None
Start Time: 1403643466
Timeout : 300 (sec)
Verify return code: 20 (unable to get local issuer certificate)
---
250 CHUNKING