廣告

2024 年 11 月
 123
45678910
11121314151617
18192021222324
252627282930  

彙整

CentOS 使用簡易版 SquirrelMail 當 WEBMAIL

CentOS 使用簡易版 SquirrelMail 當 WEBMAIL

 

安裝套件

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’] = ‘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); ç新增這一行 約103行

下載另存郵件檔名亂碼處理:

// If name is not set, use subject of email

if (strlen($filename) < 1) {

$filename = decodeHeader($subject, true, true);

$filename = iconv(‘big5′,’utf-8’,$filename); ç加入這行 約108行

直接使用IE預覽附件為txt純文字檔時亂碼問題(Big5編碼用):

修改

[root@mail1 /]# vi /usr/share/squirrelmail/src/view_text.php

在 $charset = $header->getParameter(‘charset’); 下面加入判斷

if($squirrelmail_language == ‘zh_TW’)

$charset = ‘big5’;

讀者也會看的其它文章:

    Comments are closed.