1、安装sendmail或postfix (邮件传送代理MTA),本教程使用sendmail软件。
(标注:如果直接使用外部邮箱发送邮件可以不需要配置sendmail或postfix,直接把这两个软件关掉,直接跳到第3步:配置mail即可实现)
[root@ssticentos65 ~]# yum -y install sendmail #在线yum安装sendmail
[root@ssticentos65 ~]# /etc/init.d/sendmail start #启动sendmail服务
[root@ssticentos65 ~]# /etc/init.d/sendmail status #查看sendmail启动情况
sendmail dead but subsys locked #sendmail进程锁住,原因是postfix服务启动导致sendmail服务进程锁住,需要关闭postfix服务。
sm-client (pid 1759) is running...
[root@ssticentos65 ~]# /etc/init.d/postfix stop #暂停postfix服务提示失败,原因是postfix进程正在使用,需要使用kill命令杀掉postfix进程
Shutting down postfix: [FAILED]
[root@ssticentos65 ~]# /etc/init.d/postfix status #查看postfix服务可以查看到进程号
master (pid 1647) is running...
[root@ssticentos65 ~]# kill -9 1647 #杀掉postfix服务进程号
[root@ssticentos65 ~]# /etc/init.d/postfix status #查看postfix状态
master dead but pid file exists
[root@ssticentos65 ~]# chkco