{"id":505,"date":"2013-12-23T23:40:54","date_gmt":"2013-12-23T15:40:54","guid":{"rendered":"http:\/\/fineyi.com\/?p=505"},"modified":"2013-12-23T23:40:54","modified_gmt":"2013-12-23T15:40:54","slug":"could-not-connect-to-smtp-host%e6%8a%a5%e9%94%99%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"http:\/\/www.fineyi.com\/?p=505","title":{"rendered":"Could not connect to smtp host\u62a5\u9519\u7684\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<p>\t\t\t\t<span style=\"font-family: 'Microsoft Yahei';\"><i>linux<\/i>\u4e0b\u670d\u52a1\u5668\u53d1\u9001\u90ae\u4ef6\u62a5\u9519\uff1a<i>could not connect to smtp host<\/i><\/span><span style=\"font-family: 'Microsoft Yahei';\">\u3002<\/span><\/p>\n<div><span style=\"font-family: 'Microsoft Yahei';\">\u5728\u7f51\u4e0a\u627e\u4e86\u5f88\u591a\u65b9\u6cd5\uff0c\u90fd\u672a\u80fd\u89e3\u51b3\uff0c\u540e\u6765\u5173\u95edselinux\uff0c\u95ee\u9898\u89e3\u51b3\u3002<\/span><\/div>\n<div><span style=\"font-family: 'Microsoft Yahei';\">\u539f\u56e0\u5206\u6790\uff1aselinux\u9ed8\u8ba4\u963b\u6b62\u4e86apache\u5411\u5916\u7684 socket\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Microsoft Yahei';\">\u89e3\u51b3\u65b9\u6848\uff1a<\/span><\/div>\n<div><span style=\"font-family: 'Microsoft Yahei';\">\u7b2c\u4e00\u79cd\u5173\u95ed<i>selinux<\/i>\uff1a<\/span><\/div>\n<pre class=\"lang:default decode:true\">[root@localhost \/]# vi \/etc\/selinux\/config \n\n# This file controls the state of SELinux on the system.\n# SELINUX= can take one of these three values:\n#     enforcing - SELinux security policy is enforced.\n#     permissive - SELinux prints warnings instead of enforcing.\n#     disabled - No SELinux policy is loaded.\nSELINUX=disabled\n# SELINUXTYPE= can take one of these two values:\n#     targeted - Targeted processes are protected,\n#     mls - Multi Level Security protection.\nSELINUXTYPE=targeted\n\n\u5c06SELINUX=enforcing \u6539\u4e3a SELINUX=disabled\n\n\u7136\u540e\uff1areboot<\/pre>\n<p>\u7b2c\u4e8c\u79cd\u914d\u7f6eSELINUX:<\/p>\n<pre class=\"lang:default decode:true\">[root@localhost \/]# setsebool -P httpd_can_network_connect 1\n[root@localhost \/]# service httpd restart\n[root@localhost \/]# service network restart<\/pre>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\uff1a<a title=\"\u6021\u7136\u4e4b\u4e50\" href=\"http:\/\/fineyi.com\/\" target=\"_blank\" rel=\"noopener\">\u6021\u7136\u4e4b\u4e50 \u2013 FineYi<\/a><\/p>\n<p>\u53c2\u8003\u8d44\u6599\uff1a<a title=\"http:\/\/archives.ryandaigle.com\/\" href=\"http:\/\/archives.ryandaigle.com\/\" target=\"_blank\" rel=\"noopener\">Ryan&#8217;s Scraps<\/a>\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\u4e0b\u670d\u52a1\u5668\u53d1\u9001\u90ae\u4ef6\u62a5\u9519\uff1acould not connect to smt &hellip; <a href=\"http:\/\/www.fineyi.com\/?p=505\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a> <a href=\"http:\/\/www.fineyi.com\/?p=505\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"footnotes":""},"categories":[5,8],"tags":[],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-linux","category-php"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=505"}],"version-history":[{"count":0,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts\/505\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}