安裝套件
yum -y install gmp gmp-devel curl curl-devel libidn libidn-devel php php-pear libc-client* php-imap
yum -y install squirrelmail
設定參數
[root@mail1 ~]# vi /etc/squirrelmail/config.php$org_name = "Winpex Web Mail";
$squirrelmail_default_language = ‘zh_TW’;
$domain = ‘mail1.winpex-gl.com’;
$default_charset = ‘Big5′;
以下修改根目錄: /usr/share/squirrelmail/
SquirrelMail:郵件列表中文出現亂碼時,編輯 config/config.php:
$squirrelmail_default_language = ‘zh_TW’; $default_charset = ‘big5′; $lossy_encoding = false;
SquirrelMail:操作介面中文出現亂碼時,編輯 functions/i18n.php:
$languages['zh_TW']['NAME'] = ‘Chinese Trad’; $languages['zh_TW']['CHARSET'] [...]
Squirrelmail(松鼠郵件)的方便性很多人都知道,只不過常常會被中文顯示的問題搞瘋掉,使用UTF-8當介面時,碰到其他編碼的信件內容時又全部會變成亂碼,若改用Big5介面時,碰到非Big5編碼的信件內容也是一樣會變成亂碼,難道說魚與熊掌真的不能兼得嗎?
不死心的Ryan終於找到了修正方案,正確的修正方式請參考下方教學。(以下內容引述Worren’s Blog)
SquirrelMail:郵件列表中文出現亂碼時,編輯 config/config.php:
$squirrelmail_default_language = ‘zh_TW’;
$default_charset = ‘big5′;
$lossy_encoding = false;
SquirrelMail:操作介面中文出現亂碼時,編輯 functions/i18n.php:
$languages[’zh_TW’][’NAME’] = ‘Chinese Trad’;
$languages[’zh_TW’][’CHARSET’] = ‘big5′;
$languages[’zh_TW’][’LOCALE’] = array(‘zh_TW.UTF-8′, ‘zh_TW.big5′);
$languages[’tw’][’ALIAS’] = ‘zh_TW’;
SquirrelMail:下載附件中文檔名亂碼,編輯 src/download.php:
$filename = charset_encode($filename,$default_charset,false); //在這行下面
$filename = iconv(“big5〃,”utf-8〃,$filename); //新增這一行
如此一來便搞定文件內容亂碼的問題,有需要的就儘管拿去吧!
Your web site is really useful. Many thanks for sharing.