SlideShare a Scribd company logo
Trung Tâm Đào Tạo
Quản Trị Mạng Và An Ninh Mạng Quốc Tế Athena
Báo Cáo Thực Tập Tuần III
Sinh viên thực tập: Nguyễn Trần Minh Tiến
Khoa: Công nghệ thông tin
Trường: ĐH Quốc Tế - ĐH Quốc Gia Tp Hồ Chí Minh
Ngành thực tập: Công nghệ thông tin
Đề tài thực tập: Xây dựng hệ thống mail server
(Postfix, Dovecot) doanh nghiệp trên Linux
Giáo viên hướng dẫn: Võ Đỗ Thắng
Tuần 2: 30/06/2014 – 04/07/2014
Nội Dung
I. Cấu hình Postfix...........................................................................................................3
II. Cấu hình Dovecot ........................................................................................................6
I. Cấu hình Postfix:
-Cài đặt postfix
[root@server~]#yuminstall postfix
-Cấuhình Postfix tại "/etc/postfix/main.cf"
[root@server~]#vi /etc/postfix/main.cf
#Di dendong77 themvaogia tri "myhostname"
myhostname=server.athena.lab
#Dong 85 cau hinhgia tri "domain"
mydomain=athena.lab
#Dong 101 cau hinhgiatri "myorigin"
myorigin= $mydomain
#Dong 116 cau hinhpostfix hoạtđộngở tất cả các interfaces
inet_interfaces=all
#Dòng 167 thêmvàogiá trị $mydomain
mydestination=$myhostname,localhost.$mydomain,localhost,$mydomain
#Chuyểnđếndòng270 xác địnhcác giátrị mynetworks
mynetworks=127.0.0.0/8 192.168.1.0/24
#Dòng 424 xác địnhhome foldercủamail box
home_mailbox=Maildir/
#Dòng 550, cấu hìnhkiểmtra các thôngsố headercủa email
header_checks=regexp:/etc/postfix/header_checks
body_checks=regexp:/etc/postfix/body_checks
#Dòng 575 cấu hình bannercho email
smtpd_banner= $myhostname ESMTP$mail_name
#Thêm vàoở dưới cùng file cácthôngsố giới hạndung lượngchotừng email vàdung lượng
của mail box. Bêndưới
mỗi email dùngđược 10MB và Mail box có dung lượnglà1GB
message_size_limit=10485760
mailbox_size_limit=1073741824
#Cấu hình các thôngsố xác thực cho SMTP
smtpd_sasl_type =dovecot
smtpd_sasl_path= private/auth
smtpd_sasl_auth_enable =yes
smtpd_sasl_security_options=noanonymous
smtpd_sasl_client_restrictions=permit_mynetworks,reject_unknown_client,permit
smtpd_sasl_recipient_restrictions=permit_mynetworks,permit_auth_destination,
permit_sasl_authenticated,reject
-Cấuhình tạo file header_checksvàbody_checks
[root@server~]#vi /etc/postfix/header_checks
#Loại bỏ email nếunhưkhôngcó địa chỉ email
/^From:.*<#.*@.*>/ REJECT
/^Return-Path:.*<#.*@.*>/REJECT
[root@server~]#vi /etc/postfix/body_checks
#Loại bỏ email nếutrongnội dungcó ký tự hacker.com
/^(|[^>].*)hacker.com/REJECT
-Tắt service sendmail
# service sendmail status
# service sendmail stop
-Khởi độngdịchvụ postfix
[root@server~]#/etc/init.d/postfix restart
- Chuyểnpostfix sanglàmMTA mặc định
[root@ns~]# yum install system-switch-mail
[root@ns~]# system-switch-mail
[root@ns~]# chkconfigsendmail off
[root@ns~]# chkconfigpostfix on
II. Cấu hình Dovecot:
-Dovecotđóngvai trò làPOP/IMAPServerđể truyểnfile đếnclient
-Cài đặt Dovecotpackage
[root@server~]#yuminstall dovecot
-Cấuhình dovecottại vị trí "/etc/dovecot/dovecot.conf"
[root@server~]#vi /etc/dovecot/dovecot.conf
#Dòng 26 thay đổi giá trị chỉ sử dụng IPv4
listen=*
[root@server~]#vi/etc/dovecot/conf.d/10-auth.conf
#Dòng 9 thayđổi giá trị cho phépxác thực plaintext
disable_plaintext_auth=no
#Dòng 97 thêmvào giátrị login
auth_mechanisms=plainlogin
[root@server~]#vi/etc/dovecot/conf.d/10-mail.conf
#Dòng 30 xác địnhvị trí mail location
mail_location=maildir:~/Maildir(xemlại trênDigitalOcean)
[root@server~]#vi/etc/dovecot/conf.d/10-master.conf
#Thay đổi giátrị dòng87
unix_listener/var/spool/postfix/private/auth{
mode = 0666
user= postfix
group= postfix
}
-Khởi độngdịchvụ Dovecot
[root@server~]#/etc/init.d/dovecotstart
[root@server~]#chkconfigdovecoton
[root@server~]#/etc/init.d/iptablesstop
-Tạo username vàpasswordđể kiểmtra.
[root@server~]#useradduser1
[root@server~]#passwduser1
[root@server~]#useradduser2
[root@server~]#passwduser2
Baocaotuan3

More Related Content

What's hot

Part 37 exchange server - recipient configuration - delegates - restriction...
Part 37   exchange server - recipient configuration - delegates - restriction...Part 37   exchange server - recipient configuration - delegates - restriction...
Part 37 exchange server - recipient configuration - delegates - restriction...laonap166
 
key win 10 bản quyền mới nhất kích hoạt vĩnh viễn
key win 10 bản quyền mới nhất kích hoạt vĩnh viễnkey win 10 bản quyền mới nhất kích hoạt vĩnh viễn
key win 10 bản quyền mới nhất kích hoạt vĩnh viễn
luudiecthu
 
Hướng dẫn cài đặt centOS 6.5-Thực Tập Athena
Hướng dẫn cài đặt centOS 6.5-Thực Tập AthenaHướng dẫn cài đặt centOS 6.5-Thực Tập Athena
Hướng dẫn cài đặt centOS 6.5-Thực Tập Athenaquocluong
 
Cấu hình modem zy xel để xem camera qua mạng
Cấu hình modem zy xel để xem camera qua mạngCấu hình modem zy xel để xem camera qua mạng
Cấu hình modem zy xel để xem camera qua mạngThien Binh
 
Bao cao thực tập tuan 2
Bao cao thực tập tuan 2 Bao cao thực tập tuan 2
Bao cao thực tập tuan 2
Hien Nguyen
 
Cấu hình hệ thống
Cấu hình hệ thốngCấu hình hệ thống
Cấu hình hệ thống
Hanh Nguyễn Văn
 
Hướng dẫn cách cài đặt NukeViet
Hướng dẫn cách cài đặt NukeVietHướng dẫn cách cài đặt NukeViet
Hướng dẫn cách cài đặt NukeViet
Minh Hà Đỗ Thanh
 
Hướng dẫn extract DMG file trên windows 7
Hướng dẫn extract DMG file trên windows 7Hướng dẫn extract DMG file trên windows 7
Hướng dẫn extract DMG file trên windows 7Trường Tiền
 

What's hot (10)

Part 37 exchange server - recipient configuration - delegates - restriction...
Part 37   exchange server - recipient configuration - delegates - restriction...Part 37   exchange server - recipient configuration - delegates - restriction...
Part 37 exchange server - recipient configuration - delegates - restriction...
 
Huong dan crack xor3
Huong dan crack xor3Huong dan crack xor3
Huong dan crack xor3
 
key win 10 bản quyền mới nhất kích hoạt vĩnh viễn
key win 10 bản quyền mới nhất kích hoạt vĩnh viễnkey win 10 bản quyền mới nhất kích hoạt vĩnh viễn
key win 10 bản quyền mới nhất kích hoạt vĩnh viễn
 
Hướng dẫn cài đặt centOS 6.5-Thực Tập Athena
Hướng dẫn cài đặt centOS 6.5-Thực Tập AthenaHướng dẫn cài đặt centOS 6.5-Thực Tập Athena
Hướng dẫn cài đặt centOS 6.5-Thực Tập Athena
 
Cấu hình modem zy xel để xem camera qua mạng
Cấu hình modem zy xel để xem camera qua mạngCấu hình modem zy xel để xem camera qua mạng
Cấu hình modem zy xel để xem camera qua mạng
 
Bao cao thực tập tuan 2
Bao cao thực tập tuan 2 Bao cao thực tập tuan 2
Bao cao thực tập tuan 2
 
Cấu hình hệ thống
Cấu hình hệ thốngCấu hình hệ thống
Cấu hình hệ thống
 
bao cao tuan 1
bao cao tuan 1bao cao tuan 1
bao cao tuan 1
 
Hướng dẫn cách cài đặt NukeViet
Hướng dẫn cách cài đặt NukeVietHướng dẫn cách cài đặt NukeViet
Hướng dẫn cách cài đặt NukeViet
 
Hướng dẫn extract DMG file trên windows 7
Hướng dẫn extract DMG file trên windows 7Hướng dẫn extract DMG file trên windows 7
Hướng dẫn extract DMG file trên windows 7
 

Viewers also liked

Moodle security
Moodle securityMoodle security
Moodle security
Dilum Bandara
 
Why there is no evidence for a new Maunder Minimum
Why there is no evidence for a new Maunder MinimumWhy there is no evidence for a new Maunder Minimum
Why there is no evidence for a new Maunder Minimum
Earth Institute of Columbia University
 
Present Perfect Simple And Present Perfect Continuous
Present Perfect Simple And Present Perfect ContinuousPresent Perfect Simple And Present Perfect Continuous
Present Perfect Simple And Present Perfect Continuous
anarosaleda
 
Reduce &amp; Eliminate, Wasteful &amp; Redundant Tasks
Reduce &amp; Eliminate, Wasteful &amp; Redundant TasksReduce &amp; Eliminate, Wasteful &amp; Redundant Tasks
Reduce &amp; Eliminate, Wasteful &amp; Redundant Tasksbboggs
 
Rina korea-eu-ws-2013-sergi figuerola-last version_upload
Rina korea-eu-ws-2013-sergi figuerola-last version_uploadRina korea-eu-ws-2013-sergi figuerola-last version_upload
Rina korea-eu-ws-2013-sergi figuerola-last version_uploadi2CAT Foundation
 
Project#3다항식의연산 Hwp
Project#3다항식의연산 HwpProject#3다항식의연산 Hwp
Project#3다항식의연산 HwpKimjeongmoo
 
Network Programming in C#
Network Programming in C#Network Programming in C#
Network Programming in C#
jvinhit
 
Central jul scene_v1
Central jul scene_v1Central jul scene_v1
Central jul scene_v1
CalumetPress
 
류기현발표
류기현발표류기현발표
RaspberryPI + Google Coder
RaspberryPI + Google CoderRaspberryPI + Google Coder
RaspberryPI + Google CoderSayanee Basu
 
How To Communicate In The Web
How To Communicate In The WebHow To Communicate In The Web
How To Communicate In The Web
cramars
 
Communicate for Success: Effective Marketing on a Budget
Communicate for Success: Effective Marketing on a BudgetCommunicate for Success: Effective Marketing on a Budget
Communicate for Success: Effective Marketing on a Budget
Iowa Campus Compact
 
Plan Bothnia final conference presentation
Plan Bothnia final conference presentationPlan Bothnia final conference presentation
Plan Bothnia final conference presentationManuel Frias
 
LtoJ Consulting Questionnaire Results
LtoJ Consulting Questionnaire ResultsLtoJ Consulting Questionnaire Results
LtoJ Consulting Questionnaire Resultsltojconsulting
 
Communication network simulation on the unix system trough use of the remote ...
Communication network simulation on the unix system trough use of the remote ...Communication network simulation on the unix system trough use of the remote ...
Communication network simulation on the unix system trough use of the remote ...Damir Delija
 
Paper-2 The Neo-Classical Literature
Paper-2 The Neo-Classical LiteraturePaper-2 The Neo-Classical Literature
Paper-2 The Neo-Classical Literaturedevendra00
 
ST.ANDREW'S CHURCH CHENNAI
ST.ANDREW'S CHURCH CHENNAIST.ANDREW'S CHURCH CHENNAI
ST.ANDREW'S CHURCH CHENNAI
Sandhiya Murugesan
 
Character theories
Character theoriesCharacter theories
Character theories
fizzakamran
 

Viewers also liked (19)

Moodle security
Moodle securityMoodle security
Moodle security
 
Why there is no evidence for a new Maunder Minimum
Why there is no evidence for a new Maunder MinimumWhy there is no evidence for a new Maunder Minimum
Why there is no evidence for a new Maunder Minimum
 
Present Perfect Simple And Present Perfect Continuous
Present Perfect Simple And Present Perfect ContinuousPresent Perfect Simple And Present Perfect Continuous
Present Perfect Simple And Present Perfect Continuous
 
Reduce &amp; Eliminate, Wasteful &amp; Redundant Tasks
Reduce &amp; Eliminate, Wasteful &amp; Redundant TasksReduce &amp; Eliminate, Wasteful &amp; Redundant Tasks
Reduce &amp; Eliminate, Wasteful &amp; Redundant Tasks
 
Rina korea-eu-ws-2013-sergi figuerola-last version_upload
Rina korea-eu-ws-2013-sergi figuerola-last version_uploadRina korea-eu-ws-2013-sergi figuerola-last version_upload
Rina korea-eu-ws-2013-sergi figuerola-last version_upload
 
Project#3다항식의연산 Hwp
Project#3다항식의연산 HwpProject#3다항식의연산 Hwp
Project#3다항식의연산 Hwp
 
Network Programming in C#
Network Programming in C#Network Programming in C#
Network Programming in C#
 
Central jul scene_v1
Central jul scene_v1Central jul scene_v1
Central jul scene_v1
 
류기현발표
류기현발표류기현발표
류기현발표
 
RaspberryPI + Google Coder
RaspberryPI + Google CoderRaspberryPI + Google Coder
RaspberryPI + Google Coder
 
How To Communicate In The Web
How To Communicate In The WebHow To Communicate In The Web
How To Communicate In The Web
 
Communicate for Success: Effective Marketing on a Budget
Communicate for Success: Effective Marketing on a BudgetCommunicate for Success: Effective Marketing on a Budget
Communicate for Success: Effective Marketing on a Budget
 
Plan Bothnia final conference presentation
Plan Bothnia final conference presentationPlan Bothnia final conference presentation
Plan Bothnia final conference presentation
 
LtoJ Consulting Questionnaire Results
LtoJ Consulting Questionnaire ResultsLtoJ Consulting Questionnaire Results
LtoJ Consulting Questionnaire Results
 
Communication network simulation on the unix system trough use of the remote ...
Communication network simulation on the unix system trough use of the remote ...Communication network simulation on the unix system trough use of the remote ...
Communication network simulation on the unix system trough use of the remote ...
 
Paper-2 The Neo-Classical Literature
Paper-2 The Neo-Classical LiteraturePaper-2 The Neo-Classical Literature
Paper-2 The Neo-Classical Literature
 
S journey power_point
S journey power_pointS journey power_point
S journey power_point
 
ST.ANDREW'S CHURCH CHENNAI
ST.ANDREW'S CHURCH CHENNAIST.ANDREW'S CHURCH CHENNAI
ST.ANDREW'S CHURCH CHENNAI
 
Character theories
Character theoriesCharacter theories
Character theories
 

Similar to Baocaotuan3

Baocaotuan1
Baocaotuan1Baocaotuan1
Baocaotuan1
miti2712
 
Bài báo cáo
Bài báo cáoBài báo cáo
Bài báo cáo
Fanker_Zip
 
bao cao thuc tap - huynh thanh tien
bao cao thuc tap - huynh thanh tienbao cao thuc tap - huynh thanh tien
bao cao thuc tap - huynh thanh tienTiến Tiến
 
Baocaotuan4 Mail Server Linux
Baocaotuan4 Mail Server LinuxBaocaotuan4 Mail Server Linux
Baocaotuan4 Mail Server Linux
miti2712
 
Bai bao cao 3
Bai bao cao 3Bai bao cao 3
Bai bao cao 3
tuankiet123
 
Trend micro kết quả thử nghiêm đhyd
Trend micro kết quả thử nghiêm đhydTrend micro kết quả thử nghiêm đhyd
Trend micro kết quả thử nghiêm đhyd
laonap166
 
Mail exchange 2007
Mail exchange 2007Mail exchange 2007
Mail exchange 2007
bboynhan1176511
 
Postfix Dovecot CentOS 6.5
Postfix Dovecot CentOS 6.5Postfix Dovecot CentOS 6.5
Postfix Dovecot CentOS 6.5thienma217
 
Triển Khai Mail Exchange 2007 .
Triển Khai Mail Exchange 2007 .Triển Khai Mail Exchange 2007 .
Triển Khai Mail Exchange 2007 .
Việt Nam Đồng
 
Huong dan thi nghiem wireshark
Huong dan thi nghiem wiresharkHuong dan thi nghiem wireshark
Huong dan thi nghiem wireshark
hien tran
 
Cấu hình và bảo mật cho Ubuntu Server
Cấu hình và bảo mật cho Ubuntu Server Cấu hình và bảo mật cho Ubuntu Server
Cấu hình và bảo mật cho Ubuntu Server
Ho Quang Thanh
 
Bao cao thuc tap tot nghiep
Bao cao thuc tap tot nghiepBao cao thuc tap tot nghiep
Bao cao thuc tap tot nghiepdoquyen9292
 
Template eway-draft (1)
Template eway-draft (1)Template eway-draft (1)
Template eway-draft (1)
asdkfljhslkdfhjla
 
Bai bao cao 4
Bai bao cao 4Bai bao cao 4
Bai bao cao 4
tuankiet123
 
bao cao tuan 34
bao cao tuan 34bao cao tuan 34
bao cao tuan 34chanhduy
 
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )La Bảo
 
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmpgiai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
Pham Huynh
 
(274364013) baibaocaogiuaky 140505213913-phpapp02
(274364013) baibaocaogiuaky 140505213913-phpapp02(274364013) baibaocaogiuaky 140505213913-phpapp02
(274364013) baibaocaogiuaky 140505213913-phpapp02lehuyvinh
 
Báo Cáo Hàng Tuần
Báo Cáo Hàng TuầnBáo Cáo Hàng Tuần
Báo Cáo Hàng TuầnBin Hoo
 
đồ áN thực tập tại athena
đồ áN thực tập tại athenađồ áN thực tập tại athena
đồ áN thực tập tại athenaHuy Bach
 

Similar to Baocaotuan3 (20)

Baocaotuan1
Baocaotuan1Baocaotuan1
Baocaotuan1
 
Bài báo cáo
Bài báo cáoBài báo cáo
Bài báo cáo
 
bao cao thuc tap - huynh thanh tien
bao cao thuc tap - huynh thanh tienbao cao thuc tap - huynh thanh tien
bao cao thuc tap - huynh thanh tien
 
Baocaotuan4 Mail Server Linux
Baocaotuan4 Mail Server LinuxBaocaotuan4 Mail Server Linux
Baocaotuan4 Mail Server Linux
 
Bai bao cao 3
Bai bao cao 3Bai bao cao 3
Bai bao cao 3
 
Trend micro kết quả thử nghiêm đhyd
Trend micro kết quả thử nghiêm đhydTrend micro kết quả thử nghiêm đhyd
Trend micro kết quả thử nghiêm đhyd
 
Mail exchange 2007
Mail exchange 2007Mail exchange 2007
Mail exchange 2007
 
Postfix Dovecot CentOS 6.5
Postfix Dovecot CentOS 6.5Postfix Dovecot CentOS 6.5
Postfix Dovecot CentOS 6.5
 
Triển Khai Mail Exchange 2007 .
Triển Khai Mail Exchange 2007 .Triển Khai Mail Exchange 2007 .
Triển Khai Mail Exchange 2007 .
 
Huong dan thi nghiem wireshark
Huong dan thi nghiem wiresharkHuong dan thi nghiem wireshark
Huong dan thi nghiem wireshark
 
Cấu hình và bảo mật cho Ubuntu Server
Cấu hình và bảo mật cho Ubuntu Server Cấu hình và bảo mật cho Ubuntu Server
Cấu hình và bảo mật cho Ubuntu Server
 
Bao cao thuc tap tot nghiep
Bao cao thuc tap tot nghiepBao cao thuc tap tot nghiep
Bao cao thuc tap tot nghiep
 
Template eway-draft (1)
Template eway-draft (1)Template eway-draft (1)
Template eway-draft (1)
 
Bai bao cao 4
Bai bao cao 4Bai bao cao 4
Bai bao cao 4
 
bao cao tuan 34
bao cao tuan 34bao cao tuan 34
bao cao tuan 34
 
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )
Bao Cao Thuc Tap Athena ( Mail Exchange 2007 )
 
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmpgiai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
giai-phap-an-ninh-trong-kien-truc-quan-tri-mang-snmp
 
(274364013) baibaocaogiuaky 140505213913-phpapp02
(274364013) baibaocaogiuaky 140505213913-phpapp02(274364013) baibaocaogiuaky 140505213913-phpapp02
(274364013) baibaocaogiuaky 140505213913-phpapp02
 
Báo Cáo Hàng Tuần
Báo Cáo Hàng TuầnBáo Cáo Hàng Tuần
Báo Cáo Hàng Tuần
 
đồ áN thực tập tại athena
đồ áN thực tập tại athenađồ áN thực tập tại athena
đồ áN thực tập tại athena
 

Baocaotuan3

  • 1. Trung Tâm Đào Tạo Quản Trị Mạng Và An Ninh Mạng Quốc Tế Athena Báo Cáo Thực Tập Tuần III Sinh viên thực tập: Nguyễn Trần Minh Tiến Khoa: Công nghệ thông tin Trường: ĐH Quốc Tế - ĐH Quốc Gia Tp Hồ Chí Minh Ngành thực tập: Công nghệ thông tin Đề tài thực tập: Xây dựng hệ thống mail server (Postfix, Dovecot) doanh nghiệp trên Linux Giáo viên hướng dẫn: Võ Đỗ Thắng Tuần 2: 30/06/2014 – 04/07/2014
  • 2. Nội Dung I. Cấu hình Postfix...........................................................................................................3 II. Cấu hình Dovecot ........................................................................................................6
  • 3. I. Cấu hình Postfix: -Cài đặt postfix [root@server~]#yuminstall postfix -Cấuhình Postfix tại "/etc/postfix/main.cf" [root@server~]#vi /etc/postfix/main.cf #Di dendong77 themvaogia tri "myhostname" myhostname=server.athena.lab #Dong 85 cau hinhgia tri "domain" mydomain=athena.lab #Dong 101 cau hinhgiatri "myorigin" myorigin= $mydomain #Dong 116 cau hinhpostfix hoạtđộngở tất cả các interfaces inet_interfaces=all #Dòng 167 thêmvàogiá trị $mydomain mydestination=$myhostname,localhost.$mydomain,localhost,$mydomain #Chuyểnđếndòng270 xác địnhcác giátrị mynetworks mynetworks=127.0.0.0/8 192.168.1.0/24 #Dòng 424 xác địnhhome foldercủamail box home_mailbox=Maildir/
  • 4. #Dòng 550, cấu hìnhkiểmtra các thôngsố headercủa email header_checks=regexp:/etc/postfix/header_checks body_checks=regexp:/etc/postfix/body_checks #Dòng 575 cấu hình bannercho email smtpd_banner= $myhostname ESMTP$mail_name #Thêm vàoở dưới cùng file cácthôngsố giới hạndung lượngchotừng email vàdung lượng của mail box. Bêndưới mỗi email dùngđược 10MB và Mail box có dung lượnglà1GB message_size_limit=10485760 mailbox_size_limit=1073741824 #Cấu hình các thôngsố xác thực cho SMTP smtpd_sasl_type =dovecot smtpd_sasl_path= private/auth smtpd_sasl_auth_enable =yes smtpd_sasl_security_options=noanonymous smtpd_sasl_client_restrictions=permit_mynetworks,reject_unknown_client,permit smtpd_sasl_recipient_restrictions=permit_mynetworks,permit_auth_destination, permit_sasl_authenticated,reject -Cấuhình tạo file header_checksvàbody_checks [root@server~]#vi /etc/postfix/header_checks #Loại bỏ email nếunhưkhôngcó địa chỉ email /^From:.*<#.*@.*>/ REJECT /^Return-Path:.*<#.*@.*>/REJECT
  • 5. [root@server~]#vi /etc/postfix/body_checks #Loại bỏ email nếutrongnội dungcó ký tự hacker.com /^(|[^>].*)hacker.com/REJECT -Tắt service sendmail # service sendmail status # service sendmail stop -Khởi độngdịchvụ postfix [root@server~]#/etc/init.d/postfix restart - Chuyểnpostfix sanglàmMTA mặc định [root@ns~]# yum install system-switch-mail [root@ns~]# system-switch-mail [root@ns~]# chkconfigsendmail off [root@ns~]# chkconfigpostfix on
  • 6. II. Cấu hình Dovecot: -Dovecotđóngvai trò làPOP/IMAPServerđể truyểnfile đếnclient -Cài đặt Dovecotpackage [root@server~]#yuminstall dovecot -Cấuhình dovecottại vị trí "/etc/dovecot/dovecot.conf" [root@server~]#vi /etc/dovecot/dovecot.conf #Dòng 26 thay đổi giá trị chỉ sử dụng IPv4 listen=* [root@server~]#vi/etc/dovecot/conf.d/10-auth.conf #Dòng 9 thayđổi giá trị cho phépxác thực plaintext disable_plaintext_auth=no #Dòng 97 thêmvào giátrị login auth_mechanisms=plainlogin [root@server~]#vi/etc/dovecot/conf.d/10-mail.conf #Dòng 30 xác địnhvị trí mail location mail_location=maildir:~/Maildir(xemlại trênDigitalOcean) [root@server~]#vi/etc/dovecot/conf.d/10-master.conf #Thay đổi giátrị dòng87 unix_listener/var/spool/postfix/private/auth{ mode = 0666 user= postfix group= postfix } -Khởi độngdịchvụ Dovecot [root@server~]#/etc/init.d/dovecotstart [root@server~]#chkconfigdovecoton [root@server~]#/etc/init.d/iptablesstop -Tạo username vàpasswordđể kiểmtra. [root@server~]#useradduser1 [root@server~]#passwduser1