set from=ipenx@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=ipenx@qq.com
set smtp-auth-password=jdxeqwaxbxiosoqp ##<--这里填的是邮箱授权码
set smtp-auth=login
set smtp-use-starttls
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/
问题2 all relevant MX records point to non-existent hosts
将dc_local_interfaces='127.0.0.1,::1'改为dc_local_interfaces='192.168.39.30'
#修改/etc/mailname文件
改为192.168.39.30
#/etc/init.d/exim4 restart
/etc/exim4/exim4.conf.template文件里的
ignore_target_hosts 去掉 192.168.0.0/16 :
mail -v -s "test for debian" hj@king.com
发送邮件 shell
#!/bin/bash
root=`dirname $0`
curDate=`date +%Y-%m-%d -d "-24hour"`
csvFileName="test-${curDate}.csv";
echo "body" | mailx -s "主题" -a $root/$csvFileName hcj@firemail.wang