Cấu hình Mail Server trên CentOS 6.5

8678

4. Installing Squirrelmail , Httpd

yum install squirrelmail httpd mysql mysql-server -y

Cấu hình Squirrelamail và Apache

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

Chọn 2 để cài đặt server
Đang tảiChọn 1 thay đổi Domain
Chọn 3 thay đổi SMTP
Đang tải

Chọn S để Save , Q để Thoát

Cấu hình Httpd

vi /etc/httpd/conf/httpd.conf

Tạo Alias

Alias /webmail "/usr/share/squirrelmail"
  <Directory "/usr/share/squirrelmail">
           Options Indexes MultiViews FollowSymLinks
           RewriteEngine On
           DirectoryIndex index.php
           AllowOverride All
           Order allow,deny
           Allow from all
  </Directory>

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

service httpd restart
chkconfig httpd on

 

Mở port trên firewall

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT
iptables save
iptables restart

Sử dụng trình duyệt trên máy Server để test , vì ở đây mình chưa xây dựng DNS server nên chúng ta sẽ đi bằng IP . ví dụ : 172.16.1.254/webmail

squirrelmai
Khắc phục lỗi Login Error khi đăng nhập

Đang tải

# /usr/sbin/setsebool -P httpd_can_network_connect=1

Đăng nhập thành công

login squirrelmailNotice : Nếu bạn đã dựng DNS server thì phải thêm records MX vào 2 file fowardreverse zones . Cách cấu hình DNS Server bạn có thế tham khảo tại đây , sau khi đã thêm các bạn có thể truy cập bằng tên miền ,ví dụ : mail.adminvietnam.org/webmail

Chúc các bạn thành công

LuanPM-adminvietnam.org