配置邮件
1.配置邮件
[root@backup ~]# yum install mailx -y
[root@backup ~]# vim /etc/mail.rc
set from=123@qq.com
set smtp=smtps://smtp.qq.com:465
set smtp-auth-user=123@qq.com
set smtp-auth-password=xxxxxx
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/
2.验证能否成功的发送邮件
[root@backup ~]# mkdir /server/scripts -p
[root@backup ~]# cat /server/scripts/check_client_data.sh
#!/bin/bash
#1.定义变量
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SRC=/backup