<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux ABC &#187; exim4</title>
	<atom:link href="http://www.linuxabc.net.cn/tag/exim4/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxabc.net.cn</link>
	<description>那些人/那些事...</description>
	<lastBuildDate>Tue, 09 Feb 2010 14:09:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>如何配置exim，通过gmail向外邮件</title>
		<link>http://www.linuxabc.net.cn/debian/how-to-setup-exim4-for-using-gmail-to-send-mail.html</link>
		<comments>http://www.linuxabc.net.cn/debian/how-to-setup-exim4-for-using-gmail-to-send-mail.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 06:28:28 +0000</pubDate>
		<dc:creator>alfie</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[exim4]]></category>

		<guid isPermaLink="false">http://www.linuxabc.net.cn/debian/how-to-setup-exim4-for-using-gmail-to-send-mail.html</guid>
		<description><![CDATA[debian使用exim4作为默认的邮件传输代理（MTA），利用它通过gmail来发送告警邮件。139邮箱是中国移动推出的一款面向个人用户的互联网邮箱，它有一项独有的功能即短信通知，利用它可以实现短信告警。
一、配置exim4-config
# dpkg-reconfigure exim4-config
说明：[]表示通过光标选择该项，&#60;&#62;表示输入的内容

1. [mail sent by smarthost; no local mail]
2. system mail name:&#160; &#60;net-mgmt.dingan.gov&#62;
3. IP-address to listen on for incoming SMTP connections: 127.0.0.1
4. Other destinations for which mail is accepted: &#60;null&#62;
5. visible domain name for local users:&#160; &#60;net-mgmt.dingan.gov&#62;
6. IP address or host name of the outgoing smarthost: &#60;smtp.gmail.com::587&#62;
7. Keep number of DNS-queries minial(Dial-on-Demand)? : [No]
8. [...]]]></description>
			<content:encoded><![CDATA[<p>debian使用exim4作为默认的邮件传输代理（MTA），利用它通过gmail来发送告警邮件。139邮箱是中国移动推出的一款面向个人用户的互联网邮箱，它有一项独有的功能即短信通知，利用它可以实现短信告警。<br />
<h3>一、配置exim4-config</h3>
<p># dpkg-reconfigure exim4-config</p>
<p><font color="#800080">说明：[]表示通过光标选择该项，&lt;&gt;表示输入的内容</font></p>
<ol>
<li>1. [mail sent by smarthost; no local mail]
<li>2. system mail name:&nbsp; &lt;net-mgmt.dingan.gov&gt;
<li>3. IP-address to listen on for incoming SMTP connections: 127.0.0.1
<li>4. Other destinations for which mail is accepted: &lt;null&gt;
<li>5. visible domain name for local users:&nbsp; &lt;net-mgmt.dingan.gov&gt;
<li>6. IP address or host name of the outgoing smarthost: &lt;smtp.gmail.com::587&gt;
<li>7. Keep number of DNS-queries minial(Dial-on-Demand)? : [No]
<li>8. split configuration into small files?: [No]</li>
</ol>
<p>因为上述的步骤只是更新了/etc/exim4.conf.conf，因此还需要执行</p>
<p># update-exim4.conf</p>
<p>这样才能更新exim4实际用到的配置文件。 </p>
<h3>二、添加gmail账号和密码</h3>
<p># chown root:Debian-exim /etc/exim4/passwd.client</p>
<p># vim&nbsp; /etc/exim4/passwd.client 添加如下行, 注意修改用户名和密码</p>
<p>gmail-smtp.l.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD&nbsp;&nbsp; </p>
<p>*.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD&nbsp;&nbsp; </p>
<p>smtp.gmail.com:yourAccountName@gmail.com:y0uRpaSsw0RD&nbsp; </p>
<h3>三、重启</h3>
<p># /etc/init.d/exim4 restart<br />
<h3>四、测试 </h3>
<p># mutt -s &#8220;exim4 test mail&#8221; 1390750xxxx@139.com&lt; mail.txt
<p>用户可以通过任一文本编辑器来创建mail.txt<br />
<h3>五、排错</h3>
<p>可以使用tail来查看exim4的日志</p>
<p># tail -f /var/log/exim4/mainlog</p>
<p>2010-02-02 00:31:21 1NcEAC-0001Al-Cr =&gt; 1390750xxxx@139.com R=smarthost =remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [74.125.95.109] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN=&#8221;C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com&#8221; </p>
<p>目标邮箱建议选用139邮箱，因为139邮箱还有短信通知，从而变相的实现短信告警功能。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxabc.net.cn/debian/how-to-setup-exim4-for-using-gmail-to-send-mail.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
