{"id":1074,"date":"2021-07-24T06:49:40","date_gmt":"2021-07-23T22:49:40","guid":{"rendered":"https:\/\/www.dxQerp.cn\/?p=1074"},"modified":"2021-09-06T07:05:45","modified_gmt":"2021-09-05T23:05:45","slug":"how-to-install-open-webmail-2-54-on-centos-8","status":"publish","type":"post","link":"http:\/\/www.dxQerp.cn\/?p=1074","title":{"rendered":"How to install Open Webmail 2.54 on CentOS 8"},"content":{"rendered":"\n<p><strong>\u90f5\u4ef6\u4e3b\u6a5f<\/strong> <strong>(mail.dxqerp.cn)<\/strong>\u5b8c\u6210\u5f8c,&nbsp; \u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528 smtp&nbsp; &amp; pop3 .&nbsp; &nbsp;\u5982\u4f55\u8b93\u9019\u4e9b<strong>\u90f5\u4ef6\u5e33\u865f<\/strong>\u53ef\u4ee5 <strong>\u81ea\u884c\u8b8a\u66f4 \u5bc6\u78bc. <\/strong>&nbsp;\u6e1b\u5c11\u5f80 <strong>IT\u55ae\u4f4d<\/strong> \u8acb\u6c42 \u5354\u52a9\u5bc6\u78bc\u8b8a\u66f4\u5462 ?<\/p>\n\n\n\n<p>\u9019\u6642\u5019 \u53ef\u4ee5 \u501f\u52a9 <strong>open webmail<\/strong> \u4f86\u5b8c\u6210 \u9019\u9805\u5de5\u4f5c.&nbsp; (<a href=\"https:\/\/openwebmail.org\/openwebmail\">https:\/\/openwebmail.org\/openwebmail<\/a>).<\/p>\n\n\n\n<p>\u9032\u884c <strong>Openwebmail<\/strong> \u7684\u5b89\u88dd.&nbsp; &nbsp;\u53c3\u8003&nbsp; (<a href=\"https:\/\/openwebmail.org\/openwebmail\/download\/centos\/el8\/00.README.txt\">https:\/\/openwebmail.org\/openwebmail\/download\/centos\/el8\/00.README.txt<\/a>)<\/p>\n\n\n\n<p>\u76f8\u95dc<strong>\u5b89\u88dd\u8a2d\u5b9a<\/strong>\u7684<span style=\"color: #ff0000;\"><strong>\u9806\u5e8f<\/strong><\/span>\u6574\u7406\u5982\u4e0b,&nbsp; \u514d\u5f97\u4e0b\u6b21 \u5728 \u7db2\u8def\u627e\u4f86\u627e\u53bb (<span style=\"color: #999999;\"><em>\u7db2\u8def\u7684\u8cc7\u6599, \u6709OS \u7248\u672c\u7684\u5dee\u7570, \u6709\u63d2\u4ef6\u7248\u672c\u7684\u5dee\u7570, \u6709\u6642\u9593\u9ede\u7684\u5dee\u7570,\u96f6\u96f6\u7e3d\u7e3d\u7684,\u5f88\u82b1\u6642\u9593\u7684<\/em><\/span> ) .<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>\u5b8c\u6210 httpd \u5b89\u88dd \u8207 \u8a2d\u5b9a<\/strong> (\u6ce8\u610f&nbsp; port 80 , 443)<\/p>\n\n\n\n<p><strong>\u5b8c\u6210 postfix \u5b89\u88dd \u8207 \u8a2d\u5b9a<\/strong> ( \u6ce8\u610f port 25 ) ( \u5229\u7528 telnet 192.168.17.8\u00a0 25\u00a0 \u67e5\u4e00\u4e0b)<\/p>\n\n\n\n<p><strong># postfix \u6ce8\u610f\u9ede<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/postfix\/main.cf\u00a0 <span style=\"color: #800000;\">inet_interfaces = all<\/span>\n\/etc\/postfix\/main.cf\u00a0 <span style=\"color: #800000;\">mynetworks = 192.168.17.0\/24<\/span>, <span style=\"color: #ff0000;\"><strong>127.0.0.1<\/strong><\/span><\/code><\/pre>\n\n\n\n<p><strong># \u9632\u706b\u7246 \u6ce8\u610f\u9ede<\/strong>\u00a0 \u00a0smtp (port 25) and http (port 80)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --permanent --zone=public --add-service=smtp --add-service=http\r\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p><strong># \u6e96\u5099\u00a0 &#8216;\u958b\u767c\u5de5\u5177&#8217;\u00a0<\/strong> ( Development Tools )<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum groupinstall \"Development Tools\" -y<\/code><\/pre>\n\n\n\n<p><strong># \u914d\u7f6e openwebmail \u5b58\u5132\u5eab<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install yum-utils -y\r\nyum-config-manager --add-repo ftp:\/\/openwebmail.org\/pub\/openwebmail\/el8\/openwebmail-el8.repo<\/code><\/pre>\n\n\n\n<p><strong># \u5b89\u88dd openwebmail \u5957\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install openwebmail -y ( \u9019\u53ef\u80fd\u6703\u5b89\u88dd 100 \u591a\u500b perl \u5957\u4ef6 )<\/code><\/pre>\n\n\n\n<p><strong># \u57f7\u884c openwebmail-tool \u9032\u884c\u521d\u59cb\u5316 <\/strong>(\u53c3\u6578 &#8211;init)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/openwebmail-tool --init<\/code><\/pre>\n\n\n\n<p><strong># \u4e00\u9023\u4e32 \u7684\u904e\u7a0b<\/strong> , <strong>\u4f7f\u7528\u6642\u9593\u4e0d\u5e38<\/strong>&nbsp; \u4e00\u4e0b\u5c31\u904e\u53bb&#8230; \u770b\u5230<\/p>\n\n\n\n<p><span style=\"color: #999999;\">Welcome to the OpenWebMail!<\/span><\/p>\n\n\n\n<p><span style=\"color: #999999;\">This program is going to send a short message back to the developer,<\/span><br><span style=\"color: #999999;\">so we could have the idea that who is installing and how many sites are<\/span><br><span style=\"color: #999999;\">using this software, the content to be sent is:<\/span><\/p>\n\n\n\n<p><span style=\"color: #999999;\">OS: Linux 4.18.0-80.11.2.el8_0.x86_64 x86_64<\/span><br><span style=\"color: #999999;\">Perl: 5.026003<\/span><br><span style=\"color: #999999;\">WebMail: OpenWebMail 2.54 20141206<\/span><\/p>\n\n\n\n<p><span style=\"color: #999999;\">Send the site report<\/span>?(Y\/n)&nbsp; <span style=\"color: #ff0000;\"><strong>Y <\/strong><span style=\"color: #000000;\">(\u624b\u52d5\u8f38\u5165)<\/span><\/span><\/p>\n\n\n\n<p><span style=\"color: #999999;\">sending report&#8230;<\/span><\/p>\n\n\n\n<p><strong># \u518d\u6b21\u57f7\u884c\u904b\u884c (openwebmail-tool) \u4ee5\u4fee\u5fa9\u6b0a\u9650<\/strong>(\u53c3\u6578 &#8211;fix)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/openwebmail-tool --fix<\/code><\/pre>\n\n\n\n<p><strong># <span style=\"color: #ff0000;\">\u505c\u7528 SELinux<\/span><\/strong> \u4e26 <strong><span style=\"color: #ff0000;\">\u91cd\u65b0\u555f\u52d5<\/span> <span style=\"color: #0000ff;\">(\u4e0d\u505c\u7528, \u6703\u5361\u4f4f)<\/span><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/selinux\/config  SELINUX=disabled\r\nreboot<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528\u975e root \u7528\u6236\u5e33\u6236\u767b\u9304\u5230 webmail URL<\/p>\n\n\n\n<p>http:\/\/mail.dxqerp.cn\/webmail<\/p>\n\n\n\n<p><strong>\u61c9\u8a72 \u6703\u8df3\u51fa\u756b\u9762(<span style=\"color: #0000ff;\">\u6b63\u5e38<\/span>)&nbsp;&nbsp;<\/strong>&nbsp;(<strong><span style=\"color: #0000ff;\">openwebmai.org \u671f\u5f85\u4f60\u7684 \u6350\u8d08 <\/span><\/strong>)<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>\u53ef\u80fd\u7684\u932f\u8aa4\u4fe1\u606f<\/strong><br>\u8acb\u5148\u5728\u670d\u52d9\u5668\u4e0a\u57f7\u884c &#8216;\/var\/www\/cgi-bin\/openwebmail\/openwebmail-tool.pl<span style=\"color: #ff0000;\"><strong> &#8211;init<\/strong><\/span>&#8216;<br>\u53ef\u80fd\u5148\u524d\u57f7\u884c\u6642 \u5fd8\u8a18\u5e36\u53c3\u6578&nbsp; <strong>&#8211;init<\/strong><\/p>\n\n\n\n<p>&#8216;\/var\/www\/cgi-bin\/openwebmail\/<strong>.openwebmail.pl<\/strong>&#8216; \u5fc5\u9808\u5c07 uid \u8a2d\u7f6e\u70ba root<br>&#8216;\/var\/www\/cgi-bin\/openwebmail\/openwebmail-tool.pl <strong><span style=\"color: #ff0000;\">&#8211;fix<\/span><\/strong><br>\u53ef\u80fd\u5148\u524d\u57f7\u884c\u6642 \u5fd8\u8a18\u5e36\u53c3\u6578&nbsp; <strong>&#8211;fix<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2><strong>\u5176\u5b83\u6ce8\u610f \u4e8b\u9805<\/strong><\/h2>\n\n\n\n<p><strong>A. \u6536\u4ef6\u593e<\/strong> \u770b\u4e0d\u5230\u4fe1\u4ef6, \u662f\u56e0 openwebmail 2.53 <strong><span style=\"color: #0000ff;\">\u4e0d\u652f\u63f4<\/span> Maildir<\/strong> (\u6709\u5c0d\u7b56&nbsp; \u4e0b\u6b21 \u8655\u7406).<\/p>\n\n\n\n<p><strong>B. openwebmai \u4fe1\u4ef6\u5b58\u653e\u4f4d\u7f6e<\/strong><\/p>\n\n\n\n<ul><li>\u6536\u4fe1\u7bb1&nbsp; &nbsp;\/var\/mail\/\u6bcf\u4e2a\u4eba\u540d\u5b57\u4e0b\u9762<\/li><li>\u53d1\u4fe1\u7bb1&nbsp; &nbsp;\/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/sent-mail<\/li><li>\u5783\u573e\u7bb1&nbsp; &nbsp;\/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/spam-mail<\/li><li>\u75c5\u6bd2\u90ae\u4ef6&nbsp;\/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/virtus-mail<\/li><li>\u8349\u7a3f\u7bb1&nbsp; &nbsp;\/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/saved-drafts<\/li><li>\u4fdd\u5b58\u90ae\u4ef6 \/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/saved-messages<\/li><li>\u5e9f\u4ef6\u90ae\u4ef6&nbsp;\/home\/\u6bcf\u4e2a\u4eba\u540d\u5b57\/mail\/mail-trash<\/li><\/ul>\n\n\n\n<p><strong>C. \u7528 outlook \u8fdb\u884c\u6536\u53d1\u90ae\u4ef6\u65f6<\/strong>\uff0clinux \u90ae\u4ef6\u7cfb\u7edf\u7684\u5bf9\u5e94\u76ee\u5f55\u4e2d\u4e0d\u4f1a\u4fdd\u5b58\u76f8\u5e94\u7684\u6587\u4ef6\u3002\u53ea\u6709\u7528openwebmail\u7684\u683c\u5f0f\u65f6\u624d\u80fd\u4fdd\u5b58\u76f8\u5173\u7684\u6587\u4ef6\u5230\u6536\u4fe1\u53ca\u53d1\u4fe1\u7bb1\u4e2d<\/p>\n\n\n\n<p><strong>D. \u7db2\u9801\u4e0b\u65b9\u7684 &#8216;\u5e6b\u52a9&#8217;<\/strong>&nbsp; \u5c0d \u7e41\u9ad4 \u8207 \u7c21\u9ad4&nbsp; <strong><span style=\"color: #0000ff;\">\u5448\u73fe \u4e82\u78bc(\u53ef\u80fd\u4e0d\u652f\u63f4 UTF-8)<\/span><\/strong><\/p>\n\n\n\n<p><strong>E. \u65e5\u5fd7\u6587\u4ef6\u4fdd\u5b58\u5728<\/strong> \/var\/log\/openwebmail.log<\/p>\n\n\n\n<p>\u767c\u751f \/var\/log\/openwebmail.log! (<span style=\"color: #0000ff;\">Permission denied<\/span>)&nbsp; \u53ef\u80fd\u8655\u65bc <span style=\"color: #ff6600;\">SElinux<\/span> \u4fdd\u8b77\u4e4b\u4e0b\uff0c\u5c0e\u81f4\u9019\u7a2e\u60c5\u6cc1<\/p>\n\n\n\n<h2><strong>\u89e3\u6c7a\u65b9\u5f0f<\/strong>\uff1a<\/h2>\n\n\n\n<p>touch \/var\/log\/openwebmail.log<br># \u9019\u662f\u7522\u751f\u4e00\u500blog\u6a94<\/p>\n\n\n\n<p>chcon -u system_u \/var\/log\/openwebmail.log<br># \u9019\u662f\u4fee\u6539\u6a94\u6848\u4f7f\u7528\u8005\u6b0a\u9650<\/p>\n\n\n\n<p>chcon -t httpd_sys_script_rw_t \/var\/log\/openwebmail.log<br># \u9019\u662f\u4fee\u6539\u5beb\u5165\u6b0a\u9650<\/p>\n\n\n\n<p>chcon -t httpd_unconfined_script_exec_t \/var\/www\/cgi-bin\/openwebmail\/openwebmail*<br># \u9019\u662f\u4fee\u6539\u6a94\u6848\u7531\u4ec0\u9ebc\u5957\u4ef6\u5c08\u7528<\/p>\n\n\n\n<p>\u9019\u4e9b\u90fd\u662f\u56e0\u70ba SELinux \u9020\u6210\u7684\uff0c\u539f\u672c\u6a94\u6848,<strong>\u76ee\u9304\u6b0a\u9650<\/strong>\u53ea\u6709\u4f7f\u7528\u6a94\u6848\u524d\u9762\u90a3\u4e32\uff08rwxrwxrwx\uff09,\u4f7f\u7528SELinux \u5f8c, \u6703\u591a\u51fa\u4e00\u7a2e\u7ba1\u7406<span style=\"color: #ff6600;\">context type<\/span>\uff0c<span style=\"color: #ff6600;\">context type <\/span>\u6703\u9650\u5236\u8a72\u76ee\u9304\u3001\u6a94\u6848\u7684\u4f7f\u7528\u539f\u5247\uff0c<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \u4f7f\u7528\u6709\u5b89\u88dd <span style=\"color: #ff6600;\">SELinux<\/span> \u6642\uff0c\u51fa\u73fe Apach\u3001FTP \u660e\u660e \u90fd\u8a2d\u5b9a\u597d\u4e86\uff0c\u537b\u9084\u662f\u4e0d\u80fd\u4f7f\u7528\uff0c\u591a\u534a\u51fa\u554f\u984c\uff0c\u90fd\u662f <span style=\"color: #ff6600;\">SELinux<\/span> \u5728\u505a\u602a\u3002<\/p>\n\n\n\n<p>\/usr\/sbin\/sestatus \u8868\u793a selinux \u9632\u706b\u5899\u7684\u5b89\u5168\u7b56\u7565<\/p>\n\n\n\n<p>F. <strong>\u4f7f\u7528speedcgi\u6765\u52a0\u901f<\/strong>&nbsp; \u9488\u5bf9 Openwebmail&nbsp; \u901f\u5ea6\u6162\u7684\u7f3a\u70b9\uff0c\u53ef\u4ee5\u4f7f\u7528 speedcgi \u6765\u52a0\u901f (<strong><span style=\"color: #0000ff;\">\u6478\u7d22\u4e2d<\/span> <\/strong>)<\/p>\n\n\n\n<h2>\u4ee5\u4e0a \u7a2e\u7a2e \u73fe\u8c61 \u767b\u8a18\u5728\u6848<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u90f5\u4ef6\u4e3b\u6a5f (mail.dxqerp.cn)\u5b8c\u6210\u5f8c,&nbsp; \u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528 smtp&nbsp; &amp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1177,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37,13,36],"tags":[],"jetpack_featured_media_url":"http:\/\/www.dxQerp.cn\/wp-content\/uploads\/2021\/08\/OpenWebmial.png","_links":{"self":[{"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/posts\/1074"}],"collection":[{"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1074"}],"version-history":[{"count":5,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/posts\/1074\/revisions"}],"predecessor-version":[{"id":1475,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/posts\/1074\/revisions\/1475"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=\/wp\/v2\/media\/1177"}],"wp:attachment":[{"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dxQerp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}