PHP IMAP_OPEN:SSL谈判失败 - 仅在Docker中
从Docker容器中的PHP打开IMAP连接时,我会收到以下错误:
imap_open():无法打开流{webmail.domain.tld} inbox 未知:webmail.domain.tld的TLS/SSL失败:SSL谈判失败(errflg = 2)
完全相同的设置在Windows VM中运行。我已经尝试添加“:993/imap/ssl/novalidate-cert/...”的任何组合,但没有运气。
我正在运行php:7.4-apache docker映像,并确保系统具有正确的日期和时间。
When opening an IMAP connection from PHP in a docker container, I get the following error:
imap_open(): Couldn't open stream {webmail.domain.tld}INBOX
Unknown: TLS/SSL failure for webmail.domain.tld: SSL negotiation failed (errflg=2)
The exact same setup is running in a Windows VM just fine. I already tried adding any combination of ":993/imap/ssl/novalidate-cert/...", but with no luck.
I'm running the php:7.4-apache docker image and made sure that the system has the correct date and time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过从Debian图像切换到高山图像来解决此问题。
我能够连接到其他一些邮件服务器,而不是一些特定的邮件服务器。我的猜测是在Debian或某些软件包中配置不良的邮件服务器和错误的组合。
Managed to solve this by switching from a Debian image, to an Alpine image.
I was able to connect to some other mail servers, just not to some specific ones. My guess is combination of a badly configured mail server and a bug in either Debian or some package.