{"id":182,"date":"2019-09-28T09:57:06","date_gmt":"2019-09-28T09:57:06","guid":{"rendered":"https:\/\/hourai.xyz\/blog\/?p=182"},"modified":"2022-06-06T00:58:23","modified_gmt":"2022-06-05T16:58:23","slug":"notes-on-hourai-wiki-email-config","status":"publish","type":"post","link":"https:\/\/hourai.xyz\/blog\/notes-on-hourai-wiki-email-config\/","title":{"rendered":"\u84ec\u83b1\u7ef4\u57fa\u8e29\u5751\u5c0f\u8bb0\u4e4b\u4e00\uff1a\u90ae\u4ef6\u914d\u7f6e"},"content":{"rendered":"\r\n<p>\u4e00\u4e2a\u90ae\u4ef6\u7cfb\u7edf\u5bf9\u4e8eMediaWiki\u7ad9\u70b9\u81f3\u5173\u91cd\u8981\uff0c\u4e3a\u4e86\u8ba9\u7ad9\u70b9\u80fd\u591f\u6295\u5165\u4f7f\u7528\uff0c\u524d\u51e0\u5929\u7814\u7a76\u5982\u4f55\u6dfb\u52a0\u90ae\u4ef6\u529f\u80fd\uff0c\u57fa\u4e8e\u5b89\u5168\u548c\u4fbf\u6377\u8003\u8651\uff0c\u54b1\u5c31\u662f\u4e0d\u60f3\u5728\u672c\u5730\u8bbe\u7acb\u5355\u72ec\u7684\u90ae\u4ef6\u670d\u52a1\uff0c\u7528\u4e86Yandex\u7684\u636e\u8bf4\u5f88\u5751\u7239\u7684\u57df\u540d\u90ae\u7bb1\u3002\u7531\u4e8ephp\u9ed8\u8ba4\u529f\u80fd\u4e0d\u652f\u6301\u81ea\u5b9a\u4e49\u90ae\u4ef6\u670d\u52a1\u5668\uff0c\u6240\u4ee5\u73b0\u65f6\u90ae\u4ef6\u529f\u80fd\u7531<code><a href=\"https:\/\/www.mediawiki.org\/wiki\/Manual:$wgSMTP\">$wgSMTP<\/a><\/code>\u5b9e\u73b0\u3002<\/p>\r\n\r\n\r\n\r\n<p>\u7531\u4e8e\u84ec\u83b1\u7ef4\u57fa\u7684 MediaWiki 1.33 \u7248\u672c\u5185\u7f6e\u4e86$wgSMTP\u6240\u9700\u7684\u7ec4\u4ef6\uff0c\u7701\u4e86\u5f88\u591a\u4e8b\uff0c\u7136\u800c\u670d\u52a1\u5668\u5728\u6211\u7684\u914d\u7f6e\u4e0b\u4e3a\u4e24\u4e2a\u7248\u672c\u5e76\u5b58\u7684PHP\uff0c\u7528\u6765\u505a\u7ad9\u7684\u662fPHP7\uff0c\u800c\u9ed8\u8ba4\u7684\u4e3aPHP5\uff0c\u56e0\u4e3a\u6211\u6ca1\u6709\u914d\u7f6e\u597d\u670d\u52a1\u5668\u7684\u5171\u5b58\u7248\u672c\uff0c\u6ca1\u6cd5\u4f7f\u7528compose\uff0c\u4ee5\u540e\u53ef\u80fd\u4f1a\u6709\u9ebb\u70e6\u3002\u6839\u636e\u4ee5\u4e0a\u7684\u624b\u518c\u5e76\u53c2\u8003\u4e86<a href=\"https:\/\/blog.yoitsu.moe\/mediawiki\/smtp_for_mediawiki.html\">\u8fd9\u7bc7<\/a><a rel=\"noreferrer noopener\" aria-label=\"\u535a\u6587\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\" href=\"https:\/\/blog.yoitsu.moe\/mediawiki\/smtp_for_mediawiki.html\" target=\"_blank\">\u535a\u6587<\/a>\u8fdb\u884c\u914d\u7f6e\u4ee5\u540e\uff0c\u53d1\u73b0\u63d0\u793a\u4e86\u8fd9\u6837\u7684\u9519\u8bef\uff1a<code>authentication failure [SMTP: STARTTLS failed (code: 220, response: TLS go ahead)]<\/code>\uff0c\u6253\u5f00\u7aef\u53e3\u4e5f\u4e0d\u6d4e\u4e8b\u3002\u800c\u5728\u6362\u4e86465\u7aef\u53e3\u4ee5\u540e\u9875\u9762\u76f4\u63a5\u5d29\u6389\u3002\u5728\u9a8c\u8bc1\u4e86\u81ea\u5df1\u7684\u90ae\u7bb1\u8d26\u53f7\u548c\u5bc6\u7801\u6ca1\u6709\u9519\u8bef\uff0c\u4ee5\u53caYandex\u7684\u90ae\u4ef6\u670d\u52a1\u5668\u786e\u5b9e\u6ca1\u6709\u5947\u5947\u602a\u602a\u7684\u9650\u5236\u4ee5\u540e\uff0c\u54b1\u7ffb\u4e86\u5f88\u591a\u5730\u65b9\uff0c\u5e0c\u671b\u627e\u5230\u539f\u56e0\uff0c\u7ed3\u679c\u5728<a href=\"https:\/\/my.oschina.net\/Tyrfing\/blog\/1796891\">\u8fd9\u91cc<\/a>\u53d1\u73b0\u4e86\u4e00\u4e9b\u86db\u4e1d\u9a6c\u8ff9\uff0c\u540c\u65f6\u8fd8\u6709<a href=\"https:\/\/forum.osticket.com\/d\/91682-authentication-failure-smtp-starttls-failed-code-220-response-tls-go-ahead\">\u8fd9\u4e2a<\/a>\uff0c\u548c\u6211\u4e00\u6837\u7684\u62a5\u9519\u3002\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48PHP\u65e0\u6cd5\u4f7f\u7528\u7cfb\u7edf\u7684\u8bc1\u4e66\u6587\u4ef6\uff0c\u6211\u4e0b\u8f7d\u4e86\u8bc1\u4e66\u6587\u4ef6\uff0c \u5728php.ini\u4e2d\u624b\u52a8\u6dfb\u52a0\u4e86\u4e00\u4e0b\u8bc1\u4e66\u8def\u5f84\uff0c\u91cd\u542f\u4e86php-fpm\uff0c\u95ee\u9898\u89e3\u51b3\u3002<\/p>\r\n\r\n\r\n\r\n<p>\u4e0d\u8fc7\u73b0\u5728\u8bb0\u8d77\u6765\u5b98\u65b9\u624b\u518c\u91cc\u9762\u4e5f\u7ed9\u4e86\u63d0\u793a\uff0c\u770b\u6765\u5c31\u662f\u8bc1\u4e66\u65b9\u9762\u7684\u9519\u8bef\u4e86\uff1a<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> PEAR&#8217;s mail will try to use TLS<sup><a href=\"https:\/\/www.mediawiki.org\/wiki\/Manual:$wgSMTP#cite_note-1\">[1]<\/a><\/sup> when connecting to the mail server if the server supports it, even if you don&#8217;t specify ssl:\/\/ in the host. But if the server certificate is not valid (CA<sup><a href=\"https:\/\/www.mediawiki.org\/wiki\/Manual:$wgSMTP#cite_note-2\">[2]<\/a><\/sup> not trusted, certificate has expired, CN<sup><a href=\"https:\/\/www.mediawiki.org\/wiki\/Manual:$wgSMTP#cite_note-3\">[3]<\/a><\/sup> does not match server name\/IP address, etc) it will refuse to work, and instead you&#8217;ll get the following error: <br><code> authentication failure [SMTP: STARTTLS failed (code: 220, response: begin TLS negotiation)] <\/code><br> You must fix the certificate issues for mail to work. <\/p><cite>PEAR \u7684 mail \u7a0b\u5e8f\u5728\u90ae\u4ef6\u670d\u52a1\u5668\u652f\u6301TLS\u7684\u65f6\u5019\u4f1a\u5c3d\u91cf\u4f7f\u7528TLS\u8fde\u63a5\u90ae\u4ef6\u670d\u52a1\u5668\uff0c\u5373\u4f7f\u4f60\u6ca1\u6709\u5728\u4e3b\u673a\u5730\u5740\u680f\u6307\u5b9a ssl:\/\/ \u3002\u4f46\u662f\u5982\u679c\u670d\u52a1\u5668\u8bc1\u4e66\u65e0\u6548\uff08\u8bc1\u4e66\u4e0d\u88ab\u4fe1\u4efb\uff0c\u8bc1\u4e66\u8fc7\u671f\uff0c\u8bc1\u4e66\u5e38\u7528\u540d\u4e0e\u670d\u52a1\u5668\u540d\u6216\u8005IP\u4e0d\u76f8\u7b26\u4e4b\u7c7b\uff09\uff0c\u7a0b\u5e8f\u4f1a\u62d2\u7edd\u5de5\u4f5c\uff0c\u76f8\u5e94\u5730\u4f60\u4f1a\u5f97\u5230\u4ee5\u4e0b\u9519\u8bef\u63d0\u793a\uff1a<br>\uff08\u7565\uff09<br>\u4f60\u5fc5\u987b\u4fee\u590d\u8bc1\u4e66\u95ee\u9898\uff0cmail\u624d\u4f1a\u5de5\u4f5c\u3002<br><\/cite><\/blockquote>\r\n\n<p style='text-align:left'>&copy; 2019 &#8211; 2022, <a href='https:\/\/hourai.xyz\/blog'>\u6c40\u7f81\u65c5\u8005<\/a>. \u7248\u6743\u6240\u6709\uff0c\u9664\u975e\u53e6\u6709\u8bf4\u660e\uff0c\u8c22\u7edd\u8f6c\u8f7d\u3002 <\/p>","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a\u90ae\u4ef6\u7cfb\u7edf\u5bf9\u4e8eMediaWiki\u7ad9\u70b9\u81f3\u5173\u91cd\u8981\uff0c\u4e3a\u4e86\u8ba9\u7ad9\u70b9\u80fd\u591f\u6295\u5165\u4f7f\u7528\uff0c\u524d\u51e0\u5929\u7814\u7a76\u5982\u4f55\u6dfb\u52a0\u90ae\u4ef6\u529f\u80fd\uff0c\u57fa\u4e8e\u5b89\u5168\u548c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-microblogs"],"_links":{"self":[{"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":4,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":187,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions\/187"}],"wp:attachment":[{"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hourai.xyz\/blog\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}