msmtp
下载msmtp
http://sourceforge.net/projects/msmtp/files/msmtp/
# xz -d msmtp-1.6.5.tar.xz
# tar xvf msmtp-1.6.5.tar -C /usr/local/src/
# mkdir /usr/local/msmtp
# ./configure –prefix=/usr/local/msmtp –with-ssl=openssl
# make && make install
# cd /usr/local/msmtp/bin && ./msmtp –version
# mkdir /usr/local/msmtp/etc
Msmtp配置
# vim /usr/local/msmtp/etc/msmtprc
account default
host smtp.139.com #你的发送邮件服务器
port 25
from ***@139.com #要从哪个邮箱发出
auth login
tls off
user ***@139.com #邮箱用户名
password *** #邮箱密码
logfile /var/log/mmlog
#chmod 600 /usr/local/msmtp/etc/msmtprc
测试
# /usr/local/msmtp/bin/msmtp **@qq.com
Mutt
# yum install opsenssl mutt libntlm libgsasl -y
Mutt配置
系统全局设置
# vim /etc/Muttrc
set sendmail="/usr/local/msmtp/bin/msmtp"
set use_from=yes
set realname="***@139.com"
set editor="vim"
# echo “test” |mutt -s “hello” **@qq.com
tips:因为现在邮箱都有反垃圾设置(比较严格),测试只有139邮箱可也正常发送