2011-02-05 1 views
1

Я пытался использовать OpenSSL, чтобы установить соединение с smtp.gmail.com через порт 587 или 465 с: OpenSSL s_client -host smtp.gmail.com -port 587 -starttls Smtpклиент SMTP opensl с портом 587 gmail, без ответа (250 OK) после <crlf>. <crlf>

, и аутентификация , почта от, rcpt и данные были успешными. но моя проблема, после того, как я напишу. в новой строке, нет ответа 250 OK от сервера.

здесь процесс:

CONNECTED(00000003) 
    depth=1 /C=US/O=Google Inc/CN=Google Internet Authority 
    verify error:num=20:unable to get local issuer certificate 
    verify return:0 
    --- 
    Certificate chain 
    0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com 
     i:/C=US/O=Google Inc/CN=Google Internet Authority 
    1 s:/C=US/O=Google Inc/CN=Google Internet Authority 
     i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority 
    --- 
    Server certificate 
    -----BEGIN CERTIFICATE----- 
    (certification) 
    -----END CERTIFICATE----- 
    subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com 
    issuer=/C=US/O=Google Inc/CN=Google Internet Authority 
    --- 
    No client certificate CA names sent 
    --- 
    SSL handshake has read 1910 bytes and written 338 bytes 
    --- 
    New, TLSv1/SSLv3, Cipher is RC4-MD5 
    Server public key is 1024 bit 
    Secure Renegotiation IS supported 
    Compression: NONE 
    Expansion: NONE 
    SSL-Session: 
     Protocol : TLSv1 
     Cipher : RC4-MD5 
     Session-ID: 28E597C0025A93C82AD4A7C517F699B37D106D760597467B522C1041F1BC17C8 
     Session-ID-ctx: 
     Master-Key: 1CC83A8A4B7864DF9BBD9E9742B4E5A5937941EB2A28B88A1D4214920B77AC976D3ADC2DA7B60CF8BD6BC2B0712A42A2 
     Key-Arg : None 
     Start Time: 1296911515 
     Timeout : 300 (sec) 
     Verify return code: 20 (unable to get local issuer certificate) 
    --- 
    250 ENHANCEDSTATUSCODES 
    ehlo 
    250-mx.google.com at your service, [121.94.150.147] 
    250-SIZE 35651584 
    250-8BITMIME 
    250-AUTH LOGIN PLAIN XOAUTH 
    250 ENHANCEDSTATUSCODES 
    auth login 
    334 VXNlcm5hbWU6 
    <my email> 
    334 UGFzc3dvcmQ6 
    <my password> 
    235 2.7.0 Accepted 
    mail from:<email> 
    250 2.1.0 OK t14sm1471936icd.10 
    rcpt to:<email> 
    250 2.1.5 OK t14sm1471936icd.10 
    data 
    from: someone <email> 
    354 Go ahead t14sm1471936icd.10 
    to : someone <email> 
    subject: test 
    test 
    test2 
    . 

451 4.4.2 Timeout - closing connection. t14sm1471936icd.10 
read:errno=0 

Я использую Cygwin в win7 32.

Я искал все возможные ключевые слова на Google, но никакое решение не выходит. ПОЖАЛУЙСТА, ПОМОГИТЕ!

ответ

7

Может быть, добавить '-crlf' опции к COMAND линии:

openssl s_client -host smtp.gmail.com -port 587 -starttls smtp -crlf 
+0

Работы для замазки, тоже. –

Смежные вопросы