{"id":343,"date":"2010-08-12T11:28:00","date_gmt":"2010-08-12T03:28:00","guid":{"rendered":"http:\/\/blog.infinity.idv.tw\/index.php\/2010\/08\/12\/centos-%e4%bd%bf%e7%94%a8%e7%b0%a1%e6%98%93%e7%89%88-squirrelmail-%e7%95%b6-webmail\/"},"modified":"2011-03-22T16:07:15","modified_gmt":"2011-03-22T08:07:15","slug":"centos-%e4%bd%bf%e7%94%a8%e7%b0%a1%e6%98%93%e7%89%88-squirrelmail-%e7%95%b6-webmail","status":"publish","type":"post","link":"http:\/\/blog.infinity.idv.tw\/?p=343","title":{"rendered":"CentOS \u4f7f\u7528\u7c21\u6613\u7248 SquirrelMail \u7576 WEBMAIL"},"content":{"rendered":"<p>CentOS \u4f7f\u7528\u7c21\u6613\u7248 SquirrelMail \u7576 WEBMAIL<\/p>\n<p>&#160;<\/p>\n<p>\u5b89\u88dd\u5957\u4ef6<\/p>\n<p>yum -y install gmp gmp-devel curl curl-devel libidn libidn-devel php php-pear libc-client* php-imap<\/p>\n<p>yum -y install squirrelmail<\/p>\n<p>\u8a2d\u5b9a\u53c3\u6578<\/p>\n<p>[root@mail1 ~]# vi \/etc\/squirrelmail\/config.php<\/p>\n<p>$org_name = &quot;Winpex Web Mail&quot;;<\/p>\n<p>$squirrelmail_default_language = &#8216;zh_TW&#8217;;<\/p>\n<p>$domain = &#8216;mail1.winpex-gl.com&#8217;;<\/p>\n<p>$default_charset = &#8216;Big5&#8217;;<\/p>\n<p><b><\/b><\/p>\n<p><b>\u4ee5\u4e0b\u4fee\u6539\u6839\u76ee\u9304: <\/b><b>\/usr\/share\/squirrelmail\/<\/b><\/p>\n<p><b>SquirrelMail<\/b><b>\uff1a\u90f5\u4ef6\u5217\u8868\u4e2d\u6587\u51fa\u73fe\u4e82\u78bc\u6642\uff0c\u7de8\u8f2f config\/config.php\uff1a<\/b><\/p>\n<p>$squirrelmail_default_language = \u2018zh_TW\u2019;   <br \/>$default_charset = \u2018big5\u2032;    <br \/>$lossy_encoding = false;<\/p>\n<p><b>SquirrelMail<\/b><b>\uff1a\u64cd\u4f5c\u4ecb\u9762\u4e2d\u6587\u51fa\u73fe\u4e82\u78bc\u6642\uff0c\u7de8\u8f2f functions\/i18n.php\uff1a<\/b><\/p>\n<p>$languages[&#8216;zh_TW&#8217;][&#8216;NAME&#8217;] = \u2018Chinese Trad\u2019;   <br \/>$languages[&#8216;zh_TW&#8217;][&#8216;CHARSET&#8217;] = \u2018big5\u2032;    <br \/>$languages[&#8216;zh_TW&#8217;][&#8216;LOCALE&#8217;] = array(\u2018zh_TW.UTF-8\u2032, \u2018zh_TW.big5\u2032);    <br \/>$languages[&#8216;tw&#8217;][&#8216;ALIAS&#8217;] = \u2018zh_TW\u2019;<\/p>\n<p><b>SquirrelMail<\/b><b>\uff1a\u4e0b\u8f09\u9644\u4ef6\u4e2d\u6587\u6a94\u540d\u4e82\u78bc\uff0c\u7de8\u8f2f src\/download.php\uff1a<\/b><\/p>\n<p>$filename = charset_encode($filename,$default_charset,false); <\/p>\n<p>$filename = iconv(\u2018big5\u2019,\u2019utf-8\u2019,$filename); \u00e7\u65b0\u589e\u9019\u4e00\u884c \u7d04103\u884c<\/p>\n<p><b>\u4e0b\u8f09\u53e6\u5b58\u90f5\u4ef6\u6a94\u540d\u4e82\u78bc\u8655\u7406:<\/b><\/p>\n<p>\/\/ If name is not set, use subject of email<\/p>\n<p>if (strlen($filename) &lt; 1) {<\/p>\n<p>$filename = decodeHeader($subject, true, true);<\/p>\n<p>$filename = iconv(&#8216;big5&#8242;,&#8217;utf-8&#8217;,$filename); \u00e7\u52a0\u5165\u9019\u884c \u7d04108\u884c<\/p>\n<p><b>\u76f4\u63a5\u4f7f\u7528IE\u9810\u89bd\u9644\u4ef6\u70batxt\u7d14\u6587\u5b57\u6a94\u6642\u4e82\u78bc\u554f\u984c(Big5\u7de8\u78bc\u7528):<\/b><\/p>\n<p>\u4fee\u6539<\/p>\n<p>[root@mail1 \/]# vi \/usr\/share\/squirrelmail\/src\/view_text.php<\/p>\n<p>\u5728 $charset = $header-&gt;getParameter(&#8216;charset&#8217;); \u4e0b\u9762\u52a0\u5165\u5224\u65b7<\/p>\n<p>if($squirrelmail_language == &#8216;zh_TW&#8217;)<\/p>\n<p>$charset = &#8216;big5&#8217;;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS \u4f7f\u7528\u7c21\u6613\u7248 SquirrelMail \u7576 WEBMAIL<\/p>\n<p>&#160;<\/p>\n<p>\u5b89\u88dd\u5957\u4ef6<\/p>\n<p>yum -y install gmp gmp-devel curl curl-devel libidn libidn-devel php php-pear libc-client* php-imap<\/p>\n<p>yum -y install squirrelmail<\/p>\n<p>\u8a2d\u5b9a\u53c3\u6578<\/p>\n<p>[root@mail1 ~]# vi \/etc\/squirrelmail\/config.php<\/p>\n<p>$org_name = &quot;Winpex Web Mail&quot;;<\/p>\n<p>$squirrelmail_default_language = &#8216;zh_TW&#8217;;<\/p>\n<p>$domain = &#8216;mail1.winpex-gl.com&#8217;;<\/p>\n<p>$default_charset = &#8216;Big5&#8217;;<\/p>\n<\/p>\n<p>\u4ee5\u4e0b\u4fee\u6539\u6839\u76ee\u9304: \/usr\/share\/squirrelmail\/<\/p>\n<p>SquirrelMail\uff1a\u90f5\u4ef6\u5217\u8868\u4e2d\u6587\u51fa\u73fe\u4e82\u78bc\u6642\uff0c\u7de8\u8f2f config\/config.php\uff1a<\/p>\n<p>$squirrelmail_default_language = \u2018zh_TW\u2019;   $default_charset = \u2018big5\u2032;    $lossy_encoding = false;<\/p>\n<p>SquirrelMail\uff1a\u64cd\u4f5c\u4ecb\u9762\u4e2d\u6587\u51fa\u73fe\u4e82\u78bc\u6642\uff0c\u7de8\u8f2f functions\/i18n.php\uff1a<\/p>\n<p>$languages[&#8216;zh_TW&#8217;][&#8216;NAME&#8217;] = \u2018Chinese Trad\u2019;   $languages[&#8216;zh_TW&#8217;][&#8216;CHARSET&#8217;] [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,324],"tags":[325],"_links":{"self":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/343"}],"collection":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=343"}],"version-history":[{"count":1,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":446,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/343\/revisions\/446"}],"wp:attachment":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}