Prima di tutto, devi conoscere l'IP e le porte del server. Ci sono spesso descrizioni di quali protocolli parlano su quale porta:
Googlemail - Gmail
Server: Authentication: Port:
SMTP Server smtp.gmail.com SSL 465
smtp.gmail.com StartTLS 587
IMAP Server imap.gmail.com SSL 993
Elenco server di ARCLAB.
Per controllare da solo, puoi utilizzare openssl
:
openssl s_client -crlf -connect smtp.gmail.com:993
e l'output:
---
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
Le connessioni sicure tra gli MTA SMTP avvengono principalmente tramite TLS. TLS è diverso da SSL una funzionalità extra che è inizializzata con il comando SMTP STARTTLS
.
Non saprai mai se un server SMTP di Google sta inviando tramite TLS a yahoo e viceversa, tranne che hai accesso alla rete e puoi annusarli. Ma puoi almeno controllare se i server comprendono TLS. Quindi, se un server è configurato per TLS, si connetterà a yahoo o ai server di google tramite 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
e lo stesso per 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
E l'output:
---
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