MSMTP:msmtp is an SMTP client with a sendmail compatible interface. It can be used with Mutt and other mail user agents.
MUTT:Mutt is a small but very powerful text-based mail client for Unix operating systems.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
[root@Backup tools]# yum install vim wget zlib-devel gcc gcc-c++ -y [root@Backup tools]# http://jaist.dl.sourceforge.net/project/msmtp/msmtp/1.4.32/msmtp-1.4.32.tar.bz2 [root@Backup tools]# tar jxf msmtp-1.4.32.tar.bz2 [root@Backup tools]# cd msmtp-1.4.32 [root@Backup msmtp-1.4.32]# ./configure --prefix=/usr/local/msmtp [root@Backup msmtp-1.4.32]# make && make install [root@Backup msmtp-1.4.32]# mkdir /usr/local/msmtp/etc [root@Backup msmtp-1.4.32]# cd /usr/local/msmtp/etc [root@Backup etc]# cat msmtprc account default host smtp.163.com from mail@163.com auth login port 25 user mail@163.com password admin tls off syslog on logfile /var/log/msmtp.log [root@Backup etc]# chmod 600 /usr/local/msmtp/etc/msmtprc [root@Backup etc]# yum install mutt –y root@Backup etc]# /usr/local/msmtp/bin/msmtp mail@qq.com hello,wo test [root@Backup etc]# cat >> /etc/Muttrc <<BYRD #BY:BYRD set sendmail="/usr/local/msmtp/bin/msmtp" set use_from=yes set realname="mail@163.com" set editor="vim" #BY:BYRD BYRD [root@Backup etc]# echo "内容"|mutt -s "标题" mail@qq.com |
参考:http://storysky.blog.51cto.com/628458/293005
申明:转载内容版权归原作者所有! SourceByrd's Weblog-https://note.t4x.org/system/config-msmtp-mutt/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!