mutt+esmtp+shell,轻松实现邮件自动发送并且使用灵活,不需要MTA也能发信件
* fetchmail负责收信
* procmail负责过滤、分拣邮件
* mutt是邮件阅读、撰写工具
* esmtp负责发送邮件
#系统环境 root@A-host ~]# cat /etc/redhat-release CentOS release 6.9 (Final) #1.安装 [root@A-host ~]# yum install mutt -y [root@A-host ~]# yum install esmtp -y #2.配置MUTT [root@A-host ~]# vim ~/.muttrc set sendmail = "/usr/bin/esmtp -v -X /root/.esmtplog" [root@A-host ~]# touch /root/.esmtplog [root@A-host ~]# chmod 0710 /root/.esmtplog #3.配置ESMTP [root@A-host ~]# vim ~/.esmtprc identity "xxxxx@163.com" hostname smtp.163.com:25 username "邮箱账号" password "邮箱密码" starttls required [root@A-host ~]# chmod 710 ~/.esmtprc #MUTT也可以这样配置、 set sendmail="/usr/bin/esmtp" set use_envelope_from=yes set from="Name<qxxxxx@163.com>" 发件人 set use_from=yes set edit_headers=yes (参看esmtp官网) http://esmtp.sourceforge.net/manual.html
#发信测试(如下表示成功) [root@A-host ~]# echo 'welcom' | mutt -s 'qinzc' honey-z@qq.com Connected to MTA StartTLS OK (256 bits) From qindongjiang@163.com: 250 Mail OK To honey-z@qq.com: 250 Mail OK Message data: . Message sent: 250 Mail OK queued as smtp8,DMCowACXNnMp3odb4k5DOw--.53276S3 1535630890 Disconnected to MTA
停留在世界边缘,与之惜别