php smtp tls,php – RoundcubePostfix SMTP:SSL例程:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c...
我有個人使用的Postfix / Dovecot / Roundcube設置,以及提供給其他用戶.我試圖將整個設置轉移到一個新的盒子,但有一些問題.
郵件接收工作正常,(僅在內部測試,域尚未傳輸.)以及外部IMAP& SMTP使用TLS / SSL工作很棒(例如Thunderbird)
問題在于我的圓形立方體設置,它可以使用IMAP到127.0.0.1,并且顯示用戶的電子郵件,但無法發送電子郵件,只是聲稱:“SMTP錯誤(220):身份驗證失敗.”
奇怪的是,使用我在當前服務器上使用的相同Postfix / Dovecot配置,Roundcube無法再在我的新服務器上訪問它.這是相關的roundcube配置:
$config['smtp_server'] = 'tls://localhost';
// Log SMTP conversation to /smtp or to syslog
$config['smtp_debug'] = true;
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$config['smtp_port'] = 587;
// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';
// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';
Roundcube的日志/錯誤日志簡單地說:
[02-Jan-2015 16:55:49 America/New_York] STARTTLS Failed ():
[02-Jan-2015 16:55:49 -0500]: SMTP Error: SMTP error: Authentication failure: STARTTLS Failed (Code: ) in /var/wwwmail/program/lib/Roundcube/rcube.PHP on line 1505 (POST /?_task=mail&_unlock=loading1420235752730&_lang=undefined&_framed=1?_task=mail&_action=send)
而Roundcube的日志/ smtp日志顯示:
[02-Jan-2015 17:50:01 -0500]: Recv: 220 example.net ESMTP Postfix
[02-Jan-2015 17:50:01 -0500]: Send: EHLO example.net
[02-Jan-2015 17:50:01 -0500]: Recv: 250-example.net
[02-Jan-2015 17:50:01 -0500]: Recv: 250-PIPELINING
[02-Jan-2015 17:50:01 -0500]: Recv: 250-SIZE 104857600
[02-Jan-2015 17:50:01 -0500]: Recv: 250-VRFY
[02-Jan-2015 17:50:01 -0500]: Recv: 250-ETRN
[02-Jan-2015 17:50:01 -0500]: Recv: 250-STARTTLS
[02-Jan-2015 17:50:01 -0500]: Recv: 250-ENHANCEDSTATUSCODES
[02-Jan-2015 17:50:01 -0500]: Recv: 250-8BITMIME
[02-Jan-2015 17:50:01 -0500]: Recv: 250 DSN
[02-Jan-2015 17:50:01 -0500]: Send: STARTTLS
[02-Jan-2015 17:50:01 -0500]: Recv: 220 2.0.0 Ready to start TLS
[02-Jan-2015 17:50:01 -0500]: Send: RSET
[02-Jan-2015 17:50:01 -0500]: Recv: M I A…"qh?R?
[02-Jan-2015 17:50:01 -0500]: Send: QUIT
以下是/etc/postfix/main.cf中我的postfix配置的相關片段
# TLS parameters for SMTP service
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/ssl/private/example.net/example.net.crt
smtpd_tls_key_file = /etc/ssl/private/example.net/example.net.key
smtpd_tls_auth_only = yes
以下是/etc/postfix/master.cf中我的postfix配置的相關片段
smtp inet n - - - - smtpd
-o content_filter=spamassassin
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o cleanup_service_name=cleanup_submit
smtps inet n - - - - smtpd
-o content_filter=spamassassin
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
后綴日志/var/log/mail.log報告以下錯誤:
Jan 2 17:50:01 example postfix/submission/smtpd[19959]: connect from localhost.localdomain[127.0.0.1]
Jan 2 17:50:01 example postfix/submission/smtpd[19959]: SSL_accept error from localhost.localdomain[127.0.0.1]: 0
Jan 2 17:50:01 example postfix/submission/smtpd[19959]: warning: TLS library problem: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1292:SSL alert number 48:
Jan 2 17:50:01 example postfix/submission/smtpd[19959]: lost connection after STARTTLS from localhost.localdomain[127.0.0.1]
Jan 2 17:50:01 example postfix/submission/smtpd[19959]: disconnect from localhost.localdomain[127.0.0.1]
Roundcube更新到1.0.4,這應該解決由于openssl導致PHP版本不兼容的問題.我完全沒有想法,任何人都有任何想法?
總結
以上是生活随笔為你收集整理的php smtp tls,php – RoundcubePostfix SMTP:SSL例程:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php url %,php常用的url处
- 下一篇: think php ajax分页,thi