<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿权的书房]]></title> 
<link>http://www.aslibra.com/blog/index.php</link> 
<description><![CDATA[技术经验分享，资料收集，偶尔晾几张相片，感言生活]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿权的书房]]></copyright>
<item>
<link>http://www.aslibra.com/blog/post/google_email_system_standard_howto.php</link>
<title><![CDATA[如何使用google的企业邮箱]]></title> 
<author>hqlulu &lt;hqlulu@163.com&gt;</author>
<category><![CDATA[Mail]]></category>
<pubDate>Wed, 20 Jan 2010 11:17:45 +0000</pubDate> 
<guid>http://www.aslibra.com/blog/post/google_email_system_standard_howto.php</guid> 
<description>
<![CDATA[ 
	要试用google的企业邮箱，只需要你有一个域名即可，当然，人家对cn域名不支持。<br/><br/>对于邮件系统，一般有如下的问题需要处理：<br/><br/>1 高稳定性的服务器维护<br/>2 垃圾邮件的维护<br/>3 用户的管理<br/><br/>在google的企业邮箱，提供的服务挺好：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Gmail企业邮箱是Google通过Gmail平台，向中小企业、家庭团体、学校组织等提供的免费邮箱服务，它的特点，我总结有三：<br/><br/>　　一是，使用自己的域名作为邮箱后缀，比如我用自己的域名qasn.com设立了我的专有邮箱kong#qasn.com;一般企业邮箱就是要达到这样的效果，用企业网站相同后缀的邮箱。<br/><br/>　　二是，免费，标准版和教育版都是免费的，而且最多可以创建50个相同后缀的邮箱;专业版是需要付费的，50美元每年每个账户。一般中小企业用标准版就够了。<br/><br/>　　三是，享受免费7G的超大容量。<br/><br/>　　这样的优势你还花钱购买服务低劣的企业邮箱吗?</div></div><br/><br/>使用步骤：<br/><br/><strong>1 申请启用</strong><br/><br/><a href="http://www.google.com/a/cpanel/domain/new?hl=zh-CN" target="_blank">注册 Google 企业应用标准版</a><br/>填写你的域名即可，比如aslibra.com<br/><br/><strong>2 填写好你的信息</strong><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">注册 Google 企业应用标准版 （第 2 步，共 3 步）<br/>Google 企业应用标准版仅限于 50 个用户帐户。您想拥有更多用户帐户或其他高级功能吗？请免费试用 Google 企业应用专业版。</div></div><br/><br/>这步骤填写完了就基本可以了，国家地区里，选择中国香港吧，选择中国说不支持<br/><br/><strong>3 填写管理员账号</strong><br/><br/>启用后，你就可以登录管理了，比如<br/><a href="http://www.google.com/a/aslibra.com/" target="_blank">http://www.google.com/a/aslibra.com/</a><br/><br/><strong>4 启动 Google 企业应用套件</strong><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">要启动 Google 企业应用套件，您需要验证您拥有您的域名 - 365dog.com。 验证域名的所有权 使用指南</div></div><br/><br/>验证域名所有权我觉得cname比较好，到域名管理的后台操作一下就好<br/><br/>提交后会提示你：我们正在验证域名所有权。完成这一过程可能会需要 48 小时。<br/><br/><strong>5 激活电子邮件</strong><br/><br/>在验证完毕后，你可以激活电子邮件服务，默认情况下是这样的：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">电子邮件 - 无效 <br/>7 GB 的存储空间，并提供可帮助用户快速找到信息的搜索工具。<br/>激活电子邮件</div></div><br/><br/>激活的时候填写好相应的mx记录即可，其实很简单：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">MX 服务器地址 优先级 <br/>ASPMX.L.GOOGLE.COM. 10 <br/>ALT1.ASPMX.L.GOOGLE.COM. 20 <br/>ALT2.ASPMX.L.GOOGLE.COM. 20 <br/>ASPMX2.GOOGLEMAIL.COM. 30 <br/>ASPMX3.GOOGLEMAIL.COM. 30 <br/>ASPMX4.GOOGLEMAIL.COM. 30 <br/>ASPMX5.GOOGLEMAIL.COM. 30</div></div><br/><br/>验证过程提示可能需要1个小时左右，但这个过程已经可以给此域名的用户发邮件了<br/>但用户不能发邮件，除非验证完毕。<br/><br/><strong>6 用pop和smtp收信</strong><br/><br/>接收邮件服务器 (POP3)： pop.gmail.com<br/>发送邮件服务器 (SMTP)：smtp.gmail.com <br/>用户名：输入用户名（包括 @aslibra.com）<br/>都需要勾选安全ssl<br/><br/>更多阅读：<br/>1 <a href="http://www.chedong.com/blog/archives/001420.html" target="_blank">免费企业邮箱： Google app企业邮局的申请</a><br/>2 <a href="http://www.aiweb.cn/Content/2007/83.html" target="_blank">Google Apps 企业邮箱pop设置</a><br/>3 <a href="http://www.google.com/apps/intl/zh-CN/business/index.html" target="_blank">企业应用套件的主页</a><br/>4 <a href="http://www.google.com/a/help/intl/zh-CN/admins/resources/setup/" target="_blank">开始使用 Google 企业应用套件的快捷步骤</a><br/>5 不是企业用户？<a href="http://www.google.com/apps/intl/zh-CN/group/index.html" target="_blank">试试标准版</a> <br/>Tags - <a href="http://www.aslibra.com/blog/go.php/tags/gmail/" rel="tag">gmail</a> , <a href="http://www.aslibra.com/blog/go.php/tags/google/" rel="tag">google</a> , <a href="http://www.aslibra.com/blog/go.php/tags/email/" rel="tag">email</a>
]]>
</description>
</item><item>
<link>http://www.aslibra.com/blog/post/postfix_setting_dns_spf.php</link>
<title><![CDATA[postfix基本配置和设定DNS]]></title> 
<author>hqlulu &lt;hqlulu@163.com&gt;</author>
<category><![CDATA[Mail]]></category>
<pubDate>Tue, 05 Jan 2010 13:07:59 +0000</pubDate> 
<guid>http://www.aslibra.com/blog/post/postfix_setting_dns_spf.php</guid> 
<description>
<![CDATA[ 
	使用postfix发送邮件，需要你对本身配置做些修正，另外，也需要你设置相应的DNS，否则发送邮件会容易当做垃圾邮件。<br/><br/>我们做几个步骤来看看收信的影响：<br/><br/>1 安装后不设置<br/>2 设置hostname和domain<br/>3 设置MX记录<br/>4 设置SPF<br/><br/>以下说明的信息为了去除隐私信息，做过一些名称修改：<br/><br/><strong>= 1 没有任何配置 =</strong><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.114.181.20 with SMTP id d20cs1238waf;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 4 Jan 2010 17:33:21 -0800 (PST)<br/>Received: by 10.141.90.17 with SMTP id s17mr7576023rvl.196.1262655201126;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:33:21 -0800 (PST)<br/>Return-Path: <root@localhost.localdomain><br/>Received: from localhost.localdomain ([219.232.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 20si58728702pwj.8.2010.01.04.17.33.18;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:33:19 -0800 (PST)<br/>Received-SPF: neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@localhost.localdomain) client-ip=219.232.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@localhost.localdomain) smtp.mail=root@localhost.localdomain<br/>Received: by localhost.localdomain (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 7BF5120DF2C; Mon,&nbsp;&nbsp;4 Jan 2010 21:33:09 -0500 (EST)<br/>To: your-email@gmail.com<br/>Subject: test in 95<br/>Message-Id: <20100105023309.7BF5120DF2C@localhost.localdomain><br/>Date: Mon,&nbsp;&nbsp;4 Jan 2010 21:33:09 -0500 (EST)<br/>From: root@localhost.localdomain (root)<br/><br/>test</div></div><br/><br/>我们看到，发信人是root@localhost.localdomain，明显不对的<br/>回复邮件也肯定收不到，我们至少需要用户能够回复，当然，除非你不想。<br/><br/><strong>= 2 设置hostname和domain =</strong><br/><br/><div class="code">postconf -e &quot;myhostname=aslibra.com&quot;<br/>postconf -e &quot;mydomain=mail.aslibra.com&quot;<br/>postfix reload</div><br/><br/>postfix里面修改参数可以用以上的方式，检查参数<br/>可以是 postconf myhostname<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.114.181.20 with SMTP id d20cs2044waf;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 4 Jan 2010 17:52:44 -0800 (PST)<br/>Received: by 10.142.2.14 with SMTP id 14mr7796472wfb.93.1262656364099;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:52:44 -0800 (PST)<br/>Return-Path: <root@aslibra.com><br/>Received: from aslibra.com ([219.232.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 4si15052142pwj.24.2010.01.04.17.52.43;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:52:43 -0800 (PST)<br/>Received-SPF: neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) client-ip=219.232.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) smtp.mail=root@aslibra.com<br/>Received: by aslibra.com (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 9AB3420DF2F; Mon,&nbsp;&nbsp;4 Jan 2010 21:52:34 -0500 (EST)<br/>To: your-email@gmail.com<br/>Subject: test after modify myhostname and mydomain<br/>Message-Id: <20100105025234.9AB3420DF2F@aslibra.com><br/>Date: Mon,&nbsp;&nbsp;4 Jan 2010 21:52:34 -0500 (EST)<br/>From: root@aslibra.com (root)<br/><br/>test</div></div><br/><br/>看到了吧？<br/>发信人是 root@aslibra.com 了，这用户至少知道是谁发的<br/>如果用户回复邮件，那就会发到aslibra.com指定的邮件服务器，这个是通过DNS查询判断发送到哪里的。<br/>下面来修改DNS：<br/><br/><strong>= 3 设置DNS =</strong><br/><br/>添加一条MX记录：@ MX mail.aslibra.com.<br/>再添加一条A记录： mail A your_IP<br/>一般建议不直接指向IP<br/><br/>收到的邮件无变化，忽略邮件说明。<br/><br/><strong>= 4 设置SPF =</strong><br/><br/>细心的话，可以看的出来，gmail有一段信息：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Received-SPF: neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) client-ip=219.232.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 219.232.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) smtp.mail=root@aslibra.com</div></div><br/><br/><strong>SPF是什么？</strong><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">SPF 是发送方策略框架<br/>　　(Sender Policy Framework) 的缩写，一种以IP（互联网协定）地址认证电子邮件寄件人身份的技术，是非常高效的垃圾邮件解决方案，旨在应对垃圾邮件中的一个特别问题——发送方假冒问题。当用户定义了他的域名SPF记录之后，接收邮件方会根据该用户的SPF记录来确定连接过来的IP地址是否被包含在SPF记录里面，如果在，则认为是一封正确的邮件，否则则认为是一封伪造的邮件。因此，那些发信人伪造域名的垃圾邮件在SPF的火眼金睛下再也无法隐藏，企业邮箱就可以有效地避免此类垃圾邮件。</div></div><br/><br/>设置SPF可以有简单的方法：<br/><a href="http://old.openspf.org/wizard.html" target="_blank">http://old.openspf.org/wizard.html</a><br/><br/>DNS添加一条TXT记录:<br/><br/><div class="code">v=spf1 mx a:mail.aslibra.com ~all</div><br/><br/>邮件会不一样：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.114.181.20 with SMTP id d20cs2325waf;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 4 Jan 2010 17:58:31 -0800 (PST)<br/>Received: by 10.141.100.8 with SMTP id c8mr13115112rvm.201.1262656711500;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:58:31 -0800 (PST)<br/>Return-Path: <root@aslibra.com><br/>Received: from aslibra.com ([219.232.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 35si27159111pxi.23.2010.01.04.17.58.30;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 04 Jan 2010 17:58:30 -0800 (PST)<br/>Received-SPF: pass (google.com: domain of root@aslibra.com designates 219.232.1.2 as permitted sender) client-ip=219.232.1.2;<br/>Authentication-Results: mx.google.com; spf=pass (google.com: domain of root@aslibra.com designates 219.232.1.2 as permitted sender) smtp.mail=root@aslibra.com<br/>Received: by aslibra.com (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 8C66C20DF2F; Mon,&nbsp;&nbsp;4 Jan 2010 21:58:21 -0500 (EST)<br/>To: your-email@gmail.com<br/>Subject: test after setting SPF<br/>Message-Id: <20100105025821.8C66C20DF2F@aslibra.com><br/>Date: Mon,&nbsp;&nbsp;4 Jan 2010 21:58:21 -0500 (EST)<br/>From: root@aslibra.com (root)<br/><br/>test</div></div><br/><br/>也就是通过了SPF检查，这样一般的邮件服务器都不会认为你的是垃圾邮件，除非很多人举报你。<br/>当然，能够设置PTR记录就更加完美了。<br/>Tags - <a href="http://www.aslibra.com/blog/go.php/tags/postfix/" rel="tag">postfix</a> , <a href="http://www.aslibra.com/blog/go.php/tags/mail/" rel="tag">mail</a> , <a href="http://www.aslibra.com/blog/go.php/tags/dns/" rel="tag">dns</a> , <a href="http://www.aslibra.com/blog/go.php/tags/spf/" rel="tag">spf</a>
]]>
</description>
</item><item>
<link>http://www.aslibra.com/blog/post/postfix_master_cf.php</link>
<title><![CDATA[转：POSTFIX Master.cf 配置文件中文详解]]></title> 
<author>hqlulu &lt;hqlulu@163.com&gt;</author>
<category><![CDATA[Mail]]></category>
<pubDate>Mon, 04 Jan 2010 14:02:49 +0000</pubDate> 
<guid>http://www.aslibra.com/blog/post/postfix_master_cf.php</guid> 
<description>
<![CDATA[ 
	master.cf 配置文件详解以下为例，按顺序分别说明各栏的意义以及它们的默认值<br /><strong>&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8</strong><br />cyrus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unix&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;pipe<br />&nbsp;&nbsp;flags=R user=cyrus argv=/cyrus/bin/deliver -e -m $&#123; extension &#125;<br /><br /><br /><strong>1、服务名称（server name）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;服务器组件的名称。实际的命名规则，随该服务的传送类型（第二栏）而定。<br /><br /><strong>2、传送方式 (transport type)</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;传送服务所用的通信方法。有效的传送方式包括与inet、unix与fifo 。inet方法表示服务可通过“网络套接字”(network socket)来访问，这类服务的对象可以是同系统上的其他进程，或是网络上其他主机的客户端进程。网络套接字服务的名称（第一栏），是et用服务方的“IP地址”（主机名称也可以）与“通信端口 ”（数值或/etc/service 定义的端口的符号名称）的组合来表示，例如： 192.168.1.2:25、localhost:smtp 。如果服务方恰好位于本地主机上，则 “ IP地址 ”与冒号都可以省略。 <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;unix代表“Unix domain socket”，而fifo代表“命名管道”(named pipe)。两者都是同机器不同进程之间的通信机制，而且同样使用特殊文件为通信中介。unix与fifo服务的名称与Unix标准文件名的命名规则相同，但是不包含目录路径的部分。Postfix使用服务名称来创建通信中介用的特殊文件。Unix domain socket与命名管道两者都是Unix的标准“进程间通信机制”(interprocess communications,通常简称为IPC) 。更详尽的信息，请参阅有关Unix程序设计的书籍。<br /><br /><br /><strong>各种服务的可能名称范例</strong><br /><br /><table cellspacing="0" class="t_table" ><tr><td width="108">服务名称<br /></td><td width="108">传送方式<br /></td><td width="336">说明<br /></td></tr><tr><td width="108">smtp<br /></td><td width="108">inet<br /></td><td width="336">Smtp daemon的服务名称。此为/etc/service定义的SMTP通信端口代表的名称。<br /></td></tr><tr><td width="108">127.0.0.1:10025<br /></td><td width="108">inet<br /></td><td width="336">位于loopback接口的10025通信端口的服务器组件。<br /><br /></td></tr><tr><td width="108">465<br /></td><td width="108">inet<br /></td><td width="336">位于本地主机（所有接口）的 465通信端口的服务器组件。 <br /></td></tr><tr><td width="108">maildrop<br /></td><td width="108">unix<br /></td><td width="336">一个必须透过Postfix pipe daemon 才能访问的服务器组件。 <br /></td></tr><tr><td width="108">pickup<br /></td><td width="108">fifo<br /></td><td width="336">一个必须透过FIFO机制才能访问的Postfix组件。<br /><br /></td></tr></table><br /><br /><strong>3、私有的（private）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;某些服务组件仅供Postfix系统自己使用，不开放给Postfix之外的其他软件使用。如果本栏标示为y ，表示私有访问（默认值）；n代表开放公共访问。inet类型的组件必须标示为n ，否则外界就无法访问该服务，毕竟网络套接字本身的用意，就是要开放给其他进程访问。<br /><br /><strong>4、非特权的（unpriv）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;是否使用非特权账户。默认值为y，表示服务组件运行时，只需使用mail_owner参数指定的非特权账户（默认值为postfix），即以完成任务所需的最低限度权限来提供服务。大部分postfix组件都可以使用非特权账户。对于需要root特权的服务组件，此栏必须设定为n 。<br /><br /><strong>5、改变根目录（chroot）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;是否要改变组件的工作根目录，借此提升额外的安全性。工作根目录的位置由main.cf<br />的queue_directory参数决定。此栏的默认值为y（表示要改变工作根目录），大部分的Postfix组件也都可以在chroot环境下运作。不过，标准的安装方式是让所有组件都在正常环境下运行。将服务组件放在chroot环境下，添加了许多额外的复杂事情，你应该先通盘了解chroot所带来的保障，然后再决定这样的额外安全性是否值得你多费一番设定与维护的工夫。关于chroot的问题，请参阅本章关于“chroot”的讨论。<br /><br /><strong>6、唤醒间隔(wakeup)</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;某些组件必须每隔一段时间被唤醒一次，定期执行它们的任务。Pickup daemon就是这样的一个例子。其默认休眠间隔是60秒，master daemon每隔一分钟就唤醒pickup一次，要求它检查maildrop队列是否收到新邮件。qmgr和flush daemon也是需要被定期唤醒的服务组件。在时间值之后尾随一个问号（？），表示只有在需要该组件时才予以唤醒，0表示不必唤醒。此栏的默认值为0，因为目前只有三个组件需要被定期唤醒。Postfix包预先为这三个组件设定的唤醒间隔时间，应该足以应付大部分情况，其他服务组件都不需要master的定期唤醒。<br /><br /><strong>7、进程数上限（maxproc）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;可以同时运行的进程个数的上限。如果没指定，则以main.cf的default_process_limit参数为准（其默认值为100）。如果设定为0，表示没有任何限制。如果服务器系统的资源有限，或是想让系统在某方面的表现特别好，你可以调整maxproc的值。<br /><br /><strong>8、命令（command）</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;最后一栏是运行服务的实际命令。命令中的“程序文件名”部分不必包含路径信息，因为master daemon假设所有程序文件都放在daemon_directory参数所指定的目录下（默认目录为/usr/libexec/postfix/）。Postfix的所有程序皆提供“-V”选项，可用来提高日志信息的详细程度，当我们需要解决问题时，经常利用这种方法来获得更多、更有用的调试信息。此外，你可以使用 -D选项，让Postfix 程序产生调试信息给调试程序。如果你需要知道更多关于调试的技术，请参考Postfix 包随附的DEBUG_READEM文件。 <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;每一个Postfix daemon都有自己的命令行选项。关于各个服务组件的选项，请参阅它们的在线说明书。请注意，只有Postfix提供的服务器程序才可以放在命令栏，如果你想要运行自己的命令，请使用Postfix提供的pipe daemon 。关于pipe的用法。<br /><br /><strong>时间单位</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;Postfix有一些与时间相关的参数，为了方便描述其值，Postfix提供了一组简写代号来表示时间单位：s（秒）、m（分）、h（时）、d（天）、w（周）。如果没明确注明时间单位，各时间参数以自己的默认时间单位来解读你给的值。虽然从在线说明书可查到所有时间参数的默认单位，但是谨慎的管理员不应该贸然留下模糊的解释空间，而应该明确标示给定时间值的单位。<br /><br />某些服务器组件会参考main.cf提供的参数值，但同时也提供了“-o”命令行选项，让你可以在master.cf中强制设定你要的参数值。举例来说，若要创建一个特殊的smtp服务，你可将下面内容加入master.cf配置文件：<br />smtp-quick&nbsp;&nbsp; unix&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;smtp<br />&nbsp;&nbsp;-o smtp_connect_timeout=5s<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;参数名称、等号与设定值可以紧接在一起，不必留空格。在加入本例这样的设定之后，你的系统就多了一个特殊的smtp-quick 服务，当它寄信时，如果对方服务器五秒内没有响应，就会自动断线。但是，遵照main.cf 设定值的那个smtp 服务，则使用不同的smtp_connect_timeout参数值。 <br/><br/>原文：http://bbs.51cto.com/thread-589897-1.html<br/>Tags - <a href="http://www.aslibra.com/blog/go.php/tags/postfix/" rel="tag">postfix</a> , <a href="http://www.aslibra.com/blog/go.php/tags/mail/" rel="tag">mail</a>
]]>
</description>
</item><item>
<link>http://www.aslibra.com/blog/post/postfix_system_use.php</link>
<title><![CDATA[postfix安装使用-系统账户发送邮件]]></title> 
<author>hqlulu &lt;hqlulu@163.com&gt;</author>
<category><![CDATA[Mail]]></category>
<pubDate>Sun, 03 Jan 2010 13:30:51 +0000</pubDate> 
<guid>http://www.aslibra.com/blog/post/postfix_system_use.php</guid> 
<description>
<![CDATA[ 
	postfix的安装过程非常容易！<br/><br/>参考以下<strong>安装步骤</strong>：<br/><br/><div class="code">wget http://www.postfix.cn/source/official/postfix-2.6.5.tar.gz<br/>tar xfz postfix-2.6.5.tar.gz <br/>cd postfix-2.6.5<br/>useradd postfix -M -s /sbin/nologin <br/>groupadd postdrop<br/>make<br/>make install</div><br/><br/>安装碰到问题？<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">> No <db.h> include file found. <br/>> Install the appropriate db*-devel package first. <br/><br/>可以用yum更新，17M左右：<br/>yum -y install db*-devel</div></div><br/><br/>这是最简单的安装，都是使用的默认配置，默认是使用系统账户才能发送邮件的。<br/>需要发送邮件，是需要启动服务的，如果是sendmail，那就需要启动sendmail，这里是postfix，会取代sendmail，并且兼容sendmail。<br/><br/><strong>启动postfix:</strong><br/><div class="code">postfix start</div><br/><br/>直接用系统的mail命令发送邮件看看：<br/><br/><div class="code">&#91;root@localhost postfix-2.6.5&#93;# mail your-email@gmail.com<br/>Subject: test postfix<br/>test<br/>.<br/>Cc: </div><br/><br/>看看收到的邮件的原始信息（相应的信息有修改）：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.115.58.13 with SMTP id l13cs26345wak;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 3 Jan 2010 05:13:02 -0800 (PST)<br/>Received: by 10.142.249.24 with SMTP id w24mr6307016wfh.254.1262524382509;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:13:02 -0800 (PST)<br/>Return-Path: <root@localhost.localdomain><br/>Received: from localhost.localdomain ([218.241.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 14si52469845pwi.38.2010.01.03.05.13.02;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:13:02 -0800 (PST)<br/>Received-SPF: neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@localhost.localdomain) client-ip=218.241.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@localhost.localdomain) smtp.mail=root@localhost.localdomain<br/>Received: by localhost.localdomain (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 25BA9B6EAA; Wed, 18 Nov 2009 12:15:10 +0800 (CST)<br/>To: your-email@gmail.com<br/>Subject: test postfix<br/>Message-Id: <20091118041510.25BA9B6EAA@localhost.localdomain><br/>Date: Wed, 18 Nov 2009 12:15:10 +0800 (CST)<br/>From: root@localhost.localdomain (root)<br/>test</div></div><br/><br/>为什么是root@localhost.localdomain呢，因为postfix启动时会取hostname，系统账户发送邮件会用此hostname，如果你已经正常设置了，那就是你设置的hostname，我们可以定义自己的：<br/><br/><div class="code">postconf -e &quot;myhostname=aslibra.com&quot;<br/>postfix reload</div><br/><br/>我们发送同样的邮件，收到的邮件是：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.115.58.13 with SMTP id l13cs26653wak;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 3 Jan 2010 05:22:54 -0800 (PST)<br/>Received: by 10.142.3.13 with SMTP id 13mr3309463wfc.302.1262524974528;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:22:54 -0800 (PST)<br/>Return-Path: <root@aslibra.com><br/>Received: from aslibra.com ([218.241.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 2si24602186pxi.52.2010.01.03.05.22.53;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:22:53 -0800 (PST)<br/>Received-SPF: neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) client-ip=218.241.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) smtp.mail=root@aslibra.com<br/>Received: by aslibra.com (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 725D1B6EAA; Wed, 18 Nov 2009 12:20:43 +0800 (CST)<br/>To: your-email@gmail.com<br/>Subject: test after hostname<br/>Message-Id: <20091118042043.725D1B6EAA@aslibra.com><br/>Date: Wed, 18 Nov 2009 12:20:43 +0800 (CST)<br/>From: root@aslibra.com (root)<br/><br/>test</div></div><br/><br/>你可以用php来发送邮件，比如php例子里的：<br/><br/><div class="code">&#91;root@aslibra webapps&#93;# cat mail.php <br/>&lt;?php<br/>$to&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &#039;your-email@gmail.com&#039;;<br/>$subject = &#039;the subject&#039;;<br/>$message = &#039;hello&#039;;<br/>$headers = &#039;From: webmaster@example.com&#039; . &quot;&#92;r&#92;n&quot; .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039;Reply-To: webmaster@example.com&#039; . &quot;&#92;r&#92;n&quot; .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039;X-Mailer: PHP/&#039; . phpversion();<br/><br/>mail($to, $subject, $message, $headers);<br/>?&gt; <br/>&#91;root@aslibra webapps&#93;# php mail.php </div><br/><br/>我们看看邮件是怎么样的：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.115.58.13 with SMTP id l13cs26361wak;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 3 Jan 2010 05:13:30 -0800 (PST)<br/>Received: by 10.114.23.5 with SMTP id 5mr739493waw.41.1262524410287;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:13:30 -0800 (PST)<br/>Return-Path: <br/>Received: from aslibra.com ([218.241.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 2si24598106pxi.18.2010.01.03.05.13.29;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:13:30 -0800 (PST)<br/>Received-SPF: neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) client-ip=218.241.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of root@aslibra.com) smtp.mail=root@aslibra.com<br/>Received: by aslibra.com (Postfix, from userid 0)<br/>&nbsp;&nbsp;id 1C521B6EAA; Wed, 18 Nov 2009 12:15:27 +0800 (CST)<br/>To: your-email@gmail.com<br/>Subject: the subject<br/>From: webmaster@example.com<br/>Reply-To: webmaster@example.com<br/>X-Mailer: PHP/5.1.6<br/>Message-Id: <20091118041527.1C521B6EAA@aslibra.com><br/>Date: Wed, 18 Nov 2009 12:15:27 +0800 (CST)<br/><br/>hello</div></div><br/><br/>明显，from参数是可以定制的，这个很好，这个很合适用来作为php的邮件发送处理程序。<br/><br/>我们可以切换用户来做这个：<br/><br/><div class="code">&#91;root@aslibra webapps&#93;# su www<br/>&#91;www@aslibra webapps&#93;$ php mail.php </div><br/><br/>看看我们收到的邮件：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">Delivered-To: your-email@gmail.com<br/>Received: by 10.115.58.13 with SMTP id l13cs26932wak;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 3 Jan 2010 05:35:12 -0800 (PST)<br/>Received: by 10.141.23.12 with SMTP id a12mr15722236rvj.158.1262525711961;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:35:11 -0800 (PST)<br/>Return-Path: <www@aslibra.com><br/>Received: from aslibra.com ([218.241.1.2])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTP id 10si24608922pxi.75.2010.01.03.05.35.10;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sun, 03 Jan 2010 05:35:11 -0800 (PST)<br/>Received-SPF: neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of www@aslibra.com) client-ip=218.241.1.2;<br/>Authentication-Results: mx.google.com; spf=neutral (google.com: 218.241.1.2 is neither permitted nor denied by best guess record for domain of www@aslibra.com) smtp.mail=www@aslibra.com<br/>Received: by aslibra.com (Postfix, from userid 501)<br/>&nbsp;&nbsp;id E1674B6EAA; Wed, 18 Nov 2009 12:27:34 +0800 (CST)<br/>To: your-email@gmail.com<br/>Subject: the subject<br/>From: webmaster@example.com<br/>Reply-To: webmaster@example.com<br/>X-Mailer: PHP/5.1.6<br/>Message-Id: <20091118042734.E1674B6EAA@aslibra.com><br/>Date: Wed, 18 Nov 2009 12:27:34 +0800 (CST)<br/><br/>hello</div></div><br/><br/>用户不同了，那就有所不一样哦，初次体验完毕！<br/>Tags - <a href="http://www.aslibra.com/blog/go.php/tags/postfix/" rel="tag">postfix</a> , <a href="http://www.aslibra.com/blog/go.php/tags/php/" rel="tag">php</a> , <a href="http://www.aslibra.com/blog/go.php/tags/mail/" rel="tag">mail</a>
]]>
</description>
</item><item>
<link>http://www.aslibra.com/blog/post/new_to_postfix_extmail.php</link>
<title><![CDATA[初识Postfix和extmail]]></title> 
<author>hqlulu &lt;hqlulu@163.com&gt;</author>
<category><![CDATA[Mail]]></category>
<pubDate>Sun, 03 Jan 2010 11:15:45 +0000</pubDate> 
<guid>http://www.aslibra.com/blog/post/new_to_postfix_extmail.php</guid> 
<description>
<![CDATA[ 
	邮件服务器是一个独特的领域，一直以来我都没有看，最近看了一下，发现这里包含的内容可不少。<br/><br/>在尝试之前，有问相关的人什么系统比较好，有人说extmail，所以就尝试了一下，其实配置起来也不容易。<br/>手工配置extmail可不容易，postfix的安装很简单，只是配置方面很多学问，需要研读一下《postfix中文权威指南》的，如果你以后要和邮件打交道的话。<br/>如果简单点，那就是EMOS安装完毕就好，一套extmail推出的解决方案，让你轻易就有一个邮件服务器。<br/><br/>先搞清楚几点：<br/><br/><strong>1 postfix的位置</strong><br/>postfix是MTA的角色，邮件传输代理，负责把邮件发送出去和接收互联网传到本机的邮件<br/><br/><strong>2 extmail是什么</strong><br/>extmail是perl写的一套程序，跟apache结合，可以提供给用户一个web管理界面，一来管理更多的邮件域名，二来管理用户分配，三来提供用户管理自己的邮件。<br/>实际上是扩展了postfix的功能，postfix本身就是设计的非常灵活的软件，提供很多外部软件支持。<br/><br/><strong>3 EMOS</strong><br/>配置好postfix和extmail以及相关防火墙和杀毒软件的一个CentOS，让你安装好系统就能发到机房使用。<br/><br/><strong>也就是说明什么：</strong><br/>你只是需要机器具备发送邮件的能力，那postfix就足够给系统用户用了。如果你需要开放给公司用户用，也是可以的，但你使用extmail会更加方便管理你的用户，如果你需要提供用户pop3/smtp收发信，那需要另外安装别的软件。<br/><br/>相关资料参考：<br/>1 <a href="http://postfix.org.cn/" target="_blank">http://postfix.org.cn/</a><br/>2 <a href="http://www.extmail.org/" target="_blank">http://www.extmail.org/</a><br/>3 <a href="http://www.extmail.org/forum/thread-7411-1-1.html" target="_blank">postfix 权威指南(中文版)</a><br/>4 <a href="http://www.sbear.cn/archives/63" target="_blank">postfix权威指南中文版下载</a><br/>5 <a href="http://www.extmail.org/blog/archives/extmail_installation_document.html" target="_blank">Installation Document - Extmail 安装文档</a><br/>6 <a href="http://www.extmail.org/forum/thread-11357-1-1.html" target="_blank">发布EMOS 1.4 正式版</a><br/>7 <a href="http://www.linuxdiyf.com/viewarticle.php?id=80354" target="_blank">LINUX邮件服务器搭建</a><br/>Tags - <a href="http://www.aslibra.com/blog/go.php/tags/postfix/" rel="tag">postfix</a> , <a href="http://www.aslibra.com/blog/go.php/tags/extmail/" rel="tag">extmail</a> , <a href="http://www.aslibra.com/blog/go.php/tags/mail/" rel="tag">mail</a> , <a href="http://www.aslibra.com/blog/go.php/tags/linux/" rel="tag">linux</a>
]]>
</description>
</item>
</channel>
</rss>