Estou tentando solucionar um problema de SMTP. Minhas credenciais funcionam bem através do cliente de email do OS X (e em outras áreas), portanto as credenciais são definitivamente boas. No entanto, quando tento enviá-las por meio de: openssl s_client -starttls smtp -crlf -connect smtp.mail.me.com:587
, obtenho uma resposta 535 (falha na autenticação).
Eu usei o Wireshark para assistir as duas trocas, e elas são parecidas, embora eu não tenha descoberto como descriptografar o tráfego para poder ver a troca do cliente de e-mail em texto simples.
[Edit: eu tentei minha conta do Gmail usando o openssl, e funciona bem, usando o AUTH PLAIN. Há algo estranho sobre o sistema AUTH da Apple?]
Aqui está a troca openssl, anonimizada quando necessário:
openssl s_client -starttls smtp -crlf -connect smtp.mail.me.com:587
CONNECTED(00000003)
depth=2 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=*.mail.me.com
i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
1 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
2 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFC......certificate characters....50bq4=
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=*.mail.me.com
issuer=/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
---
No client certificate CA names sent
---
SSL handshake has read 4717 bytes and written 491 bytes
---
New, TLSv1/SSLv3, Cipher is AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : AES128-SHA
Session-ID: 15987251B4A0B361AC3690B88A2A972C57747B5CAD15B613D92F6CE97284789F
Session-ID-ctx:
Master-Key: [long string here]
Key-Arg : None
Start Time: 1417991368
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
250 SIZE 28311552
ehlo testing
250-st11p00mm-asmtp002.mac.com
250-8BITMIME
250-PIPELINING
250-CHUNKING
250-DSN
250-ENHANCEDSTATUSCODES
250-EXPN
250-HELP
250-XADR
250-XSTA
250-XCIR
250-XGEN
250-XLOOP 2CE0B8913D00E705D3D542BA5DF0FCE8
250-AUTH PLAIN LOGIN ATOKEN
250-AUTH=LOGIN PLAIN
250-NO-SOLICITING
250 SIZE 28311552
AUTH PLAIN
334
[base-64 credentials entered here]
535 5.7.8 Bad username or password (Authentication failed).