RHEL5.4 IPOPS,IMAPS服务器配置详解

本节中将概要的介绍下pop3和ipops服务器的简单配置,以及Linux下抓包工具的使用,国内用户普遍喜欢用pop3协议收取邮件,这非常的不安全,所以本节中也将概要的介绍下ipops服务器的配置,生产环境中配置ipop3服务器需要将pem格式的证书给CA签名才能被其他用户所信任和使用,pop3,imap协议默认使用TCP的110和143端口,ipops和imaps协议默认则使用TCP的993和995端口,邮件服务使用的账号是系统账户,所以安全性相当的重要,这也是RHCE的重点…

[root@server ~]# yum -y install dovecot.i386 //安装dovecot软件包,启动服务,设定下次开启自动启动,查看端口
[root@server ~]# service dovecot start
Starting Dovecot Imap: [ OK ]
[root@server ~]# chkconfig dovecot on
[root@server ~]# netstat -ntpl |grep -E '110|143|993|995+'
tcp        0      0 :::993                      :::*                        LISTEN      4652/dovecot       
tcp        0      0 :::995                      :::*                        LISTEN      4652/dovecot       
tcp        0      0 :::110                      :::*                        LISTEN      4652/dovecot       
tcp        0      0 :::143                      :::*                        LISTEN      4652/dovecot

[root@server ~]# useradd test    //新建一个系统账户用于测试
[root@server ~]# echo "test" |passwd --stdin test
Changing password for user test.
passwd: all authentication tokens updated successfully.     

[root@server ~]# yum -y install wireshark.i386   //安装抓包工具wireshark

[root@server ~]# ifconfig eth1 |grep 'inet addr'   //查看本机IP地址
          inet addr:192.168.100.254 Bcast:192.168.100.255 Mask:255.255.255.0

[root@client ~]# nmap 192.168.100.254   //在客户端使用nmap扫描服务器端开启的端口

Starting Nmap 4.11 ( ) at 2010-03-24 00:00 EDT
Interesting ports on 192.168.100.254:
Not shown: 1667 closed ports
PORT     STATE SERVICE
21/tcp   open ftp
22/tcp   open ssh
25/tcp   open smtp
53/tcp   open domain
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
763/tcp open cycleserv
784/tcp open unknown
796/tcp open unknown
993/tcp open imaps
995/tcp open pop3s
2049/tcp open nfs
MAC Address: 00:0C:29:0C:7C:4E (VMware)

Nmap finished: 1 IP address (1 host up) scanned in 23.250 seconds

[root@client ~]# telnet 192.168.100.254 110   //客户端使用telnet登陆POP3服务器
Trying 192.168.100.254...
Connected to 192.168.100.254 (192.168.100.254).
Escape character is '^]'.
+OK Dovecot ready.
user test
+OK
pass test
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/27342.html