0%

centos mail 发送邮件附件

将配置信息添加到/etc/mail.rc文件末尾。

1
2
3
4
5
6
7
8
9
10
11
# send email
set from=XXXXXX@163.com
set smtp=smtp.163.com:25
set smtp-auth=login
# 授权用户
set smtp-auth-user=XXXXXX@163.com
# 授权密码
set smtp-auth-password=123456
# 忽略验证
set ssl-verify=ignore
set nss-config-dir=/etc/maildbs/

echo “这是会议中的一份记录” | mail -s “会议记录” -a /home/wwwlogs/www.hebeidali.com_20190228.log.gz 2757983886@qq.com