本文共 798 字,大约阅读时间需要 2 分钟。
wget
1 2 3 4 5 6 | bzip2 -d msmtp.bz2 tar -xvf msmtp-1.4.30. tar . /configure --prefix= /usr/local/msmtp make make install mkdir -p /usr/local/msmtp/etc/ |
cat msmtprc
1 2 3 4 5 6 7 8 9 | account default host smtp.qq.com port 25 from 529873244@qq.com auth login tls off user 529873244@qq.com password 邮箱密码 logfile /home/tong .li /msmtp .log |
cp /usr/local/msmtp/etc/msmtprc ~/.msmtprc
检测:
1 2 3 4 | msmtp -P msmtp -S ln -s /usr/local/msmtp/bin/msmtp /usr/bin/msmtp yum install mutt |
cat ~/.muttrc
1 2 3 4 5 6 | set from= "529873244@qq.com" set sendmail= "/usr/local/msmtp/bin/msmtp" #你的msmtp命令路径 set use_from= yes set realname= "529873244@qq.com" set editor= "vim" set charset= "utf-8" |
测试:
echo "test" | mutt -s "hello"
# -a:附件 -c:抄送