|
本帖最后由 iks 于 2024-10-21 16:14 编辑
wawos 发表于 2024-10-21 14:33
胡说, 不对, 看了教程, EHLO是表明自己的身份, 后面填的是自己网站的域名
根本就不是填smtp.qq.com ...
看走眼了抱歉,EHLO 确实是表明自己的身份
SMTP 只能用完全限定域名 (FQDN) 的原因是使用 SSL, TLS 或 StartTLS 的 SMTP 需要验证服务器名称
例如,尝试获得 email-smtp.us-west-1.amazonaws.com:587 的证书,执行:
# openssl s_client -connect email-smtp.us-west-1.amazonaws.com:587 -starttls smtp
可以得到:
[ol]# openssl s_client -connect email-smtp.us-west-1.amazonaws.com:587 -starttls smtpCONNECTED(00000003)depth=2 C = US, O = Amazon, CN = Amazon Root CA 1verify return:1depth=1 C = US, O = Amazon, CN = Amazon RSA 2048 M01verify return:1depth=0 CN = email-smtp.us-west-1.amazonaws.comverify return:1---Certificate chain 0 s:CN = email-smtp.us-west-1.amazonaws.com i:C = US, O = Amazon, CN = Amazon RSA 2048 M01 1 s:C = US, O = Amazon, CN = Amazon RSA 2048 M01 i:C = US, O = Amazon, CN = Amazon Root CA 1 2 s:C = US, O = Amazon, CN = Amazon Root CA 1 i:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 3 s:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 i:C = US, O = "Starfield Technologies, Inc.", OU = Starfield Class 2 Certification Authority---Server certificate-----BEGIN CERTIFICATE-----MIIGQjCCBSqgAwIBAgIQCaHt/BVsLHNtiqrkyyDR5zANBgkqhkiG9w0BAQsFADA8MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQQDExNBbWF6b24gUlNBIDIwNDggTTAxMB4XDTI0MDkwNDAwMDAwMFoXDTI1MDkwMzIzNTk1OVowLTErMCkGA1UEAxMiZW1haWwtc210cC51cy13ZXN0LTEuYW1hem9uYXdzLmNvbTCCASIwDQYJKo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qAAABkbq8Y0AAAAQDAEYwRAIgIJ3ah+QSfrN7ogIh3TF6cThNrlbHRhL8YTc9EoZNVQkCIENbP4vqCx81C7Kaf4LlvNXbAjhxQ99V5o1pRlqJDqPKAHUAfVkeEuF4KnscYWd8Xv340IdcFKBOlZ65Ay/ZDowuebgAAAGRurxjAQAABAMARjBEAiBS8/o0JW7srCqN6K3VjckdzBMSlQ/pxKPTw9QAJhGGyQIgfka8+F+qxfLK8C5YS7nXw4mpRtn5I6wiZdcN9pYwnYQAdQDm0jFjQHeMwRBBBtdxuc7B0kD2loSG+7qHMh39HjeOUAAAAZG6vGMbAAAEAwBGMEQCIC0/v3uCz8djCDtMMpz6I/H7mVYfSVGjoXX4SPLcTnsrAiA+DlEej6rPxGvucXdhzFC66nIQoNA4AeIuq6cffB296jANBgkqhkiG9w0BAQsFAAOCAQEAFtteDD34Btc4wTsfOQdfiSAFyxNVP6eMdvDFJwlh3n8wP80wo8761IIGde+MNhguNNJXDDxSQBSE4ZgyLU6AvjaDqC0qsAPLaz8rOsEpVWad1th4kgAuRU/Sl6qbALUSD8v2nxT0mi8/RBXtsi/R36sr+XkJgbh19tRX/3HR22oe+QqXLtAatkJL0HzWg9KXDpMPU/Dtn+**5wBw6AtwTFwcGL+eiS8Uodn0y+PvHI5i/Ax77o2aU6hOuHBeXE/yVnO/0JaTNCB/06vhQ77q08EiIR/UzS+BmDWFdRcFST5f7F+8XezOo1cDrF1GkcJAMvyJ7KKdeK43eu2ATFdSg==-----END CERTIFICATE-----subject=CN = email-smtp.us-west-1.amazonaws.comissuer=C = US, O = Amazon, CN = Amazon RSA 2048 M01---No client certificate CA names sentPeer signing digest: SHA256Peer signature type: RSA-PSSServer Temp Key: ECDH, P-256, 256 bits---SSL handshake has read 6135 bytes and written 903 bytesVerification: OK---New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384Server public key is 2048 bitSecure Renegotiation IS NOT supportedCompression: NONEExpansion: NONENo ALPN negotiatedEarly data was not sentVerify return code: 0 (ok)---250 Ok---Post-Handshake New Session Ticket arrived:SSL-Session: Protocol : TLSv1.3 Cipher : TLS_AES_256_GCM_SHA384 Session-ID: F13F18778F6405D1D2864FC3078014639FC3AA9186FA64D6F725CB3198E2050D Session-ID-ctx: Resumption PSK: EE4CB763252AD64874D1A8B75650A16F3E08FC252517F96875052DED3B7115B35EDA13C8B958674B8235647A968C98FE PSK identity: None PSK identity hint: None SRP username: None TLS session ticket lifetime hint: 86400 (seconds) TLS session ticket: 0000 - 3a 1c b5 42 b9 44 7e 3b-4c 73 37 5c 92 dd 1e a3 :..B.D~;Ls7\.... 0010 - 44 68 bf 65 0d c9 81 6f-6d 6c 36 b8 e3 a5 aa 08 Dh.e...oml6..... Start Time: 1729498245 Timeout : 7200 (sec) Verify return code: 0 (ok) Extended master secret: no Max Early Data: 0---read R BLOCK451 4.4.2 Timeout waiting for data from client.closed[/ol]复制代码
该证书的 commonName 为 email-smtp.us-west-1.amazonaws.com
如果你将 SMTP 服务器标记为 50.18.243.214 则会发生不匹配,客户端拒绝送信
|
|