Thứ Năm, 17 tháng 5, 2012

Xây dựng Mail Server với Postfix (P4)

Phần 4: Cài đặt Webmail với SquirrelMail

Trước tiên cần phải cài đặt Web Server và IMAP Server và PHP.

Cài đặt SquirrelMail

[root@localhost ~]# yum install squirrelmail

Cấu hình cho SquirrelMail

[root@localhost ~]#/usr/share/squirrelmail/config/conf.pl

Sẽ thấy như sau:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >>

Chọn menu thích hợp và cung cấp những thông tin cần thiết. Quan trọng nhất ở bước này là phần 2. Server Settings (phần IMAP Server).

Sau khi chỉnh sửa xong, chọn "S Save data" (lưu giữ cấu hình) và "Q Quit" (thoát). Cấu hình sẽ được ghi lại trong file "/etc/squirrelmail/config.php".

Phần “2. Server Sttings” như sau:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1.  Domain                 : localhost
2.  Invert Time            : false
3.  Sendmail or SMTP       : Sendmail

A.  Update IMAP Settings   : localhost:143 (uw)
B.  Change Sendmail Config : /usr/sbin/sendmail

R   Return to Main Menu
C   Turn color off
S   Save data
Q   Quit

Command >>

Kiểm tra lại lần cuối

[root@localhost ~]# vi /etc/squirrelmail/config.php

Phần chính của file /etc/squirrelmail/config.php thường có cấu trúc như sau:

###--------------------------------------------------------------
$org_name = "My Webmail Service";
$squirrelmail_default_language = 'en_US';
$domain = 'real.domain.name';
$imapServerAddress = 'localhost';
$imapPort = 143;
$useSendmail = true;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';

// trườngng hợp IMAP server là courier-imap
$imap_server_type = 'courier';
$default_folder_prefix = 'INBOX.';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';
###-------------------------------------------------------

Chạy SquirrelMail bằng cách gõ http://localhost/webmai. Bằng cách cấu hình lại file httpd.conf - file cấu hình của Apache, các bạn có thể truy cập Mail dưới dạng WebMail như sau: mail.xyz.com (xyz.com là tên miền của tổ chức).

Editor: VH, Vương L. Kiều (Baomathethong.blogspot.com)
Author & Source: UITnetwork.com

Không có nhận xét nào:

Đăng nhận xét