15
CÀI ĐẶT VÀ CẤU HÌNH SQUIRRELMAIL Yêu cầu: Máy đã cài đặt DNS, postfix, dovecot 1, Cài đặt: Cài đặt online # yum install epel squirrelmail -y Cài đặt bằng gói: Download và cài đặt các gói sau: epel-release-6-8.noarch.rpm php-common-5.3.3-27.el6_5.i686.rpm php-cli-5.3.3-27.el6_5.i686.rpm php-5.3.3-27.el6_5.i686.rpm php-mbstring-5.3.3-27.el6_5.i686.rpm php-pear-1.9.4-4.el6.noarch.rpm php-pear-DB-1.7.13-3.el6.noarch.rpm squirrelmail-1.4.22-4.el6.noarch.rpm 2,Cấu hình: Di chuyển đến /usr/share/squirrelmail/config/ rồi chạy file conf.pl Nguyễn Duy Đạt - SVTT Page 1 # cd /usr/share/squirrelmail/config/ # ./conf.pl

Squirrelmail centos 6.5

Embed Size (px)

Citation preview

Page 1: Squirrelmail centos 6.5

CÀI ĐẶT VÀ CẤU HÌNH SQUIRRELMAIL

Yêu cầu: Máy đã cài đặt DNS, postfix, dovecot

1, Cài đặt:

Cài đặt online

# yum install epel squirrelmail -y

Cài đặt bằng gói: Download và cài đặt các gói sau:

epel-release-6-8.noarch.rpmphp-common-5.3.3-27.el6_5.i686.rpmphp-cli-5.3.3-27.el6_5.i686.rpmphp-5.3.3-27.el6_5.i686.rpmphp-mbstring-5.3.3-27.el6_5.i686.rpmphp-pear-1.9.4-4.el6.noarch.rpmphp-pear-DB-1.7.13-3.el6.noarch.rpmsquirrelmail-1.4.22-4.el6.noarch.rpm

2,Cấu hình:

Di chuyển đến /usr/share/squirrelmail/config/ rồi chạy file conf.pl

Nguy n Duy Đ t - SVTTễ ạ Page 1

# cd /usr/share/squirrelmail/config/# ./conf.pl

Page 2: Squirrelmail centos 6.5

Bảng cấu hình của Squirrelmail xuất hiện, nhập “2” → Enter để cài đặt cho server

Nguy n Duy Đ t - SVTTễ ạ Page 2

SquirrelMail Configuration : Read: config.php (1.4.0)---------------------------------------------------------Main Menu --1.  Organization Preferences2.  Server Settings3.  Folder Defaults4.  General Options5.  Themes6.  Address Books7.  Message of the Day (MOTD)8.  Plugins9.  Database10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color offS   Save dataQ   Quit

Command >> 2

Page 3: Squirrelmail centos 6.5

Trong mục Server Settings, nhập “1” → Enter → nhập mail domain → Enter

Nguy n Duy Đ t - SVTTễ ạ Page 3

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

General-------1.  Domain                 : localhost2.  Invert Time            : false3.  Sendmail or SMTP       : Sendmail

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

R   Return to Main MenuC   Turn color offS   Save dataQ   Quit

Command >> 1The domain name is the suffix at the end of all email addresses.  Iffor example, your email address is [email protected], then your domainwould be example.com.

[localhost]: athena.edu.vn

Page 4: Squirrelmail centos 6.5

Nhập “3” → Enter và đổi từ Sendmail sang SMTP

Nhập “2” → Enter để chuyển từ Sendmail sang SMTP

Nhập “s” → Enter để lưu lại, sau đó “q” → Enter để trở về menu chính

Nguy n Duy Đ t - SVTTễ ạ Page 4

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

General-------1.  Domain                 : athena.edu.vn2.  Invert Time            : false3.  Sendmail or SMTP       : Sendmail

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

R   Return to Main MenuC   Turn color offS   Save dataQ   Quit

Command >> 3

You now need to choose the method that you will use for sendingmessages in SquirrelMail.  You can either connect to an SMTP serveror use sendmail directly.

  1.  Sendmail  2.  SMTPYour choice [1/2] [1]: 2

Page 5: Squirrelmail centos 6.5

Tại menu chính, nhập “d” → Enter để chọn IMAP server

Nhập “dovecot” → Enter để chọn dovecot làm IMAP server

Nhập “s” → Enter để lưu cấu hình, sau đó nhập “q” → Enter để thoát menu cấu hình

Nguy n Duy Đ t - SVTTễ ạ Page 5

SquirrelMail Configuration : Read: config.php (1.4.0)---------------------------------------------------------Main Menu --1. Organization Preferences2. Server Settings3. Folder Defaults4. General Options5. Themes6. Address Books7. Message of the Day (MOTD)8. Plugins9. Database10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color offS Save dataQ Quit

Command >> d

Please select your IMAP server: bincimap = Binc IMAP server courier = Courier IMAP server cyrus = Cyrus IMAP server dovecot = Dovecot Secure IMAP server exchange = Microsoft Exchange IMAP server hmailserver = hMailServer macosx = Mac OS X Mailserver mercury32 = Mercury/32 uw = University of Washington's IMAP server gmail = IMAP access to Google mail (Gmail) accounts

quit = Do not change anythingCommand >> dovecot

Page 6: Squirrelmail centos 6.5

Mở file /etc/httpd/conf.d/squirrelmail.conf để sửa những cấu hình sau:

Dòng 8: sửa Deny from all thành Allow from all

Comment các dòing: 14, 15, 16, 17, 18

Để cho phép client đăng nhập bằng http, nhập câu lệnh sau:

# setsebool -P httpd_can_network_connect=1

Khởi động lại các dịch vụ:

# service httpd restart

# service postfix restart

# service dovecot restart

Nguy n Duy Đ t - SVTTễ ạ Page 6

1 # 2 # SquirrelMail is a webmail package written in PHP. 3 # 4 5 Alias /webmail /usr/share/squirrelmail 6 7 <Directory "/usr/share/squirrelmail/plugins/squirrelspell/modules"> 8 Allow from all 9 </Directory> 10 11 # this section makes squirrelmail use https connections only, for this you 12 # need to have mod_ssl installed. If you want to use unsecure http 13 # connections, just remove this section: 14 #<Directory /usr/share/squirrelmail> 15 # RewriteEngine on 16 # RewriteCond %{HTTPS} !=on 17 # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 18 #</Directory> 19

Page 7: Squirrelmail centos 6.5

3, Kiểm tra tại client:

Để truy cập vào web mail, ta truy cập với địa chỉ: http://<ipaddress>/webmail hoặc http://<domain-name>/webmailNhập username và password tại màn hình đăng nhập

Tại giao diện account, nhấn Compose để tạo và gứi một email mới sang [email protected]

Nguy n Duy Đ t - SVTTễ ạ Page 7

Page 8: Squirrelmail centos 6.5

Đăng nhập u2 kiểm tra email vừa gửi từ u1:

Nguy n Duy Đ t - SVTTễ ạ Page 8