-----------------------------------------------------
[root@rhel53 mail]# yum install senmail* -y
-----------------------------------------------------
3、修改Sendmail相关配置文件:
----------------------------------------------------
[root@rhel53 mail]# pwd
/etc/mail
[root@rhel53 mail]#
----------------------------------------------------
5、修改:修改/etc/mail/local-host-names
----------------------------------------------------
[root@rhel53 mail]# vim local-host-names
# local-host-names - include all aliases for your machine
here.
mail.rhce.cn
rhce.cn
----------------------------------------------------
6、重新启动相关服务进行测试:
---------------------------------------------------
[root@rhel53 mail]# chkconfig sendmail on
[root@rhel53 mail]# service sendmail restart
Shutting down
sm-client:
Shutting down
sendmail:
Starting
sendmail:
Starting
sm-client:
--------------------------------------------------
2)本地发送收取邮件测试:
--------------------------------------------------
[root@station1 mail]# mail
redhat@mail.rhce.cn
Subject: test
please let go!
this is a test !
the mail is ben a test!
.
Cc:
--------------------------------------------------
邮件发送以后可能要经过一段时间(2-5分钟)才能看到邮件。
--------------------------------------------------
[root@station1 mail]# mail -u
redhat
Mail version 8.1 6/6/93.
"/var/mail/redhat": 1 message 1 new
>N
&
//提示有一份邮件记录。标题和我们发送的时候写的标题相同。
-------------------------------------------------
经过上面的测试我们的Sendmail邮局就好了,当然我们可能要考虑的问题是一个工作的方便性,不可能让大家都在Linux的终端界面这么发邮件,下面我们就看一下通过Dovecot来实现通过邮件客户端软件(outlook)来发送接收邮件。
四、Dovecot下pop3 imap的及邮件客户端软件的使用:
1、Dovecot软件包的安装
-----------------------------------------------------
[root@rhel53 mail]# yum install dovecot* -y
-----------------------------------------------------
2、修改/etc/dovevcot.conf配置文件:
3、重启动相关服务:
-----------------------------------------------------
[root@rhel53 mail]# chkconfig dovecot on
[root@rhel53 mail]# service dobecot restart
[root@rhel53 mail]# service sendmail restart
----------------------------------------------------
4、Outlook的配置:(pop3为例,imap大家实现pop3后自己配置一下)
**
**
**
**
**
配置好以后会出现登陆账号提示,输入密码就可以看见邮件,并做发送邮件测试了。
通过上面的努力,我们就实现了Sendmail+dovecot组合的邮局服务+邮件客户端的使用。
备注:
该次实验的iptables服务是关闭的,如果开启该服务,请将文中介绍的端口都打开,再测试。