邮件服务器错误:stream_socket_enable_crypto

时间:2018-04-18 00:03:56

标签: php ssl phpmailer phabricator

我的应用程序利用PHPMailer用于PHP V5.5.x.在旧版本上,我没有发出任何证书来发送电子邮件,它在端口25上运行tls协议(至少这是应用程序中的设置)。

但是,一旦我将系统升级到v7.1.x,邮件系统就停止发送电子邮件。

我在内部SMTP邮件服务器的多台计算机之间使用电子邮件应用程序。 似乎我有证书问题,我猜测新的PHPMailer可能需要证书。没用过。

因此,我通过生成密钥csr和.key来创建自签名证书。

关于自签名证书的几个问题。

  1. CN是否需要与邮件服务器CN匹配?

  2. 我是否设置“公共名称”以匹配我的服务器地址的IP地址:10.10.10.100

  3. 这是错误日志,可能有助于提供帮助。

    User@debian:/opt/myApps/apps/phabricator/htdocs$ ./bin/phd log
    Daemon 6214 INIT [Tue, 17 Apr 2018 19:38:21 -0400] Starting process.
    Daemon 6214 ZZZZ [Tue, 17 Apr 2018 19:38:21 -0400] Process is preparing to hibernate for 180 second(s).
    Daemon 6214 DONE [Tue, 17 Apr 2018 19:38:21 -0400] Process exited normally.
    Daemon 6214 WAIT [Tue, 17 Apr 2018 19:38:21 -0400] Waiting 180 second(s) to restart process.
    Daemon 6215 INIT [Tue, 17 Apr 2018 19:38:26 -0400] Starting process.
    Daemon 6215 ZZZZ [Tue, 17 Apr 2018 19:38:26 -0400] Process is preparing to hibernate for 180 second(s).
    Daemon 6215 DONE [Tue, 17 Apr 2018 19:38:26 -0400] Process exited normally.
    Daemon 6215 WAIT [Tue, 17 Apr 2018 19:38:26 -0400] Waiting 180 second(s) to restart process.
    Daemon 6216 WAKE [Tue, 17 Apr 2018 19:39:08 -0400] Process is being awakened from hibernation.
    Daemon 6216 INIT [Tue, 17 Apr 2018 19:39:08 -0400] Starting process.
    
    
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400] [2018-04-17 19:39:09] ERROR 2: stream_socket_enable_crypto(): Peer certificate CN=`*.company.com' did not match expected CN=`10.10.10.5' at [/opt/myApps/apps/phabricator/htdocs/externals/phpmailer/class.smtp.php:197]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400] arcanist(head=stable, ref.stable=7b6a9a93f4a4), phabricator(head=stable, ref.stable=5e710959bed9), phutil(head=stable, ref.stable=47cfa511ca67)
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #0 stream_socket_enable_crypto(resource, boolean, integer) called at [<phabricator>/externals/phpmailer/class.smtp.php:197]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #1 SMTP::StartTLS() called at [<phabricator>/externals/phpmailer/class.phpmailer.php:787]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #2 PHPMailer::SmtpConnect() called at [<phabricator>/externals/phpmailer/class.phpmailer.php:689]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #3 PHPMailer::SmtpSend(string, string) called at [<phabricator>/externals/phpmailer/class.phpmailer.php:576]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #4 PHPMailer::Send() called at [<phabricator>/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php:159]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #5 PhabricatorMailImplementationPHPMailerAdapter::send() called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:605]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #6 PhabricatorMetaMTAMail::sendWithMailers(array) called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:491]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #7 PhabricatorMetaMTAMail::sendNow() called at [<phabricator>/src/applications/metamta/PhabricatorMetaMTAWorker.php:22]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #8 PhabricatorMetaMTAWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #9 PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #10 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #11 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #12 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400] [2018-04-17 19:39:09] EXCEPTION: (PhutilProxyException) Error while executing Task ID 9840. {>} (phpmailerException) Language string failed to load: tls at [<phabricator>/externals/phpmailer/class.phpmailer.php:788]
    
    
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400] arcanist(head=stable, ref.stable=7b6a9a93f4a4), phabricator(head=stable, ref.stable=5e710959bed9), phutil(head=stable, ref.stable=47cfa511ca67)
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #0 <#2> PHPMailer::SmtpConnect() called at [<phabricator>/externals/phpmailer/class.phpmailer.php:689]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #1 <#2> PHPMailer::SmtpSend(string, string) called at [<phabricator>/externals/phpmailer/class.phpmailer.php:576]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #2 <#2> PHPMailer::Send() called at [<phabricator>/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php:159]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #3 <#2> PhabricatorMailImplementationPHPMailerAdapter::send() called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:605]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #4 <#2> PhabricatorMetaMTAMail::sendWithMailers(array) called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:491]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #5 <#2> PhabricatorMetaMTAMail::sendNow() called at [<phabricator>/src/applications/metamta/PhabricatorMetaMTAWorker.php:22]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #6 <#2> PhabricatorMetaMTAWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #7 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #8 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #9 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
    Daemon 6216 STDE [Tue, 17 Apr 2018 19:39:09 -0400]   #10 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]
    

0 个答案:

没有答案