<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[centos6+msmtp+mutt实现SMTP发邮件]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[服务器类]]></category>
<pubDate>Thu, 01 Mar 2012 16:25:12 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	下载msmtp软件，当前最新版1.4.27<br/>http://downloads.sourceforge.net/project/msmtp/msmtp/1.4.27/msmtp-1.4.27.tar.bz2<br/>1、编译软件<br/>tar jxvf msmtp-1.4.27.tar.bz2<br/>cd&nbsp;&nbsp;msmtp-1.4.27<br/>./configure --prefix=/usr/local/msmtp<br/>make<br/>make install<br/>　<br/>2、看一下配置文件在哪里<br/># /usr/local/msmtp/bin/msmtp --version<br/>msmtp version 1.4.27<br/>Platform: x86_64-unknown-linux-gnu<br/>TLS/SSL library: OpenSSL<br/>Authentication library: built-in<br/>Supported authentication methods:<br/>plain cram-md5 external login <br/>IDN support: enabled<br/>NLS: enabled, LOCALEDIR is /usr/local/msmtp/share/locale<br/>Keyring support: none<br/>System configuration file name: /usr/local/msmtp/etc/msmtprc#默认配置文件的路径<br/>User configuration file name: /root/.msmtprc<br/><br/>Copyright (C) 2012 Martin Lambers and others.<br/>This is free software.&nbsp;&nbsp;You may redistribute copies of it under the terms of<br/>the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.<br/>There is NO WARRANTY, to the extent permitted by law.<br/>　<br/>3、msmtp的配置文件<br/>mkdir -p&nbsp;&nbsp;/usr/local/msmtp/etc<br/>touch /usr/local/msmtp/msmtp.log<br/><br/>vi /usr/local/msmtp/etc/msmtprc<br/>输入以下内容<br/>defaults<br/>logfile /usr/local/msmtp/msmtp.log<br/>account gmail<br/>tls on<br/>host smtp.gmail.com<br/>port 587<br/>from username@gmail.com<br/>tls_certcheck off<br/>auth login<br/>user username@gmail.com<br/>password password<br/>account default : gmail<br/><br/>4、配置mutt<br/>一般系统已经安装了，如果没有安装的话请使用 yum install mutt 安装<br/># tail -5 /etc/Muttrc<br/>#vi /etc/Muttrc.local<br/><br/>set sendmail="/usr/local/msmtp/bin/msmtp"<br/>set realname="测试服务器"<br/>set use_from="yes"<br/>set charset="UTF-8"<br/>set editor="vi"<br/><br/>5、测试一下发送邮件<br/>#echo "测试邮件内容" &#124; mutt -s "测试邮件主题" username@domain.com<br/>tail -f /usr/local/msmtp/msmtp.log 看看有没有成功，或者进入上面的邮箱看看是否收到邮件。<br/>Tags - <a href="http://www.zhanghaijun.com/tags/mutt/" rel="tag">mutt</a> , <a href="http://www.zhanghaijun.com/tags/msmtp/" rel="tag">msmtp</a> , <a href="http://www.zhanghaijun.com/tags/smtp/" rel="tag">smtp</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] centos6+msmtp+mutt实现SMTP发邮件]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>