首先下载mailx,postfix软件包:
yum -y install mailx postfix
下载完成后,启动postfix服务:
systemctl start --now postfix #centos7/8上使用此命令启动postfix服务
service postfix start #在centos6上使用此命令启动postfix服务
验证mail是否可以发送邮件:
首先下载mailx,postfix软件包:
yum -y install mailx postfix
下载完成后,启动postfix服务:
systemctl start --now postfix #centos7/8上使用此命令启动postfix服务
service postfix start #在centos6上使用此命令启动postfix服务
验证mail是否可以发送邮件: