<?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>nullTao &#124; 净空无道 &#124; Blog</title>
	<atom:link href="http://blog.nulltao.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nulltao.net</link>
	<description>自刨自吃，闲云野鹤，眼净心净，天宽地宽。</description>
	<lastBuildDate>Fri, 09 Apr 2010 09:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The strangest problem always comes to the simplest answer</title>
		<link>http://blog.nulltao.net/2010/04/the-strangest-problem-always-comes-to-the-simplest-answer/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2010/04/the-strangest-problem-always-comes-to-the-simplest-answer/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 09:50:05 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=280</guid>
		<description><![CDATA[After installed Apache, MySQL, PHP on Windows 2008 R2 64-bit, I &#8216;m facing the strangest problem ever.
My OS is 64-bit, but Apache, MySQL, PHP are all of 32-bit version. Though MySQL has official 64-bit version released, but I don&#8217;t see any benefit while Apache and PHP have not.
When phpMyAdmin is  [...]]]></description>
			<content:encoded><![CDATA[<p>After installed <code class="codecolorer text geshi"><span class="text">Apache</span></code>, <code class="codecolorer text geshi"><span class="text">MySQL</span></code>, <code class="codecolorer text geshi"><span class="text">PHP</span></code> on <code class="codecolorer text geshi"><span class="text">Windows 2008 R2 64-bit</span></code>, I &#8216;m facing the strangest problem ever.</p>
<p>My OS is 64-bit, but <code class="codecolorer text geshi"><span class="text">Apache</span></code>, <code class="codecolorer text geshi"><span class="text">MySQL</span></code>, <code class="codecolorer text geshi"><span class="text">PHP</span></code> are all of 32-bit version. Though <code class="codecolorer text geshi"><span class="text">MySQL</span></code> has official 64-bit version released, but I don&#8217;t see any benefit while <code class="codecolorer text geshi"><span class="text">Apache</span></code> and <code class="codecolorer text geshi"><span class="text">PHP</span></code> have not.
<p>When <code class="codecolorer text geshi"><span class="text">phpMyAdmin</span></code> is installed and setup, I use Firefox to access it, it took a long time but no response. I read <code class="codecolorer text geshi"><span class="text">phpMyAdmin</span></code>&#8216;s document and it says:</p>
<blockquote><p>When using the &#8220;cookie&#8221; authentication method, the mcrypt extension is strongly suggested for most users and is required  for 64–bit machines. Not using mcrypt will cause phpMyAdmin to load pages significantly slower.</p></blockquote>
<p>But I checked and checked and sure that I&#8217;ve installed <code class="codecolorer text geshi"><span class="text">mcrypt</span></code> support successfully.</p>
<p>After all, I wrote a very simple test program contains only one line: </p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_connect"><span style="color: #990000;">mysql_connect</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <a href="http://www.php.net/mysql_error"><span style="color: #990000;">mysql_error</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The same thing happened again&#8230; and the error message says:</p>
<blockquote><p><b>Warning</b>:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: [2002] A connection attempt failed because the connected party did not  (trying to connect via tcp://localhost:3306) in <b>E:\HTTPD\htdocs\test.php</b> on line <b>2</b></p>
<p><b>Warning</b>:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in <b>E:\HTTPD\htdocs\test.php</b> on line <b>2</b></p>
<p><b>Fatal error</b>:  Maximum execution time of 30 seconds exceeded in <b>E:\HTTPD\htdocs\test.php</b> on line <b>2</b></p></blockquote>
<p>But wait&#8230;</p>
<p>Here the problem is quite clear: <code class="codecolorer text geshi"><span class="text">PHP</span></code> can&#8217;t find localhost server.</p>
<p>And the reason is so simple that <code class="codecolorer text geshi"><span class="text">Windows 2008 R2</span></code> resolve localhost to <code class="codecolorer text geshi"><span class="text">::1:</span></code> in IPv6 format by default not <code class="codecolorer text geshi"><span class="text">127.0.0.1</span></code> in IPv4 format, and <code class="codecolorer text geshi"><span class="text">PHP</span></code> is not IPv6 safe. So, connection is always timeout.</p>
<p>Knowing the reason, there is no need for solution any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2010/04/the-strangest-problem-always-comes-to-the-simplest-answer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://blog.nulltao.net/2010/03/hello-world/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2010/03/hello-world/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 05:56:46 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2010/03/hello-world/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>活着真的很不容易</title>
		<link>http://blog.nulltao.net/2009/11/not-easy-to-survive/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/11/not-easy-to-survive/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:56:48 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[fml]]></category>
		<category><![CDATA[joke]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=273</guid>
		<description><![CDATA[在色魔团伙上看到在讨论惨烈的小时候，将 re 贴记录下来：

2 岁的时候，家里在农村，用的那种铸铁的烧煤的炉子，在炉子边站小板凳上学大人炒鸡蛋，一下子没有掌握好平衡一脑袋扎进去了，头发全烧没了，现在下巴还一个很大的疤；
6 岁，跟爸(ba3)爸(ba0)第一次去水上乐园，中间是普通的游泳池，两边一个不到 0.5m 的儿童区，一个
3m  [...]]]></description>
			<content:encoded><![CDATA[<p>在色魔团伙上看到在讨论惨烈的小时候，将 re 贴记录下来：</p>
<ul>
<li>2 岁的时候，家里在农村，用的那种铸铁的烧煤的炉子，在炉子边站小板凳上学大人炒鸡蛋，一下子没有掌握好平衡一脑袋扎进去了，头发全烧没了，现在下巴还一个很大的疤；</li>
<li>6 岁，跟爸(ba3)爸(ba0)第一次去水上乐园，中间是普通的游泳池，两边一个不到 0.5m 的儿童区，一个<br />
3m 的超级深水区，在左边玩够了，去右边，看样子差不多，直接跳进去了，当时完全不会游泳，只会戏水，狗刨都不会，神奇的是居然在里面非常清醒，没有任何不适感……还能看见水里的样子…完全就像后来的人与自然里面水下摄影的感觉，…然后睁眼就是差点被吓死的老爹，导致到现在都没有学会游泳，下游泳池就哆嗦；</li>
<li>8 岁的时候，光脚，一脚踩一根向上的生锈的钉子上了，当时一下子，没有觉得有什么，回家打完了破伤风爸(ba3)爸(ba0)给我挤脚里面的淤血直接疼晕过去了；</li>
<li>同年，过年时候在叔叔家玩，当时都是组合家具，中间一半是梳妆台，上面是一个玻璃门的展示柜，在家具上跳来跳去，直到上那个玻璃柜直接扣我头上，里面全是花瓶什么的巨大的玻璃制品全砸脑袋上，所以看见IKEA的高家具都有墙面固定装置觉得实在是美好；</li>
<li>12 岁，跳窗台，直接让水磨石最尖的那个角磕到膝盖下面肉皮最薄的地方，然后第一次直接看见人的骨头是啥样的了；</li>
<li>14 岁，体育课考引体向上，做这个如果会荡起来其实可以很省力气的，我荡的最好，幅度小，基本上看不出来，一次给大叫表演的时候，在 2m 高的单杠上，荡的幅度大了点，正好手上有汗，打滑，然后整个人的后脑勺、脊椎平行和水泥地亲密的接触，等我睁眼的时候已经在急救室了；</li>
<li>16 岁，班级大扫除扫房顶，用桌子摞了两层，我在上面打扫，结果桌子塌了，摔下来，正好凑巧两个桌子的边缘就像剪刀一样把外耳廓蹭出来一个2cm的口子，当时自己没觉得，直到有人注意到我的一半外衣上都是血才发现，然后大家都来看我说送我去医院，结果一个女生血晕，晕过去了，然后没办法，先送这个吧，至少我活着，去医院后缝针，然后直接回家，忘了告诉父母要每天去输液消炎，3 天后复查的时候已经化脓，赶紧用大剂量的抗生素，幸亏小时候用抗生素很少，所以很见效，否则，就成了一只耳了；</li>
<li>18 岁，大一，玩单杠，跳上去抓杠的时候，没注意旁边有一个很大的缺口，估计是电焊焊掉旁边的杠留下的，然后右臂划出来一条长10cm的血沟，现在还有3cm的伤疤；</li>
<li>去年买了一个电热水壶，插上插座就开始烧，看了半天没动静，还想这个壶是不是坏的啊，就用手指头去摸底盘，烫出来俩大水泡才反应过来，这个壶是好的，只是没水。</li>
</li>
</ul>
<p>生活还在延伸，悲剧未完待续……</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/11/not-easy-to-survive/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>纯粹显摆</title>
		<link>http://blog.nulltao.net/2009/10/just-show-off/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/10/just-show-off/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 03:07:22 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[homework]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=270</guid>
		<description><![CDATA[哎呀呀，我都说了纯粹显摆了，就不用进来看了。
功课历史上最疯狂的一个月的成果：

]]></description>
			<content:encoded><![CDATA[<p>哎呀呀，我都说了纯粹显摆了，就不用进来看了。</p>
<p>功课历史上最疯狂的一个月的成果：</p>
<p><img src="http://blog.nulltao.net/wp-content/uploads/2009/10/mu-600x230.png" alt="" title="mu" width="600" height="230" class="alignnone size-medium wp-image-271" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/10/just-show-off/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>自己动手，丰衣足食</title>
		<link>http://blog.nulltao.net/2009/10/my-own-start-page/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/10/my-own-start-page/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 02:34:15 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=267</guid>
		<description><![CDATA[浏览器的首页问题让洒家头疼已久，最初的空白页面，觉得太浪费了，然后用 Google 吧，其实用途不大，后来升级到 Firefox 的 Fast Dial 插件，感觉好多了但是还没有到完美的地步。
实在不行，只能自己动手，丰衣足食，自己用 HTML 写一个首页吧，这样想怎么控制就怎么控制了：

然后配合 Firefox 的 New Tab Homepage 插件，让新开的标签页都能显示默认的起始页，而且反正都是静态的，不在乎速度的问题了。

PS：本贴发布后深受好评，已经有好几个朋友向俺索要源代码自己修改去了。
]]></description>
			<content:encoded><![CDATA[<p>浏览器的首页问题让洒家头疼已久，最初的空白页面，觉得太浪费了，然后用 Google 吧，其实用途不大，后来升级到 Firefox 的 Fast Dial 插件，感觉好多了但是还没有到完美的地步。</p>
<p>实在不行，只能自己动手，丰衣足食，自己用 HTML 写一个首页吧，这样想怎么控制就怎么控制了：</p>
<p><a href="http://blog.nulltao.net/wp-content/uploads/2009/10/startpage.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="http://blog.nulltao.net/wp-content/uploads/2009/10/startpage-600x402.png" alt="" title="startpage" width="600" height="402" class="alignnone size-medium wp-image-268" /></a></p>
<p>然后配合 Firefox 的 <a href="http://www.cusser.net/extensions/tabhomepage/" target="_blank">New Tab Homepage</a> 插件，让新开的标签页都能显示默认的起始页，而且反正都是静态的，不在乎速度的问题了。</p>
<hr />
<p><em>PS：本贴发布后深受好评，已经有好几个朋友向俺索要源代码自己修改去了。</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/10/my-own-start-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WAMP crashes easily those days: Some notes on PHP configuration</title>
		<link>http://blog.nulltao.net/2009/09/wamp-crashes-easily-those-days-some-notes-on-php-configuration/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/09/wamp-crashes-easily-those-days-some-notes-on-php-configuration/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 18:11:26 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[wamp]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=265</guid>
		<description><![CDATA[I&#8217;ve upgrade my WAMP(Windows+Apache+MySQL+PHP) to lastest versions, but Apache crashes more often then it used to be due to incorrect configuring PHP.
Now I&#8217;ve finially got a stably working development environment. And here is some notes:


go-pear.bat dose not work.
When initializing as usual  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve upgrade my WAMP(Windows+Apache+MySQL+PHP) to lastest versions, but Apache crashes more often then it used to be due to incorrect configuring PHP.</p>
<p>Now I&#8217;ve finially got a stably working development environment. And here is some notes:</p>
<ol>
<li>
<h3><code class="codecolorer text geshi"><span class="text">go-pear.bat</span></code> dose not work.</h3>
<p>When initializing as usual using <code class="codecolorer text geshi"><span class="text">go-pear.bat</span></code> command, I got an error message:</p>
<div class="codecolorer-container dos geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">phar &quot;E:\HTTPD\php-5.3.0-Win32-VC9-x86\PEAR\go-pear.phar&quot; does <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> have a signature<br />
PHP Warning: &nbsp;require_once<span style="color: #33cc33;">(</span>phar://go-pear.phar/index.php<span style="color: #33cc33;">)</span>: failed to open stream: phar error: invalid url or non-existent phar &quot;phar://go-pear.phar/index.php&quot; <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> E:\HTTPD\php-5.3.0-Win32-VC9-x86\PEAR\go-pear.phar on line 1236</div></td></tr></tbody></table></div>
<p>So, <code class="codecolorer text geshi"><span class="text">go-pear.bar</span></code> did not work for me, but: <code class="codecolorer dos geshi"><span class="dos">php -dphar.require_hash=0 PEAR\go-pear.phar</span></code> is all right.</p>
</li>
<li>
<h3><code class="codecolorer text geshi"><span class="text">Xdebug</span></code> makes Apache crashes everytime.</h3>
<p>As I said, I&#8217;ve upgraded all components to it&#8217;s lastest version: Apache, version 2.2.13 form offical site, PHP, version VC9 x86 Thread Safe, MySQL, version 5.1.38-community.</p>
<p>Following Xdebug manual, I have to download the one matches the PHP version I&#8217;m using. So, I downloaded Xdebug 2.0.5 5.3 VC9 (32 bit), made modification to php.ini to enable Xdebug, and restart Apache.</p>
<p>From now on, Apache crashed everytime I call <code class="codecolorer php geshi"><span class="php">phpinof<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></span></code> function. I&#8217;ve tried some solution from Google ,but none of them works. Though, one page remains me of the version of PHP. And I found this on PHP for Windows download page:</p>
<blockquote>
<p><strong>Which version do I choose?</strong></p>
<p>If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP</p>
<p>If you are using PHP with IIS you should use the VC9 versions of PHP</p>
</blockquote>
<p>Change my PHP from VC6 to VC9, re-configure all settings and download Xdebug 2.0.5 5.3 VC96(32 bit), it works!</p>
</li>
<li>
<h3>Can&#8217;t make new folder when installing PEAR.</h3>
<p>After solve problems above, I came to a new one, When installing PEAR, ater set the dirs, PHP began to download and install PEAR components, installation programe breaks and shows:</p>
<div class="codecolorer-container dos geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PHP Warning: &nbsp;<a href="http://www.ss64.com/nt/mkdir.html"><span style="color: #b1b100; font-weight: bold;">mkdir</span></a><span style="color: #33cc33;">()</span>: No such file or directory <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> phar://E:/HTTPD/php-5.3.0-Win32-VC6-x86/PEAR/go-pear.phar/System.php on line 277<br />
Warning: <a href="http://www.ss64.com/nt/mkdir.html"><span style="color: #b1b100; font-weight: bold;">mkdir</span></a><span style="color: #33cc33;">()</span>: No such file or directory <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> phar://E:/HTTPD/php-5.3.0-Win32-VC6-x86/PEAR/go-pear.phar/System.php on line 277<br />
Unable to create Temporary directory <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> processing E:\HTTPD\php\PEAR\tmp.<br />
Run this script as administrator or pick another location.</div></td></tr></tbody></table></div>
<p>I&#8217;m sure nothing is wrong about dir premission. Solved this problem, I&#8217;m also sure that few people may face this, because it is due to the immature hardlink mechanism on Windows Server 2008.</p>
<p>I made hardlink named <em>php</em> to folder <em>php-5.3.0-Win32-VC6-x86</em> and I was running the programe in <em>php</em> folder. After I change my current folder to <em>php-5.3.0-Win32-VC6-x86</em>, it goes well.</p>
<p>Conclusion: harklink on Windows is still a load of crap.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/09/wamp-crashes-easily-those-days-some-notes-on-php-configuration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Update 2009/08/15-2009/08/25</title>
		<link>http://blog.nulltao.net/2009/08/update-20090815-20090825/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/08/update-20090815-20090825/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 08:46:12 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=263</guid>
		<description><![CDATA[忍不住了，还是要学习一下 Samson 的 Update 体了。
手机篇

2009/08/15 回家，途径帝都。每次回家都特倒霉，2 年前在家被偷了钱包，这次在上机场大巴前丢了手机。
上大巴后发现手机丢失，紧急报停，进了候机隔离区，找到全球通 VIP 候机室，现场转成全球通，补卡。下了灰机拽上老鼠直接去苏宁拿下 Nokia E71，回到旧都后去营业点办理品牌转移撤销业务，一切顺利。
通过 PC Suite 对上一个 Nokia E61i 进行的备份，短消息居然无法导入 E71，通讯录恢复到 2009/02/06 的备份。
突然想起来前段时间内测 QQ  [...]]]></description>
			<content:encoded><![CDATA[<p>忍不住了，还是要学习一下 <a href="http://blog.samsonis.me/" target="_blank">Samson</a> 的 <a href="http://blog.samsonis.me/tag/update/" target="_blank">Update</a> 体了。</p>
<h3>手机篇</h3>
<ol>
<li>2009/08/15 回家，途径帝都。每次回家都特倒霉，2 年前在家被偷了钱包，这次在上机场大巴前丢了手机。</li>
<li>上大巴后发现手机丢失，紧急报停，进了候机隔离区，找到全球通 VIP 候机室，现场转成全球通，补卡。下了灰机拽上老鼠直接去苏宁拿下 Nokia E71，回到旧都后去营业点办理品牌转移撤销业务，一切顺利。</li>
<li>通过 PC Suite 对上一个 Nokia E61i 进行的备份，短消息居然无法导入 E71，通讯录恢复到 2009/02/06 的备份。</li>
<li>突然想起来前段时间内测 QQ 同步助手的时候，对通讯录和短消息进行了一次备份，赶紧下载，然后恢复，神啊，居然真的恢复到了 2009/07/21 的备份，一个月的丢失完全可以接受了，唯一的问题就是放在 <i>My Folders</i> 里面的短信的目录格式丢失，都放在一个目录里面了，不过这个已经不算是什么问题了。我爱 <a href="http://mobile.qq.com/pim/" target="_blank">QQ 同步助手</a>。</li>
<li>在帝都购买 E71 入手，才发现这机器街机到什么程度，从苏宁到四惠站短短的一个小时就碰见至少6个(拿出来在手上的)，包括卖手机的大妈……</li>
<li>E71 居然内置了 GPS，很爽，配合 Google Maps 和内置的 GPS data 搭配的很好。</li>
<li>E71 的电池真耐用，用了好多天，天天 GPS + GPRS 都不怎么费电。当然了，根据莫非法则，你想让手机没电的时候就是不耗电，当你需要手机的时候才会没电。一路上完了半天的 GPS，同时用 GPRS 上 QQ、UCWEB 都没事，等到我需要打电话问路的时候，没电了……</li>
</ol>
<h3>回家篇</h3>
<ol>
<li>东航的 A320-200 真厚道，紧急出口前一排座位直接拆除，腿伸直了都碰不到前排。</li>
<li>陪家母去庄里的中信存钱，直接取白金号，插了 20+ 老头老太的队，家母甚悦。号码纸上写着：白金号，White Gold Service，太山寨了。</li>
<li>庄里的火车站的 VIP 候车室可以走光大的万里行，而且没有验资设置，用我在旧都 0 开的万里行直接进去，空调很爽，但是没有茶点。</li>
<li>光大 VIP 候车室的空调很爽，可惜没呆几分钟就被告知可以提前进站，上了火车才发现没开空调，热死，所有提前进站的人都在站台上吹风，NND，干嘛这么早赶人啊。</li>
<li>俺回家最重要的任务上就是给父母打扫垃圾，一回家家母就开始收拾冰箱：这盒巧克力快过期了，你带走吧，这次的鸭蛋不如上次的好，你带回去吃吧，这盒点心我们不爱吃，你路上吃吧，那瓶矿泉水都在家里放了好久了，不知道坏没坏，你带火车上吧，省的买了……</li>
</ol>
<h3>出游篇</h3>
<ol>
<li>去东极前去奉化和朋友汇合，还有时间就蹭医院的设备做做理疗拔拔火罐。说是哪里不好，那么那个对应的穴位拔出来的颜色就特别深。拔完了一看自己身上，这里颜色很深，恩，说明颈椎不好，那里也很深，说明腰椎不好，找来找去基本上我就是个废物了。突然发现有俩火罐拔出来颜色很浅，大喜，问朋友这是什么穴位对应身体哪里，看来我还是有好地方啊，友看过后淡淡的说，那俩不是穴位，是为了让你不乱动的……</li>
<li>到了东极才知道海水真的是蓝色的，天空也是蓝色的，平常去的海边都是黄河再现。可惜没有到过远洋，不知道远洋的海水天空会不会更蓝。</li>
<li>在内地吃海鲜是奢侈的事情，到了岛上吃蔬菜才是奢侈的。那些不认识的贝、螺实在是太可怕了，还是吃各种各样的鱼吧，这个不复杂。</li>
<li>本来以为一个 18-55 的狗头就够了，出去了才知道男人永远少一个镜头。没有200的很多景色都拍不好，18的广角基本够用，但是还是想有一个更广的。</li>
<li>东极不愧为是大陆最东端，早晨 5 点的太阳就高高挂在天上晒得睡不着觉。</li>
<li>一面是大海，一面是超大面积的平整光滑的玄武岩，美哉。</li>
<li>回到舟山，吃上了 KFC，吹上了空调，立马感觉回到了文明社会。</li>
<li>在宁波汽车总站买回旧都的车票的时候，发现一个能够刷卡的窗口，幸福的有眩晕感。</li>
</ol>
<h3>结束篇</h3>
<ol>
<li>回到学校，收到交行世博金卡，YoungPower 黑卡，建行对账单，拿着对账单申请乐当家白金卡去。</li>
<li>打开 Google Reader，超过 1k+ 的新 post 等着阅读，太可怕了……</li>
<li>两天时间总算把生活回归正常了。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/08/update-20090815-20090825/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 07:32:55 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=261</guid>
		<description><![CDATA[习惯于自己从源代码开始编译安装软件，现在要配置一个邮件服务器，以前用的 Qmail，感觉不是很好，sendmail 也被骂死了，决定改 Postfix 看看。
目的：搭建一个支持 POP3、IMAP、SMTP、WebMail 的邮件系统，支持虚拟域和虚拟账户。
操作系统：Slackware，所需软件(库)：Postfix、Cyrus SASL、Courier Auth Lib、Courier IMAP server、Courier Maildrop、amavisd-new、Clam  [...]]]></description>
			<content:encoded><![CDATA[<p>习惯于自己从源代码开始编译安装软件，现在要配置一个邮件服务器，以前用的 Qmail，感觉不是很好，sendmail 也被骂死了，决定改 <a href="http://www.postfix.org/" target="_blank">Postfix</a> 看看。</p>
<p>目的：搭建一个支持 POP3、IMAP、SMTP、WebMail 的邮件系统，支持虚拟域和虚拟账户。</p>
<p>操作系统：<a href="www.slackware.com/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">Slackware</a>，所需软件(库)：Postfix、Cyrus SASL、Courier Auth Lib、Courier IMAP server、Courier Maildrop、amavisd-new、Clam AntiVirus、MySQL、Apache、Extman/Extmail、RRDtool。</p>
<p>说明：</p>
<ul>
<li>安装操作系统的时候，只安装最基本的开发环境和库，其他的服务器软件一律不装。</li>
<li>考虑到实际用途，很可能还会需要安装 PHP 和 phpMySQL，请在安装完 Cyrus SASL 后安装 PHP，否则可能会产生依赖关系，关于 PHP 的安装，请参加本 Blog 的其他文章。</li>
<li>本人习惯于按照如下方式设定安装目录，如果您习惯其它方式，请相应的修改目录，如果您全部采用默认目录，则更简洁：
<ol>
<li>数据文件，放在 <code class="codecolorer text geshi"><span class="text">/home</span></code> 下，比如 www、mailbox。</li>
<li>大型的，需要配置、启动服务的软件，放在 <code class="codecolorer text geshi"><span class="text">/home</span></code> 下，例如 MySQL、Apache、Postfix 等。</li>
<li>不需要配置的，而且不需要独立启动的库，放在默认目录下，例如 Perl 的模块等。</li>
</ol>
</li>
</ul>
<h3>目录</h3>
<p><a href="http://blog.nulltao.net/2009/07/mail-server-on-slackware-1-prepare/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">一、安装前的准备</a></p>
<ol>
<li>系统需求</li>
<li>下载软件包</li>
<li>创建所需的用户、组和目录</li>
</ol>
<p><a href="http://blog.nulltao.net/2009/07/mail-server-on-slackware-2-install/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">二、软件包安装</a></p>
<ol>
<li>安装 MySQL</li>
<li>安装 Apache</li>
<li>安装 Cyrus SASL</li>
<li>安装 Postfix</li>
<li>安装 Courier Authlib</li>
<li>安装 Courier IMAP</li>
<li>安装 Courier Maildrop</li>
<li>安装 Spamassassin</li>
<li>安装 Amavisd-new</li>
<li>安装 Clam AntiVirus</li>
</ol>
<p><a href="http://blog.nulltao.net/2009/07/mail-server-on-slackware-3-configure/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">三、系统配置</a></p>
<ol>
<li>配置 MySQL</li>
<li>配置 Apache</li>
<li>配置 Postfix</li>
<li>配置 CYRUS-SASL</li>
<li>配置 Courier Authlib</li>
<li>配置 Courier IMAP</li>
<li>配置 Courier MailDrop</li>
<li>配置 Spamassassin</li>
<li>配置 Amavisd-new</li>
<li>配置 Clam AntiVirus</li>
</ol>
<p><a href="http://blog.nulltao.net/2009/07/mail-server-on-slackware-4-webmail/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">四、Webmail 和管理端 </a></p>
<ol>
<li>系统需求说明</li>
<li>添加数据库</li>
<li>安装 Extman/Extmail</li>
<li>配置 Apache 的虚拟主机</li>
<li>安装 RRDtool</li>
<li>配置 Extman/Extmail</li>
<li>其他配置</li>
</ol>
<p><a href="http://blog.nulltao.net/2009/07/mail-server-on-slackware-5-start/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">五、启动并且测试服务 </a></p>
<ol>
<li>启动服务</li>
<li>测试</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install LILO to MBR on CCISS device</title>
		<link>http://blog.nulltao.net/2009/07/install-lilo-to-mbr-on-cciss-device/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/install-lilo-to-mbr-on-cciss-device/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 03:39:04 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[cciss]]></category>
		<category><![CDATA[lilo]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=259</guid>
		<description><![CDATA[I was in hell when trying to get LILO installed on a CCISS driver, which is how HP SmartArray RAID card recognized as. No matter I installed LILO to MBR or Boot Record, it always failed.
Here is my solution:

After installing Slackware finished, reboot server with Installation CD.
At prompt,  [...]]]></description>
			<content:encoded><![CDATA[<p>I was in hell when trying to get LILO installed on a CCISS driver, which is how <i>HP SmartArray</i> RAID card recognized as. No matter I installed LILO to MBR or Boot Record, it always failed.</p>
<p>Here is my solution:</p>
<ol>
<li>After installing Slackware finished, reboot server with Installation CD.</li>
<li>At prompt, input:
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hugesmp.s <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cciss<span style="color: #000000; font-weight: bold;">/</span>c0d0p2 <span style="color: #007800;">rdinit</span>= ro</div></td></tr></tbody></table></div>
<p>Change <code class="codecolorer text geshi"><span class="text">hugesmp.s</span></code> to your kernel if necessary.<br />
<code class="codecolorer text geshi"><span class="text">c0d0p2</span></code> means second partition of logical drive 0 on controller 0, which is my &#8220;/&#8221; partition.</li>
<li>Login as root, modify <code class="codecolorer text geshi"><span class="text">/etc/lilo.conf</span></code>. Change <code class="codecolorer text geshi"><span class="text">boot = /dev/sda</span></code> to <code class="codecolorer text geshi"><span class="text">boot = /dev/cciss/c0d0p2</span></code>.</li>
<li>Run the command:
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">lilo <span style="color: #660033;">-M</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cciss<span style="color: #000000; font-weight: bold;">/</span>c0d0 mbr<br />
lilo</div></td></tr></tbody></table></div>
</li>
</ol>
<p>Reboot to check if everthing is right.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/install-lilo-to-mbr-on-cciss-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器：五、启动并且测试服务</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware-5-start/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware-5-start/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 08:31:32 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=257</guid>
		<description><![CDATA[1、启动服务
12345678910111213141516171819# 启动 MySQL
mysql.server start
# 启动病毒防护
su - amavis -c &#34;/home/amavis/sbin/amavisd&#34;
/home/clamav/sbin/clamd
# 启动 authlib
/home/courier/authlib/sbin/authdaemond start
# 启动 POP3 和 IMAP
/home/courier/imap/libexec/imapd.rc start
/home/courier/imap/libexec/imapd-ssl.rc  [...]]]></description>
			<content:encoded><![CDATA[<h3>1、启动服务</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># 启动 MySQL</span><br />
mysql.server start<br />
<span style="color: #666666; font-style: italic;"># 启动病毒防护</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - amavis <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;/home/amavis/sbin/amavisd&quot;</span><br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>clamd<br />
<span style="color: #666666; font-style: italic;"># 启动 authlib</span><br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>authlib<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>authdaemond start<br />
<span style="color: #666666; font-style: italic;"># 启动 POP3 和 IMAP</span><br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>imapd.rc start<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>imapd-ssl.rc start<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>pop3d.rc start<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>pop3d-ssl.rc start<br />
<span style="color: #666666; font-style: italic;"># 启动 Postfix</span><br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>postfix start<br />
<span style="color: #666666; font-style: italic;"># 启动 Extman 所需的图形统计</span><br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<span style="color: #000000; font-weight: bold;">/</span>extman<span style="color: #000000; font-weight: bold;">/</span>addon<span style="color: #000000; font-weight: bold;">/</span>mailgraph_ext<span style="color: #000000; font-weight: bold;">/</span>mailgraph-init start<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<span style="color: #000000; font-weight: bold;">/</span>extman<span style="color: #000000; font-weight: bold;">/</span>addon<span style="color: #000000; font-weight: bold;">/</span>mailgraph_ext<span style="color: #000000; font-weight: bold;">/</span>qmonitor-init start<br />
<span style="color: #666666; font-style: italic;"># 启动 Apache</span><br />
<span style="color: #c20cb9; font-weight: bold;">apachectl</span> <span style="color: #660033;">-k</span> start</div></td></tr></tbody></table></div>
<h3>2、测试</h3>
<p>执行 <strong>netstat -ap</strong>，看看已经打开被监听的端口中是否有下面的所有端口：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Active Internet connections <span style="color: #7a0874; font-weight: bold;">&#40;</span>servers and established<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Proto Recv-Q Send-Q Local Address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Foreign Address &nbsp; &nbsp; &nbsp; &nbsp; State &nbsp; &nbsp; &nbsp; PID<span style="color: #000000; font-weight: bold;">/</span>Program name<br />
tcp &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">3306</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">3377</span><span style="color: #000000; font-weight: bold;">/</span>mysqld &nbsp; &nbsp; <br />
tcp &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">*</span>:auth &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">3080</span><span style="color: #000000; font-weight: bold;">/</span>inetd &nbsp; &nbsp; &nbsp;<br />
tcp &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">*</span>:smtp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29100</span><span style="color: #000000; font-weight: bold;">/</span>master &nbsp; &nbsp;<br />
tcp6 &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:imaps &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29020</span><span style="color: #000000; font-weight: bold;">/</span>couriertcpd<br />
tcp6 &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:pop3s &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29032</span><span style="color: #000000; font-weight: bold;">/</span>couriertcpd<br />
tcp6 &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:pop3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29026</span><span style="color: #000000; font-weight: bold;">/</span>couriertcpd<br />
tcp6 &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:imap &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29013</span><span style="color: #000000; font-weight: bold;">/</span>couriertcpd<br />
tcp6 &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:http &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000; font-weight: bold;">*</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTEN &nbsp; &nbsp; &nbsp;<span style="color: #000000;">3307</span><span style="color: #000000; font-weight: bold;">/</span>httpd</div></td></tr></tbody></table></div>
<p>注：如果你没有加载 <code class="codecolorer text geshi"><span class="text">POP3-SSL</span></code> 和 <code class="codecolorer text geshi"><span class="text">IMAP-SSL</span></code> 支持，那么 <code class="codecolorer text geshi"><span class="text">pop3s</span></code> 和 <code class="codecolorer text geshi"><span class="text">imaps</span></code> 端口就不会打开。</p>
<p>然后看看 <strong>/var/log/maillog</strong> 里面是否有错误，本系统主要的日志都在这个文件里。</p>
<p>下面就是用浏览器打开 <a href="http://blog.nulltao.net#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">http://domail.ltd/extman/</a>，用 postmaster@domail.ltd:extmail*123* 登录，然后添加域、帐号并且使用邮件系统吧。</p>
<p>下面测试垃圾邮件和病毒邮件监控是否正常工作。</p>
<p>用其他的邮箱给自己的帐号发信，分别包含如下特征字符串：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*<br />
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X</div></td></tr></tbody></table></div>
<p>第一行是病毒邮件的特征字符串，第二行是 Spamassassin 的 <a href="http://spamassassin.apache.org/gtube/gtube.txt" target="_blank">GTUBE</a> 垃圾邮件特征字符串。</p>
<p>如果一切正常的话，那么病毒邮件就会显示出被隔离的字样，而垃圾邮件则自动存入垃圾邮件箱。如果没有，请检查 <code class="codecolorer text geshi"><span class="text">/var/log/maillog</span></code> 以定位问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware-5-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器：四、Webmail 和管理端</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware-4-webmail/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware-4-webmail/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 04:04:39 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=255</guid>
		<description><![CDATA[1、系统需求说明
Extman 登录时的验证码需要 libXpm 的支持，统计图表需要 RRDtool 和 Perl 的 GD 模块的支持，Extman 还需要 Perl 的 Unix::Syslog 模块支持，mailgraph_ext 需要 Perl 的 File::Tail 模块支持。可以使用 /home/www/extsuite/extmail/tools/pkg_stats.sh 来查看还缺少什么模块。
2、添加数据库
使用 phpMyAdmin 或者其他的 MySQL 客户端，在 postfix  [...]]]></description>
			<content:encoded><![CDATA[<h3>1、系统需求说明</h3>
<p>Extman 登录时的验证码需要 <code class="codecolorer text geshi"><span class="text">libXpm</span></code> 的支持，统计图表需要 <code class="codecolorer text geshi"><span class="text">RRDtool</span></code> 和 Perl 的 <code class="codecolorer text geshi"><span class="text">GD</span></code> 模块的支持，Extman 还需要 Perl 的 <code class="codecolorer text geshi"><span class="text">Unix::Syslog</span></code> 模块支持，mailgraph_ext 需要 Perl 的 <code class="codecolorer text geshi"><span class="text">File::Tail</span></code> 模块支持。可以使用 <strong>/home/www/extsuite/extmail/tools/pkg_stats.sh</strong> 来查看还缺少什么模块。</p>
<h3>2、添加数据库</h3>
<p>使用 phpMyAdmin 或者其他的 MySQL 客户端，在 <strong>postfix</strong> 表中增加如下的表和初始管理员记录：</p>
<div class="codecolorer-container sql geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br /></div></td><td><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SET</span> SQL_MODE<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;NO_AUTO_VALUE_ON_ZERO&quot;</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`alias`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`address`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`goto`</span> text <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`createdate`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`address`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`address`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`address`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ExtMail - Virtual Aliases'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`alias_domain`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`alias_domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`target_domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`created`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`modified`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`alias_domain`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`active`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`active`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`target_domain`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`target_domain`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Postfix Admin - Domain Aliases'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`domain`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`description`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`hashdirpath`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`maxalias`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`maxusers`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`maxquota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`maxnetdiskquota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`transport`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`can_signup`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`default_quota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`default_netdiskquota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`default_expire`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablesmtpd`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablesmtp`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablewebmail`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablenetdisk`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disableimap`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablepop3`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`createdate`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`expiredate`</span> <span style="color: #993333; font-weight: bold;">DATE</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`domain`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`domain`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`domain`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ExtMail - Virtual Domains'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`domain_manager`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`username`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`createdate`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`username`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Ext/Webman - Domain Admins'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`mailbox`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`username`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`uid`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`password`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`clearpwd`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">128</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`name`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`mailhost`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`maildir`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`homedir`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`quota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`netdiskquota`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`domain`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`uidnumber`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1000'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`gidnumber`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1000'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`createdate`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`expiredate`</span> <span style="color: #993333; font-weight: bold;">DATE</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablepwdchange`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablesmtpd`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablesmtp`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablewebmail`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablenetdisk`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disableimap`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablepop3`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`question`</span> text <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`answer`</span> text <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`username`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ExtMail - Virtual Mailboxes'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #ff0000;">`manager`</span> <span style="color: #66cc66;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">`username`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`password`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`type`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'postmaster'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`uid`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`name`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`question`</span> text <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`answer`</span> text <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`disablepwdchange`</span> <span style="color: #993333; font-weight: bold;">SMALLINT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`createdate`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`expiredate`</span> <span style="color: #993333; font-weight: bold;">DATE</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff0000;">`active`</span> tinyint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #ff0000;">`username`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span><span style="color: #66cc66;">=</span>utf8_unicode_ci COMMENT<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Ext/Webman - Admin Accounts'</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #ff0000;">`manager`</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`password`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`type`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`uid`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`name`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`question`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`answer`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`disablepwdchange`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`createdate`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`expiredate`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">`active`</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span><br />
<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'postmaster@domain.ltd'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'$1$BrT9qxfB$Ha81Mb5YVV6rNKNN5jmtj1'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'admin'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'root'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Super User'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'my question'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'my answer'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'2007-02-14 15:10:04'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'2010-11-08'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>创建的初始管理员用户名是 <strong>postmaster@domain.ltd</strong>，初始密码是 <strong>extmail*123*</strong>，下面会用到。</p>
<h3>3、安装 Extman/Extmail</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> extmail-1.1.0.tar.gz &nbsp;<span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> extman-1.0.0.tar.gz <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extman-1.0.0<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<span style="color: #000000; font-weight: bold;">/</span>extman<br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extmail-1.1.0<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<span style="color: #000000; font-weight: bold;">/</span>extmail<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> vmail:vmail <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-R</span></div></td></tr></tbody></table></div>
<h3>4、配置 Apache 的虚拟主机</h3>
<p>修改 <strong>/home/httpd/conf/extra/httpd-vhosts.conf</strong>，增加如下指令：</p>
<div class="codecolorer-container apache geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerAdmin</span> support@domain.ltd<br />
&nbsp; &nbsp; <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/home/www/extsuite/extmail/html&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerName</span> mail.domain.ltd<br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerAlias</span> domain.ltd<br />
&nbsp; &nbsp; <span style="color: #00007f;">ErrorLog</span> <span style="color: #7f007f;">&quot;logs/ext-error_log&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">CustomLog</span> <span style="color: #7f007f;">&quot;logs/ext-access_log&quot;</span> <span style="color: #7f007f;">&quot;common&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">ScriptAlias</span> /extman/cgi/ /home/www/extsuite/extman/cgi/<br />
&nbsp; &nbsp; <span style="color: #00007f;">Alias</span> /extman/ /home/www/extsuite/extman/html/<br />
&nbsp; &nbsp; <span style="color: #00007f;">ScriptAlias</span> /extmail/cgi/ /home/www/extsuite/extmail/cgi/<br />
&nbsp; &nbsp; <span style="color: #00007f;">Alias</span> /extmail/ /home/www/extsuite/extmail/html/<br />
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</div></td></tr></tbody></table></div>
<h3>5、安装 RRDtool</h3>
<p>将 <code class="codecolorer text geshi"><span class="text">rrdtool-1.3.8.tar.gz</span></code> 解压后，请参阅 <strong>doc/rrdbuild.txt</strong> 的指令安装 RRDtool 的依赖包和 RRDTool，注意首先执行下面的指令：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">INSTALL_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>rrdtool-1.3.8<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #800000;">${INSTALL_DIR}</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pkgconfig<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$INSTALL_DIR</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></div></td></tr></tbody></table></div>
<p>否则后面可能提示找不到依赖的库。</p>
<p>最后一步安装 <code class="codecolorer text geshi"><span class="text">rrdtool-1.3.8</span></code> 包的时候，在 <code class="codecolorer text geshi"><span class="text">make install</span></code> 后，执行：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">make</span> site-perl-instal<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>i486-linux-thread-multi<span style="color: #000000; font-weight: bold;">/</span>RRDs.pm <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span>site_perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>i486-linux-thread-multi<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>i486-linux-thread-multi<span style="color: #000000; font-weight: bold;">/</span>auto<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span>site_perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>i486-linux-thread-multi<span style="color: #000000; font-weight: bold;">/</span>auto<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-R</span></div></td></tr></tbody></table></div>
<p>安装 RRDtool 的 Perl 支持。</p>
<h3>6、配置 Extman/Extmail</h3>
<h4>6.1、extman/webman.cf</h4>
<p>编辑 <strong>/home/www/extsuite/extman/webman.cf</strong>，找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SYS_CONFIG = /var/www/extsuite/extman/<br />
SYS_LANGDIR = /var/www/extsuite/extman/lang<br />
SYS_TEMPLDIR = /var/www/extsuite/extman/html<br />
SYS_MAILDIR_BASE = /home/domains<br />
# SYS_LANG = en_US<br />
SYS_GROUPMAIL_SENDER = postmaster@extmail.org<br />
SYS_MYSQL_USER = webman<br />
SYS_MYSQL_PASS = webman<br />
SYS_MYSQL_DB = extmail<br />
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock</div></td></tr></tbody></table></div>
<p>对应修改为如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SYS_CONFIG = /home/www/extsuite/extman/<br />
SYS_LANGDIR = /home/www/extsuite/extman/lang<br />
SYS_TEMPLDIR = /home/www/extsuite/extman/html<br />
SYS_MAILDIR_BASE = /home/mailbox<br />
SYS_LANG = zh_CN<br />
SYS_GROUPMAIL_SENDER = postmaster@domain.ltd<br />
SYS_MYSQL_USER = postfix<br />
SYS_MYSQL_PASS = postfix_user_password<br />
SYS_MYSQL_DB = postfix<br />
SYS_MYSQL_SOCKET = /tmp/mysql.sock</div></td></tr></tbody></table></div>
<h4>6.2、extmail/webmail.cf</h4>
<p>将 <code class="codecolorer text geshi"><span class="text">/home/www/extsuite/extmail/webmail.cf.default</span></code> 在同目录复制为 <strong>webmail.cf</strong>，然后找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SYS_CONFIG = /var/www/extsuite/extmail/<br />
SYS_LANGDIR = /var/www/extsuite/extmail/lang<br />
SYS_TEMPLDIR = /var/www/extsuite/extmail/html<br />
SYS_SPAM_REPORT_TYPE = dspam<br />
SYS_USER_LANG = en_US<br />
SYS_MAILDIR_BASE = /home/domains<br />
SYS_MYSQL_USER = db_user<br />
SYS_MYSQL_PASS = db_pass<br />
SYS_MYSQL_DB = extmail<br />
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock<br />
SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket<br />
SYS_G_ABOOK_FILE_PATH = /var/www/extsuite/extmail/globabook.cf</div></td></tr></tbody></table></div>
<p>对应修改为如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SYS_CONFIG = /home/www/extsuite/extmail/<br />
SYS_LANGDIR = /home/www/extsuite/extmail/lang<br />
SYS_TEMPLDIR = /home/www/extsuite/extmail/html<br />
SYS_SPAM_REPORT_TYPE = spamassassin<br />
SYS_USER_LANG = zh_CN<br />
SYS_MAILDIR_BASE = /home/mailbox<br />
SYS_MYSQL_USER = postfix<br />
SYS_MYSQL_PASS = 42R854<br />
SYS_MYSQL_DB = postfix<br />
SYS_MYSQL_SOCKET = /tmp/mysql.sock<br />
SYS_AUTHLIB_SOCKET = /home/courier/authlib/var/spool/authdaemon/socket<br />
SYS_G_ABOOK_FILE_PATH = /home/www/extsuite/extmail/globabook.cf</div></td></tr></tbody></table></div>
<h3>7、其他配置</h3>
<p>修改 <strong>/home/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init</strong> 和 <strong>/home/www/extsuite/extman/addon/mailgraph_ext/qmonitor-init</strong>，分别找到：</p>
<div class="codecolorer-container perl geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MAILGRAPH_PL<span style="color: #339933;">=/</span>usr<span style="color: #339933;">/</span><a href="http://perldoc.perl.org/functions/local.html"><span style="color: #000066;">local</span></a><span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">.</span>pl<br />
MAILGRAPH_PL<span style="color: #339933;">=/</span>usr<span style="color: #339933;">/</span><a href="http://perldoc.perl.org/functions/local.html"><span style="color: #000066;">local</span></a><span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">/</span>qmonitor<span style="color: #339933;">.</span>pl</div></td></tr></tbody></table></div>
<p>相应的修改为：</p>
<div class="codecolorer-container perl geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MAILGRAPH_PL<span style="color: #339933;">=/</span>home<span style="color: #339933;">/</span>www<span style="color: #339933;">/</span>extsuite<span style="color: #339933;">/</span>extman<span style="color: #339933;">/</span>addon<span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">.</span>pl<br />
MAILGRAPH_PL<span style="color: #339933;">=/</span>home<span style="color: #339933;">/</span>www<span style="color: #339933;">/</span>extsuite<span style="color: #339933;">/</span>extman<span style="color: #339933;">/</span>addon<span style="color: #339933;">/</span>mailgraph_ext<span style="color: #339933;">/</span>qmonitor<span style="color: #339933;">.</span>pl</div></td></tr></tbody></table></div>
<p>初始化日志统计图所需要的目录：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>extsuite<span style="color: #000000; font-weight: bold;">/</span>extman<span style="color: #000000; font-weight: bold;">/</span>addon<span style="color: #000000; font-weight: bold;">/</span>mailgraph_ext<span style="color: #000000; font-weight: bold;">/</span>queue_mkrrd.sh</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware-4-webmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器：三、系统配置</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware-3-configure/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware-3-configure/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 07:36:16 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=253</guid>
		<description><![CDATA[1、配置 MySQL
首先启动 MySQL 服务器，并且修改 MySQL 的 root 用户的密码：
12mysql.server start
/home/mysql/bin/mysqladmin -u root password your_password
运行 /home/mysql/bin/mysql -u root -p，并且在提示符后输入 root 用户的密码，进入 MySQL 客户端，执行以下命令：
123456# 创建 postfix 数据库
CREATE DATABASE `postfix` DEFAULT CHARACTER SET utf8 COLLATE  [...]]]></description>
			<content:encoded><![CDATA[<h3>1、配置 MySQL</h3>
<p>首先启动 MySQL 服务器，并且修改 MySQL 的 root 用户的密码：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql.server start<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqladmin <span style="color: #660033;">-u</span> root password your_password</div></td></tr></tbody></table></div>
<p>运行 <code class="codecolorer text geshi"><span class="text">/home/mysql/bin/mysql -u root -p</span></code>，并且在提示符后输入 root 用户的密码，进入 MySQL 客户端，执行以下命令：</p>
<div class="codecolorer-container sql geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># 创建 postfix 数据库<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> <span style="color: #ff0000;">`postfix`</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">CHARACTER</span> <span style="color: #993333; font-weight: bold;">SET</span> utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_unicode_ci;<br />
# 创建同名用户，并且设置密码<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">USER</span> <span style="color: #ff0000;">'postfix'</span>@<span style="color: #ff0000;">'localhost'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'postfix_user_password'</span>;<br />
# 将 postfix 数据库的所有权限都赋予 postfix 用户<br />
<span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #ff0000;">`postfix`</span><span style="color: #66cc66;">.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'postfix'</span>@<span style="color: #ff0000;">'localhost'</span>;</div></td></tr></tbody></table></div>
<h3>2、配置 Apache</h3>
<h4>2.1、httpd.conf</h4>
<p>编辑 <strong>/home/httpd/conf/httpd.conf</strong> 文件，找到如下配置并且按照你自己的实际情况修改：</P></p>
<div class="codecolorer-container apache geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #adadad; font-style: italic;"># 设置默认字符集为 utf-8</span><br />
<span style="color: #00007f;">AddDefaultCharset</span> utf-<span style="color: #ff0000;">8</span> <br />
<br />
<span style="color: #adadad; font-style: italic;"># 设置以 vmail:vmail 的身份执行所有的 web 程序</span><br />
&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> !mpm_netware_module&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">User</span> vmail<br />
&nbsp; &nbsp; <span style="color: #00007f;">Group</span> vmail<br />
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;<br />
<br />
<span style="color: #adadad; font-style: italic;"># 服务器管理员电子邮件，在出错页面显示</span><br />
<span style="color: #00007f;">ServerAdmin</span> you@domain.tld<br />
<br />
<span style="color: #adadad; font-style: italic;"># 监听 80 端口</span><br />
<span style="color: #00007f;">ServerName</span> localhost:<span style="color: #ff0000;">80</span><br />
<br />
<span style="color: #adadad; font-style: italic;"># 设置文档主目录为 /home/www</span><br />
<span style="color: #adadad; font-style: italic;"># 我的习惯是对不同的虚拟主机使用 /home/www/domain 的目录命名习惯</span><br />
<span style="color: #adadad; font-style: italic;"># 具体可见 home/httpd/conf/extra/httpd-vhosts.conf</span><br />
<span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/home/www&quot;</span><br />
<br />
<span style="color: #adadad; font-style: italic;"># 设置 /home/www 的默认权限</span><br />
&lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/home/www&quot;</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">Indexes</span> <span style="color: #0000ff;">Includes</span> <span style="color: #0000ff;">FollowSymLinks</span> MultiViews<br />
&nbsp; &nbsp; <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">All</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span><br />
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;<br />
<br />
<span style="color: #adadad; font-style: italic;"># 设置默认索引页</span><br />
&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> dir_module&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">DirectoryIndex</span> index.html index.php<br />
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;<br />
<br />
<span style="color: #adadad; font-style: italic;"># 加载虚拟主机配置文件</span><br />
<span style="color: #00007f;">Include</span> conf/extra/httpd-vhosts.conf</div></td></tr></tbody></table></div>
<h4>2.2、httpd-vhosts.conf</h4>
<p>编辑 <strong>/home/httpd/conf/httpd.conf</strong> 文件，找到如下配置并且按照你自己的实际情况修改。我们在后面配置 Extman/Extmail 的时候同时配置该文件。</P></p>
<p><strong><font color="red">说明：</font></strong>如果有域名的 DNS 管理权限，推荐使用不同的域名表示不同服务，这样便于访问和管理，那么就需要配置该文件以支持多域名对应的虚拟主机。如果没有 DNS 管理权限，那么就只能把所有的服务都放在一个目录下，那么就不需要本文件的支持，同时上一节中的 <code class="codecolorer text geshi"><span class="text">/home/httpd/conf/httpd.conf</span></code> 文件的 <code class="codecolorer text geshi"><span class="text">Include conf/extra/httpd-vhosts.conf</span></code> 也可以注释掉。但是这种情况下，ExtMan 和 ExtMail 的 CGI 设置需要对应的修改。</p>
<h3>3、配置 Postfix</h3>
<h4>3.1、main.cf</h4>
<p>编辑 <strong>/etc/postfix/main.cf</strong> 文件，如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># LOCAL PATHNAME INFORMATION<br />
queue_directory = /home/postfix/spool<br />
command_directory = /home/postfix/sbin<br />
daemon_directory = /home/postfix/libexec<br />
data_directory = /home/postfix/var<br />
<br />
# QUEUE AND PROCESS OWNERSHIP<br />
mail_owner = postfix<br />
<br />
# INTERNET HOST AND DOMAIN NAMES<br />
myhostname = mail.$mydomain<br />
mydomain = domain.ltd<br />
<br />
# SENDING MAIL<br />
myorigin = $mydomain<br />
<br />
# RECEIVING MAIL<br />
inet_interfaces = all<br />
mydestination =<br />
<br />
# REJECTING MAIL FOR UNKNOWN LOCAL USERS<br />
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname <br />
unknown_local_recipient_reject_code = 550<br />
<br />
# TRUST AND RELAY CONTROL<br />
mynetworks_style = subnet<br />
mynetworks = 202.119.43.0/24, 127.0.0.0/8<br />
<br />
# ALIAS DATABASE<br />
alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf<br />
<br />
# DELIVERY TO MAILBOX<br />
home_mailbox = Maildir/<br />
mail_spool_directory = /home/mailbox<br />
<br />
# DEBUGGING CONTROL<br />
debug_peer_level = 2<br />
debugger_command =<br />
&nbsp; PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;<br />
&nbsp; echo where) | gdb $daemon_directory/$process_name $process_id 2&gt;&amp;1<br />
&nbsp; &gt;$config_directory/$process_name.$process_id.log &amp; sleep 5<br />
<br />
# INSTALL-TIME CONFIGURATION INFORMATION<br />
sendmail_path = /home/postfix/sbin/sendmail<br />
newaliases_path = /home/postfix/bin/newaliases<br />
mailq_path = /home/postfix/bin/mailq<br />
setgid_group = postdrop<br />
html_directory = /home/postfix/html<br />
manpage_directory = /home/postfix/man<br />
sample_directory = /etc/postfix<br />
readme_directory = /home/postfix/doc<br />
<br />
# VIRTUAL DOMAIN STORAGE<br />
virtual_mailbox_base = /home/mailbox<br />
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf,<br />
&nbsp; mysql:/etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf<br />
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf<br />
virtual_alias_domains =<br />
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf,<br />
&nbsp; mysql:/etc/postfix/mysql_virtual_alias_domain_maps.cf,<br />
virtual_uid_maps = static:2002<br />
virtual_gid_maps = static:202<br />
virtual_transport = maildrop<br />
virtual_minimum_uid = 200<br />
relay_domains = $mydestination<br />
maildrop_destination_recipient_limit = 1<br />
maildrop_destination_concurrency_limit = 1<br />
<br />
# QUOTA<br />
message_size_limit = 14336000<br />
virtual_mailbox_limit = 20971520<br />
virtual_create_maildirsize = yes<br />
virtual_mailbox_extended = yes<br />
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf<br />
virtual_mailbox_limit_override = yes<br />
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.<br />
virtual_overquota_bounce = yes<br />
<br />
# SASL<br />
smtpd_sasl_path = smtpd<br />
broken_sasl_auth_clients = yes<br />
smtpd_recipient_restrictions =<br />
&nbsp; permit_sasl_authenticated,<br />
&nbsp; permit_mynetworks,<br />
&nbsp; reject_unauth_destination<br />
smtpd_sasl_auth_enable = yes<br />
smtpd_sasl2_auth_enable = yes<br />
smtpd_sasl_local_domain = $myhostname<br />
smtpd_sasl_security_options = noanonymous<br />
smtpd_sasl_application_name = smtpd<br />
smtpd_banner=$myhostname ESMTP &quot;Version not Available&quot;<br />
smtpd_sasl_authenticated_header = yes<br />
<br />
# TLS<br />
smtpd_use_tls = yes <br />
smtpd_tls_cert_file = /etc/postfix/postfix.pem <br />
smtpd_tls_key_file = $smtpd_tls_cert_file <br />
<br />
# OPTIONAL PART <br />
smtpd_helo_required = yes <br />
disable_vrfy_command = yes <br />
smtpd_data_restrictions = reject_unauth_pipelining <br />
smtpd_etrn_restrictions = reject <br />
show_user_unknown_table_name = no<br />
<br />
# AMAVIS<br />
content_filter=smtp-amavis:[127.0.0.1]:10024</div></td></tr></tbody></table></div>
<h4>3.2、master.cf</h4>
<p>编辑 <strong>/etc/postfix/master.cf</strong> 文件。</p>
<p>找到如下的代码：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">maildrop &nbsp;unix &nbsp;- &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; pipe<br />
&nbsp; flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}</div></td></tr></tbody></table></div>
<p>修改为：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">maildrop &nbsp;unix &nbsp;- &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; pipe<br />
&nbsp; flags=DRhu user=vmail argv=/home/courier/maildrop/bin/maildrop -d ${recipient}</div></td></tr></tbody></table></div>
<p>在该文件的最后增加如下代码：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">smtp-amavis unix - &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 2 &nbsp;lmtp <br />
&nbsp; &nbsp; -o lmtp_data_done_timeout=1200 <br />
&nbsp; &nbsp; -o lmtp_send_xforward_command=yes <br />
<br />
127.0.0.1:10025 inet n &nbsp;- &nbsp; &nbsp; &nbsp; n &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; - &nbsp;smtpd <br />
&nbsp; &nbsp; -o content_filter= <br />
&nbsp; &nbsp; -o local_recipient_maps= <br />
&nbsp; &nbsp; -o relay_recipient_maps= <br />
&nbsp; &nbsp; -o smtpd_restriction_classes= <br />
&nbsp; &nbsp; -o smtpd_client_restrictions= <br />
&nbsp; &nbsp; -o smtpd_helo_restrictions= <br />
&nbsp; &nbsp; -o smtpd_sender_restrictions= <br />
&nbsp; &nbsp; -o smtpd_recipient_restrictions=permit_mynetworks,reject <br />
&nbsp; &nbsp; -o mynetworks=127.0.0.0/8 <br />
&nbsp; &nbsp; -o strict_rfc821_envelopes=yes <br />
&nbsp; &nbsp; -o smtpd_error_sleep_time=0 <br />
&nbsp; &nbsp; -o smtpd_soft_error_limit=1001 <br />
&nbsp; &nbsp; -o smtpd_hard_error_limit=1000</div></td></tr></tbody></table></div>
<h4>3.3、mysql_*.cf</h4>
<p>新建如下文件：</p>
<p><strong>/etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = password_for_postfix<br />
hosts = localhost<br />
dbname = postfix<br />
query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'</div></td></tr></tbody></table></div>
<p><strong>/etc/postfix/mysql_virtual_alias_domain_maps.cf</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = password_for_postfix<br />
hosts = localhost<br />
dbname = postfix<br />
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'</div></td></tr></tbody></table></div>
<p><strong>/etc/postfix/mysql_virtual_alias_maps.cf</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = password_for_postfix<br />
hosts = localhost<br />
dbname = postfix<br />
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'<br />
#expansion_limit = 100</div></td></tr></tbody></table></div>
<p><strong>/etc/postfix/mysql_virtual_domains_maps.cf</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = password_for_postfix<br />
hosts = localhost<br />
dbname = postfix<br />
query &nbsp;= SELECT domain FROM domain WHERE domain='%s' AND active = '1'<br />
#query = SELECT domain FROM domain WHERE domain='%s'<br />
#optional query to use when relaying for backup MX<br />
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'<br />
#expansion_limit = 100</div></td></tr></tbody></table></div>
<p><strong>/etc/postfix/mysql_virtual_mailbox_maps.cf</strong></h4>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = password_for_postfix<br />
hosts = localhost<br />
dbname = postfix<br />
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'<br />
#expansion_limit = 100</div></td></tr></tbody></table></div>
<h4>3.4、创建 SSL 证书</h4>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix <br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>openssl req <span style="color: #660033;">-x509</span> <span style="color: #660033;">-newkey</span> rsa:<span style="color: #000000;">1024</span> <span style="color: #660033;">-keyout</span> postfix.pem <span style="color: #660033;">-out</span> postfix.pem <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span></div></td></tr></tbody></table></div>
<p>按照提示输入你的组织等信息。</p>
<h4>3.5、修改权限</h4>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">640</span> &nbsp;<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>mysql_<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #c20cb9; font-weight: bold;">chgrp</span> postfix <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>mysql_<span style="color: #000000; font-weight: bold;">*</span></div></td></tr></tbody></table></div>
<h3>4、配置 CYRUS-SASL</h3>
<p>创建并且修改 <strong>/home/cyrus-sasl/lib/sasl2/smtpd.conf</strong> 文件，内容如下：</p>
<div class="codecolorer-container apache geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pwcheck_method:authdaemond<br />
log_level:<span style="color: #ff0000;">3</span><br />
srp_mda:md5<br />
password_format:crypt<br />
mech_list:PLAIN LOGIN<br />
authdaemond_path: /home/courier/authlib/var/spool/authdaemon/socket</div></td></tr></tbody></table></div>
<p>设置属性：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">chown</span> postfix:postfix <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>sasl2<span style="color: #000000; font-weight: bold;">/</span>smtpd.conf<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">400</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>sasl2<span style="color: #000000; font-weight: bold;">/</span>smtpd.conf</div></td></tr></tbody></table></div>
<h3>5、配置 Courier Authlib</h3>
<p>打开 <strong>/home/courier/authlib/etc/authlib/authdaemonrc</strong> 文件，修改 27 行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">authmodulelist=&quot;authuserdb authldap authmysql authcustom authpipe&quot;</div></td></tr></tbody></table></div>
<p>为：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">authmodulelist=&quot;authmysql&quot;</div></td></tr></tbody></table></div>
<p>修改 <strong>/home/courier/authlib/etc/authlib/authmysqlrc</strong>：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># MySQL 服务器地址<br />
MYSQL_SERVER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;localhost<br />
# MySQL 用户名<br />
MYSQL_USERNAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postfix<br />
# MySQL 密码<br />
MYSQL_PASSWORD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;password_for_postfix<br />
# 链接 MySQL 用的 sock<br />
MYSQL_SOCKET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/tmp/mysql.sock<br />
# 上面指定了使用 sock 方式，所以端口号不需要指定<br />
# MYSQL_PORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br />
MYSQL_OPT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<br />
# 数据库名<br />
MYSQL_DATABASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postfix<br />
# 需要访问的表名<br />
MYSQL_USER_TABLE &nbsp; &nbsp; &nbsp; &nbsp;mailbox<br />
# 存放加密密码的列名<br />
MYSQL_CRYPT_PWFIELD &nbsp; &nbsp; password<br />
# 存放密码明文的列名，在这里不需要<br />
# MYSQL_CLEAR_PWFIELD &nbsp; clear<br />
# 默认域名<br />
DEFAULT_DOMAIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;domain.ltd<br />
# 用户 ID 和用户组 ID<br />
MYSQL_UID_FIELD &nbsp; &nbsp; &nbsp; &nbsp; 2002<br />
MYSQL_GID_FIELD &nbsp; &nbsp; &nbsp; &nbsp; 202<br />
# 存放用户名 (email) 的列名<br />
MYSQL_LOGIN_FIELD &nbsp; &nbsp; &nbsp; username<br />
# 存放邮箱跟目录的列名，直接指定<br />
MYSQL_HOME_FIELD &nbsp; &nbsp; &nbsp; &nbsp;'/home/mailbox/'<br />
# 用户姓名列<br />
MYSQL_NAME_FIELD &nbsp; &nbsp; &nbsp; &nbsp;name<br />
# 存放用户邮箱路径的列名<br />
MYSQL_MAILDIR_FIELD &nbsp; &nbsp; maildir<br />
# MYSQL_DEFAULTDELIVERY defaultdelivery<br />
# 存放配额的列名<br />
MYSQL_QUOTA_FIELD &nbsp; &nbsp; &nbsp; quota<br />
# 附加选项列<br />
# MYSQL_AUXOPTIONS_FIELD &nbsp; &nbsp; &nbsp; &nbsp;CONCAT(&quot;disableimap=&quot;, &nbsp;disableimap, &quot;,disablepop3=&quot;, disablepop3, &quot;,disablewebmail=&quot;, disablewebmail, &quot;,sharedgroup=&quot; ,sharedgroup)<br />
# 附加 WHERE 语句<br />
MYSQL_WHERE_CLAUSE &nbsp; &nbsp; &nbsp;active='1'</div></td></tr></tbody></table></div>
<p><strong><font color="red">注意：</font></strong></p>
<ol>
<li>确认在这个文件中不能用空格键(包括行尾)，只能用 Tab 键。</li>
<li>确认只使用单引号，比如：&#8217;/var/mailbox/&#8217;</li>
<li>localhost 不能用单引号。</li>
<li>确认你的 /etc/hosts 文件中有 localhost 解析。</li>
<li>编译时如果支持 Ipv6 可能导致错误。</li>
<li>MYSQL_GID_FIELD 和 MYSQL_UID_FIELD 是 maildrop 所用到的用户(在这里是 vmail:vmail)的 UID 和 GID，而不是 MySQL 的。</li>
</ol>
<h3>6、配置 Courier IMAP</h3>
<p>修改 <strong>/home/courier/imap/etc</strong> 目录下的 <strong>imapd</strong>、<strong>imapd-ssl</strong>、<strong>pop3d</strong>、<strong>pop3d-ssl</strong> 四个文件。找到 <code class="codecolorer text geshi"><span class="text">IMAPDSTART</span></code>、 <code class="codecolorer text geshi"><span class="text">IMAPDSSLSTART</span></code>、<code class="codecolorer text geshi"><span class="text">POP3DSTART</span></code>、<code class="codecolorer text geshi"><span class="text">POP3DSSLSTART</span></code> 四行，把 <code class="codecolorer text geshi"><span class="text">NO</span></code> 修改为 <code class="codecolorer text geshi"><span class="text">YES</span></code>。如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">IMAPDSTART=YES</div></td></tr></tbody></table></div>
<p>如果你不需要 SSL 认证，则不需要修改 <strong>imapd-ssl</strong> 和 <strong>pop3d-ssl</strong> 文件。下面一步可以直接跳过。</p>
<p>创建 IMAP 和 POP3 需要的 SSL 证书：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap<span style="color: #000000; font-weight: bold;">/</span>share<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>openssl req <span style="color: #660033;">-x509</span> <span style="color: #660033;">-newkey</span> rsa:<span style="color: #000000;">1024</span> <span style="color: #660033;">-keyout</span> pop3d.pem <span style="color: #660033;">-out</span> pop3d.pem <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>openssl req <span style="color: #660033;">-x509</span> <span style="color: #660033;">-newkey</span> rsa:<span style="color: #000000;">1024</span> <span style="color: #660033;">-keyout</span> imapd.pem <span style="color: #660033;">-out</span> imapd.pem <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span></div></td></tr></tbody></table></div>
<p>按照提示输入你的组织等信息。</p>
<h3>7、配置 Courier MailDrop</h3>
<p>创建并修改 <strong>/etc/maildroprc</strong> 文件，内容如下：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">logfile <span style="color: #ff0000;">&quot;/var/log/maildrop.log&quot;</span> <br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #007800;">$SIZE</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000;">26144</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; exception <span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;xfilter <span style="color: #ff0000;">&quot;/usr/bin/spamassassin --prefspath=<span style="color: #007800;">$HOME</span>/<span style="color: #007800;">$DEFAULT</span>/.spamassassin/user_prefs &quot;</span> <br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#125;</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span> <br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>^X-Spam-Flag: <span style="color: #000000; font-weight: bold;">*</span>YES<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; exception <span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; to <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/<span style="color: #007800;">$DEFAULT</span>/.Junk/&quot;</span> <br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#125;</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">else</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; exception <span style="color: #7a0874; font-weight: bold;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; to <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/<span style="color: #007800;">$DEFAULT</span>&quot;</span> <br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#125;</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>创建日志文件并且设置正确的权限：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>maildrop.log<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> vmail:vmail <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>maildrop.log<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> a+r <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>maildroprc</div></td></tr></tbody></table></div>
<h3>8、配置 Spamassassin</h3>
<p>修改 <strong>/etc/mail/spamassassin/local.cf</strong>，找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># rewrite_header Subject *****SPAM*****<br />
# report_safe 1<br />
# required_score 5.0<br />
# use_bayes 1<br />
# bayes_auto_learn 1</div></td></tr></tbody></table></div>
<p>对应修改成如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rewrite_header Subject *****SPAM*****<br />
report_safe 0<br />
required_score 10.0<br />
use_bayes 1<br />
bayes_auto_learn 1</div></td></tr></tbody></table></div>
<p>并且最最后增加如下规则，以适应中国的邮件，减少误报的机会：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">##################################################<br />
##Follow is diables some bad rules for chinese mail<br />
##################################################<br />
score SUBJ_FULL_OF_8BITS 0.0<br />
score BASE64_ENC_TEXT 0.0<br />
score BAYES_99 0.1<br />
score BAYES_90 0.1<br />
score BAYES_80 0.1<br />
score BAYES_70 0.1<br />
score BAYES_60 0.1<br />
score FROM_ILLEGAL_CHARS 0.1<br />
score HEAD_ILLEGAL_CHARS 0.1<br />
score SUBJ_ILLEGAL_CHARS 0.1<br />
score MIME_BASE64_TEXT 0.1<br />
score FAKE_HELO_AOL 0.1<br />
score NO_RDNS_DOTCOM_HELO 0.1<br />
score CHINA_HEADER 0.1</div></td></tr></tbody></table></div>
<h3>9、配置 Amavisd-new</h3>
<p>编辑 <code class="codecolorer text geshi"><span class="text">/etc/amavisd.conf</span></code> 文件。找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$daemon_user &nbsp;= 'vscan'; &nbsp; &nbsp; # (no default; &nbsp;customary: vscan or amavis), -u<br />
$daemon_group = 'vscan'; &nbsp; &nbsp; # (no default; &nbsp;customary: vscan or amavis), -g<br />
<br />
$mydomain = 'example.com'; &nbsp; # a convenient default for other settings<br />
<br />
# $MYHOME = '/var/amavis'; &nbsp; # a convenient default for other settings, -H<br />
<br />
$QUARANTINEDIR = '/var/virusmails'; &nbsp;# -Q<br />
<br />
# $db_home &nbsp; = &quot;$MYHOME/db&quot;; &nbsp; &nbsp; &nbsp;# dir for bdb nanny/cache/snmp databases, -D<br />
# $helpers_home = &quot;$MYHOME/var&quot;; &nbsp;# working directory for SpamAssassin, -S<br />
# $lock_file = &quot;$MYHOME/var/amavisd.lock&quot;; &nbsp;# -L<br />
# $pid_file &nbsp;= &quot;$MYHOME/var/amavisd.pid&quot;; &nbsp; # -P<br />
<br />
# $myhostname = 'host.example.com'; &nbsp;# must be a fully-qualified domain name!<br />
<br />
# $final_virus_destiny &nbsp; &nbsp; &nbsp;= D_DISCARD;<br />
# $final_banned_destiny &nbsp; &nbsp; = D_BOUNCE;<br />
# $final_spam_destiny &nbsp; &nbsp; &nbsp; = D_BOUNCE;<br />
# $final_bad_header_destiny = D_PASS;<br />
<br />
# ['ClamAV-clamd',<br />
# &nbsp; \&amp;ask_daemon, [&quot;CONTSCAN {}\n&quot;, &quot;/var/run/clamav/clamd&quot;],<br />
# &nbsp; qr/\bOK$/m, qr/\bFOUND$/m,<br />
# &nbsp; qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],</div></td></tr></tbody></table></div>
<p>对应修改成如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$daemon_user &nbsp;= 'amavis'; &nbsp; &nbsp; # (no default; &nbsp;customary: vscan or amavis), -u<br />
$daemon_group = 'amavis'; &nbsp; &nbsp; # (no default; &nbsp;customary: vscan or amavis), -g<br />
<br />
$mydomain = 'domain.ltd'; &nbsp; # a convenient default for other settings<br />
<br />
$MYHOME = '/home/amavis'; &nbsp; # a convenient default for other settings, -H<br />
<br />
$QUARANTINEDIR = '/home/mailbox/virusmails'; &nbsp;# -Q<br />
<br />
$db_home &nbsp; = &quot;$MYHOME/db&quot;; &nbsp; &nbsp; &nbsp;# dir for bdb nanny/cache/snmp databases, -D<br />
$helpers_home = &quot;$MYHOME/var&quot;; &nbsp;# working directory for SpamAssassin, -S<br />
$lock_file = &quot;$MYHOME/var/amavisd.lock&quot;; &nbsp;# -L<br />
$pid_file &nbsp;= &quot;$MYHOME/var/amavisd.pid&quot;; &nbsp; # -P<br />
<br />
$myhostname = 'domain.ltd'; &nbsp;# must be a fully-qualified domain name!<br />
<br />
$final_virus_destiny &nbsp; &nbsp; &nbsp;= D_PASS;<br />
$final_banned_destiny &nbsp; &nbsp; = D_PASS;<br />
$final_spam_destiny &nbsp; &nbsp; &nbsp; = D_PASS;<br />
$final_bad_header_destiny = D_PASS;<br />
<br />
['ClamAV-clamd',<br />
&nbsp; \&amp;ask_daemon, [&quot;CONTSCAN {}\n&quot;, &quot;/tmp/clamd.socket&quot;],<br />
&nbsp; qr/\bOK$/m, qr/\bFOUND$/m,<br />
&nbsp; qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],</div></td></tr></tbody></table></div>
<h3>10、配置 Clam AntiVirus</h4>
<h4>10.1、clamd.conf</h4>
<p>修改 <code class="codecolorer text geshi"><span class="text">/home/clamav/etc/clamd.conf</span></code>，找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Example<br />
#LogFile /tmp/clamd.log<br />
#TemporaryDirectory /var/tmp<br />
#DatabaseDirectory /var/lib/clamav</div></td></tr></tbody></table></div>
<p>对应修改成如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#Example<br />
LogFile /tmp/clamd.log<br />
TemporaryDirectory /tmp<br />
DatabaseDirectory /home/clamav/var</div></td></tr></tbody></table></div>
<h4>10.2、freshclam.conf</h4>
<p>修改 <code class="codecolorer text geshi"><span class="text">/home/clamav/etc/freshclam.conf</span></code>，找到如下行：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Example<br />
#DatabaseDirectory /var/lib/clamav<br />
#UpdateLogFile /var/log/freshclam.log</div></td></tr></tbody></table></div>
<p>对应修改成如下：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Example<br />
DatabaseDirectory /home/clamav/var<br />
UpdateLogFile /var/log/freshclam.log</div></td></tr></tbody></table></div>
<h4>10.4、病毒库升级</h4>
<p>首先创建日志文件并且升级病毒库：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>freshclam.log<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">666</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>freshclam.log<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> amavis <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>freshclam.log<br />
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>freshclam</div></td></tr></tbody></table></div>
<p>设置定时更新，执行 <strong>crontab -e</strong>，增加如下指令：</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">00 08 * * * /home/clamav/bin/freshclam --quiet</div></td></tr></tbody></table></div>
<p>表示每天的 08:00 自动升级病毒库。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware-3-configure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器：二、软件包安装</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware-2-install/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware-2-install/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 19:03:41 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=251</guid>
		<description><![CDATA[1、安装 MySQL
12345678910111213tar -zxvf mysql-5.1.31.tar.gz
cd mysql-5.1.31
# 安装到 /home/mysql目录下，加入对 UTF-8 的支持，使用 mysql user，支持所有的字符和和插件
./configure --prefix=/home/mysql --with-charset=utf8 --with-extra-charsets=all --with-mysqld-user=mysql --with-plugins=all
make; make install
# 变更 /home/mysql  [...]]]></description>
			<content:encoded><![CDATA[<h3>1、安装 MySQL</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> mysql-5.1.31.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> mysql-5.1.31<br />
<span style="color: #666666; font-style: italic;"># 安装到 /home/mysql目录下，加入对 UTF-8 的支持，使用 mysql user，支持所有的字符和和插件</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #660033;">--with-charset</span>=utf8 <span style="color: #660033;">--with-extra-charsets</span>=all <span style="color: #660033;">--with-mysqld-user</span>=mysql <span style="color: #660033;">--with-plugins</span>=all<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #666666; font-style: italic;"># 变更 /home/mysql 的属主</span><br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql.mysql <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<br />
<span style="color: #666666; font-style: italic;"># 运行 MySQL 的初始化脚本</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>mysql_install_db <span style="color: #660033;">--user</span>=mysql<br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>mysql.server <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;/home/mysql/lib/mysql&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf<br />
ldconfig</div></td></tr></tbody></table></div>
<h3>2、安装 Apache</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> httpd-2.2.11.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> httpd-2.2.11</div></td></tr></tbody></table></div>
<h4>2.1、安装 APR</h4>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> srclib<span style="color: #000000; font-weight: bold;">/</span>apr<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<h4>2.2、安装 APR-Util</h4>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>apr-util<span style="color: #000000; font-weight: bold;">/</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-apr</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span>; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<h4>2.3、安装 Apache：</h4>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #666666; font-style: italic;"># 安装到 /home/httpd 目录下，支持动态链接路，支持 rewrite，支持 SSL，支持 DAV，支持代理</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>httpd <span style="color: #660033;">--enable-so</span> <span style="color: #660033;">--enable-auth-digest</span> <span style="color: #660033;">--enable-rewrite</span> <span style="color: #660033;">--enable-ssl</span> <span style="color: #660033;">--enable-dav</span> <span style="color: #660033;">--enable-dav-fs</span> <span style="color: #660033;">--enable-proxy</span> <span style="color: #660033;">--enable-proxy-ftp</span> <span style="color: #660033;">--enable-proxy-http</span> <span style="color: #660033;">--enable-proxy-balancer</span> <span style="color: #660033;">--with-apr</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--with-apr-util</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span>; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">apachectl</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>htpasswd <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span></div></td></tr></tbody></table></div>
<h3>3、安装 Cyrus SASL</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> cyrus-sasl-2.1.23.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> cyrus-sasl-2.1.23<br />
<span style="color: #666666; font-style: italic;"># 安装到 /home/cyrus-sasl 目录下</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl <span style="color: #660033;">--enable-anon</span> <span style="color: #660033;">--enable-plain</span> <span style="color: #660033;">--enable-login</span> <span style="color: #660033;">--enable-sql</span> <span style="color: #660033;">--disable-krb4</span> <span style="color: #660033;">--disable-otp</span> <span style="color: #660033;">--disable-cram</span> <span style="color: #660033;">--disable-digest</span> <span style="color: #660033;">--with-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--without-pam</span> <span style="color: #660033;">--without-saslauthd</span> <span style="color: #660033;">--without-pwcheck</span> <span style="color: #660033;">--with-dblib</span>=berkeley <span style="color: #660033;">--with-bdb-libdir</span> <span style="color: #660033;">--with-bdb-incdir</span> <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--with-plugindir</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>sasl2<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #666666; font-style: italic;"># 创建符号链接，原因见 http://www.postfix.org/SASL_README.html#build_sasl</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>sasl2<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>sasl2<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> &nbsp;<span style="color: #ff0000;">&quot;/home/cyrus-sasl/lib&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf <br />
ldconfig<br />
<span style="color: #666666; font-style: italic;"># 很多弱智软件都找不到路径或者能找到但是配置很麻烦，例如 courier-authlib 和 PHP，于是直接做个符号链接</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cyrus-sasl<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsasl2.la <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsasl2.la</div></td></tr></tbody></table></div>
<h3>4、安装 Postfix</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> postfix-2.6.2.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> postfix-2.6.2<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-f</span> Makefile.init makefiles <span style="color: #ff0000;">'CCARGS=-DHAS_MYSQL -I/home/mysql/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/home/cyrus-sasl/include/sasl -DUSE_TLS'</span> <span style="color: #ff0000;">'AUXLIBS=-L/home/mysql/lib/mysql -lmysqlclient -lz -lm -ldb -L/home/cyrus-sasl/lib -lsasl2 -lssl -lcrypto'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<p><code class="codecolorer text geshi"><span class="text">make install</span></code> 需要你指定路径，根据我的安装习惯，直接安装到 <code class="codecolorer text geshi"><span class="text">/home/postfix</span></code> 下面，但是 <code class="codecolorer text geshi"><span class="text">etc</span></code> 目录如果指定到 <code class="codecolorer text geshi"><span class="text">/home/postfix/etc</span></code>，会出现很多错误，虽然能够解决，但是太麻烦了，所以 <code class="codecolorer text geshi"><span class="text">etc</span></code> 例外，安装到默认的 <code class="codecolorer text geshi"><span class="text">/etc/postfix</span></code>目录。</p>
<p>需要指定的目录如下，默认的直接回车。</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">install_root: [/]<br />
tempdir: [/root/old/pkg/postfix-2.6.2] /tmp<br />
config_directory: [/etc/postfix]<br />
command_directory: [/usr/sbin] /home/postfix/sbin<br />
daemon_directory: [/usr/libexec/postfix] /home/postfix/libexec<br />
data_directory: [/var/lib/postfix] /home/postfix/var<br />
html_directory: [no] /home/postfix/html<br />
mail_owner: [postfix]<br />
mailq_path: [/usr/bin/mailq] /home/postfix/bin/mailq<br />
manpage_directory: [/usr/local/man] /home/postfix/man<br />
newaliases_path: [/usr/bin/newaliases] /home/postfix/bin/newaliases<br />
queue_directory: [/var/spool/postfix] /home/postfix/spool<br />
readme_directory: [no] /home/postfix/readme<br />
sendmail_path: [/usr/sbin/sendmail] /home/postfix/sbin/sendmail<br />
setgid_group: [postdrop]</div></td></tr></tbody></table></div>
<p>修改权限：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">chmod</span> a+x+g+s <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>postqueue</div></td></tr></tbody></table></div>
<h3>5、安装 Courier Authlib</h3>
<p><strong><font color="red">说明：</font></strong>Courier 系列软件包的习惯都是用非 <code class="codecolorer text geshi"><span class="text">root</span></code> 身份的用户 <code class="codecolorer text geshi"><span class="text">configure</span></code>、<code class="codecolorer text geshi"><span class="text">make</span></code>，然后再用 <code class="codecolorer text geshi"><span class="text">root</span></code> 用户 <code class="codecolorer text geshi"><span class="text">make install</span></code>。上面创建的 <code class="codecolorer text geshi"><span class="text">courier</span></code> 用户就是这里起作用的。</p>
<p><strong><font color="red">注意：</font></strong>因为我们是非标准目录安装，所以在这里特别要增加 <code class="codecolorer text geshi"><span class="text">--without-stdheaderdir</span></code> 选项，否则后面的组件无法找到 courier-authlib。</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># 出于让非 root 用户访问的权限问题，所以解压缩到 /tmp 目录下</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-jxvf</span> courier-authlib-0.62.2.tar.bz2 <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>courier-authlib-0.62.2<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> courier<br />
<span style="color: #666666; font-style: italic;"># 下面的 configure 和 make 都是以 courier 用户的身份执行</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>authlib <span style="color: #660033;">--with-authmysql</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #660033;">--with-mailuser</span>=vmail <span style="color: #660033;">--with-mailgroup</span>=vmail <span style="color: #660033;">--with-mysql-libs</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #660033;">--with-mysql-includes</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--without-stdheaderdir</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span><br />
<span style="color: #666666; font-style: italic;"># 切换到 root 用户 make install</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> install-configure<br />
<span style="color: #666666; font-style: italic;"># 修改权限</span><br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>authlib<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>authdaemon</div></td></tr></tbody></table></div>
<h3>6、安装 Courier IMAP server</h3>
<p><strong><font color="red">注意：</font></strong>设置</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">COURIERAUTHCONFIG</div></td></tr></tbody></table></div>
<p>环境变量，否则因为是非标准目录安装，找不到 courier-authlib 的路径，下面安装 Courier Maildrop 时也一样。</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># 出于让非 root 用户访问的权限问题，所以解压缩到 /tmp 目录下</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-jxvf</span> courier-imap-4.5.0.tar.bz2 <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>courier-imap-4.5.0<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> courier<br />
<span style="color: #666666; font-style: italic;"># 下面的 configure 和 make 都是以 courier 用户的身份执行</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">COURIERAUTHCONFIG</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>authlib<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>courierauthconfig<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>imap <span style="color: #660033;">--with-authmysql</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #660033;">--with-mailuser</span>=vmail <span style="color: #660033;">--with-mailgroup</span>=vmail <span style="color: #660033;">--with-mysql-libs</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #660033;">--with-mysql-includes</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span> &nbsp;<span style="color: #660033;">--enable-workarounds-for-imap-client-bugs</span> <span style="color: #660033;">--with-authchangepwdir</span> <span style="color: #660033;">--enable-unicode</span> <span style="color: #660033;">--with-trashquota</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span><br />
<span style="color: #666666; font-style: italic;"># 切换到 root 用户 make install</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> install-strip<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> install-configure</div></td></tr></tbody></table></div>
<h3>7、安装 Courier Maildrop</h3>
<p><strong><font color="red">注意：</font></strong>下面 <code class="codecolorer text geshi"><span class="text">configure</span></code> 命令参数里面的 <code class="codecolorer text geshi"><span class="text">--enable-maildrop-uid=2002 --enable-maildrop-gid=202</span></code> 中的 2002 和 202 分别对应我们最开始添加的 <code class="codecolorer text geshi"><span class="text">vmail:vmail</span></code> 的 UID 和 GID。如果你自己用其它方式增加的用户，则从 <code class="codecolorer text geshi"><span class="text">/etc/passwd</span></code> 中找到对应的 UID/GID 并且替换。</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># 出于让非 root 用户访问的权限问题，所以解压缩到 /tmp 目录下</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-jxvf</span> maildrop-2.1.0.tar.bz2 <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>maildrop-2.1.0<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">su</span> courier<br />
<span style="color: #666666; font-style: italic;"># 下面的 configure 和 make 都是以 courier 用户的身份执行</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">COURIERAUTHCONFIG</span>=<span style="color: #ff0000;">'/home/courier/authlib/bin/courierauthconfig'</span><br />
<span style="color: #666666; font-style: italic;"># 设置编译时用到的类库</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">'-I/home/mysql/include/mysql/ -I/home/courier/authlib/include'</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L/home/mysql/lib/mysql/ -L/home/courier/authlib/lib/courier-authlib/&quot;</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier<span style="color: #000000; font-weight: bold;">/</span>maildrop <span style="color: #660033;">--enable-sendmail</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> <span style="color: #660033;">--enable-trusted-users</span>=<span style="color: #ff0000;">'root vmail'</span> <span style="color: #660033;">--enable-syslog</span>=<span style="color: #000000;">1</span> <span style="color: #660033;">--enable-maildirquota</span> <span style="color: #660033;">--enable-maildrop-uid</span>=<span style="color: #000000;">2002</span> <span style="color: #660033;">--enable-maildrop-gid</span>=<span style="color: #000000;">202</span> <span style="color: #660033;">--with-trashquota</span> <span style="color: #660033;">--with-dirsync</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span><br />
<span style="color: #666666; font-style: italic;"># 切换到 root 用户 make install</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<h3>8、安装 Spamassassin </h3>
<p>执行以下指令进入 Perl CPAN 环境：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-MCPAN</span> <span style="color: #660033;">-e</span> shell</div></td></tr></tbody></table></div>
<p>依次安装如下模块：</p>
<ol>
<li>YAML</li>
<li>Digest::SHA1</li>
<li>LWP</li>
<li>Digest::BubbleBabble</li>
<li>Net::DNS</li>
<li>HTTP::Date</li>
<li>IO::Zlib</li>
<li>MIME::Base64</li>
<li>DB_File</li>
<li>Mail::SPF</li>
<li>IP::Country::Fast</li>
<li>Net::Ident</li>
<li>IO::Socket::INET6</li>
<li>IO::Socket::SSL</li>
<li>Compress::Zlib</li>
<li>Time::HiRes</li>
<li>Mail::DKIM</li>
<li>Mail::DomainKeys</li>
<li>DBI</li>
<li>DBD::mysql</li>
<li>Encode::Detect</li>
<li>Apache::Test</li>
<li>Mail::SpamAssassin</li>
</ol>
<p><strong><font color="red">说明：</font></strong></p>
<ul>
<li>安装 <code class="codecolorer text geshi"><span class="text">Net::DNS</span></code> 的时候，会询问是否进行测试，推荐选择 No。</li>
<li>
<p>在 <code class="codecolorer text geshi"><span class="text">CPAN</span></code> 里安装 <code class="codecolorer text geshi"><span class="text">DBD::mysql</span></code> 的时候，因为我们不是在标准路径下安装，所以会提示找不到 <code class="codecolorer text geshi"><span class="text">mysql_config</span></code> 错误。解决方法：返回 Shell(BASH)，执行如下命令：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.cpan<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>DBD-mysql-<span style="color: #000000;">4.012</span>-<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL --mysql_config=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
</li>
<li>安装 <code class="codecolorer text geshi"><span class="text">Apache::Test</span></code> 的时候，会询问你 <code class="codecolorer text geshi"><span class="text">httpd</span></code> 和 <code class="codecolorer text geshi"><span class="text">apxs</span></code> 的安装位置，对应输入 <code class="codecolorer text geshi"><span class="text">/home/httpd/bin/httpd</span></code> 和 <code class="codecolorer text geshi"><span class="text">/home/httpd/bin/apxs</span></code>。</li>
</ul>
<h3>9、安装 Amavisd-new</h3>
<p>同上，进入 <code class="codecolorer text geshi"><span class="text">CPAN</span></code> 界面，以此安装如下模块：</p>
<ol>
<li>Archive::Tar</li>
<li>Archive::Zip</li>
<li>Convert::UUlib</li>
<li>Convert::BinHex</li>
<li>Mail::Internet</li>
<li>Net::Server</li>
<li>Net::SMTP</li>
<li>Digest::MD5</li>
<li>IO::Stringy</li>
<li>Unix::Syslog</li>
<li>BerkeleyDB</li>
<li>MIME::Tools</li>
<li>Convert::TNEF</li>
</ol>
<p>准备安装用到的环境，创建 Amavisd-new 所用到的目录并设置权限：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">750</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>db<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> amavis:amavis <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis</div></td></tr></tbody></table></div>
<p>设置垃圾邮件存放的目录并且设置权限：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mailbox<span style="color: #000000; font-weight: bold;">/</span>virusmails <br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">750</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mailbox<span style="color: #000000; font-weight: bold;">/</span>virusmails<span style="color: #000000; font-weight: bold;">/</span> <br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> amavis <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mailbox<span style="color: #000000; font-weight: bold;">/</span>virusmails<span style="color: #000000; font-weight: bold;">/</span></div></td></tr></tbody></table></div>
<p>安装 Amavisd-new，拷贝文件到对应的目录：</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zvxf</span> amavisd-new-2.6.4.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> amavisd-new-2.6.4<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> amavisd <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> root <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>amavisd <br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>amavisd <br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> amavisd.conf <span style="color: #000000; font-weight: bold;">/</span>etc<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> root <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>amavisd.conf <br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>amavisd.conf</div></td></tr></tbody></table></div>
<h3>10、安装 Clam AntiVirus</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> clamav-0.95.2.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> clamav-0.95.2<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav<span style="color: #000000; font-weight: bold;">/</span>var<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> clamav:clamav <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-R</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware-2-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Slackware 下全部从源代码安装邮件服务器：一、安装前的准备</title>
		<link>http://blog.nulltao.net/2009/07/mail-server-on-slackware-1-prepare/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/mail-server-on-slackware-1-prepare/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 02:26:14 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=249</guid>
		<description><![CDATA[1、系统需求
在安装前请确认您的系统已经安装了以下的组件或者类库，如果没有请先安装：

Perl w/ CPAN
OpenSSL
Berkeley Database / libdb

2、下载软件包
下面是我们必须用的软件包，请分别下载：

Postfix：消息传送代理/电子邮件服务器。下载地址
Cyrus SASL：简单认证安全层。下载地址
Courier Auth Lib：嵌入式身份认证系统。下载地址
Courier IMAP server：提供 POP3 和 IMAP 服务。下载地址
Courier Maildrop：投递邮件。下载地址
amavisd-new：位于 MTA  [...]]]></description>
			<content:encoded><![CDATA[<h3>1、系统需求</h3>
<p>在安装前请确认您的系统已经安装了以下的组件或者类库，如果没有请先安装：</p>
<ol>
<li>Perl w/ CPAN</li>
<li>OpenSSL</li>
<li>Berkeley Database / libdb</li>
</ol>
<h3>2、下载软件包</h3>
<p>下面是我们必须用的软件包，请分别下载：</p>
<ol>
<li><a href="http://www.postfix.org/" target="_blank">Postfix</a>：消息传送代理/电子邮件服务器。<a href="http://www.postfix.org/download.html" target="_blank">下载地址</a></li>
<li><a href="http://asg.web.cmu.edu/sasl/" target="_blank">Cyrus SASL</a>：简单认证安全层。<a href="http://ftp.andrew.cmu.edu/pub/cyrus-mail/" target="_blank">下载地址</a></li>
<li><a href="http://www.courier-mta.org/authlib/" target="_blank">Courier Auth Lib</a>：嵌入式身份认证系统。<a href="http://www.courier-mta.org/download.php#authlib" target="_blank">下载地址</a></li>
<li><a href="http://www.courier-mta.org/imap/" target="_blank">Courier IMAP server</a>：提供 POP3 和 IMAP 服务。<a href="http://www.courier-mta.org/download.php#imap" target="_blank">下载地址</a></li>
<li><a href="http://www.courier-mta.org/maildrop/" target="_blank">Courier Maildrop</a>：投递邮件。<a href="http://www.courier-mta.org/download.php#maildrop" target="_blank">下载地址</a></li>
<li><a href="http://www.ijs.si/software/amavisd/" target="_blank">amavisd-new</a>：位于 MTA 和内容过滤器之间的接口。<a href="http://www.ijs.si/software/amavisd/#download" target="_blank">下载地址</a></li>
<li><a href="http://www.clamav.net/" target="_blank">Clam AntiVirus</a>：对邮件进行病毒检查。<a href="http://www.clamav.net/download/sources" target="_blank">下载地址</a></li>
<li><a href="http://www.mysql.com/" target="_blank">MySQL</a>：数据库服务器，用来存储虚拟域、虚拟账户等信息。<a href="http://dev.mysql.com/downloads/" target="_blank">下载地址</a></li>
<li><a href="http://httpd.apache.org/" target="_blank">Apache</a>：Web 服务器，用来给 Extman/Extmail 提供 Web 服务。<a href="http://httpd.apache.org/download.cgi" target="_blank">下载地址</a></li>
<li><a href="http://www.extmail.org/" target="_blank">Extman/Extmail</a>：网页客户端和网页管理端。<a href="http://www.extmail.org/cgi-bin/download.cgi" target="_blank">下载地址</a></li>
<li><a href="http://oss.oetiker.ch/rrdtool/" target="_blank">RRDtool</a>：数据日志可视化库，Extman 生成统计图时使用。<a href="http://oss.oetiker.ch/rrdtool/pub/?M=D" target="_blank">下载地址</a></li>
</ol>
<p>下面是可选组件，请根据情况下载：</p>
<ol>
<li><a href="http://www.php.net/" target="_blank">PHP</a>：如果你想使用 phpMyAdmin，或者同时提供其他的 Web 服务，则需要 PHP 支持。<a href="http://www.php.net/downloads.php" target="_blank">下载地址</a></li>
<li><a href="http://www.phpmyadmin.net/" target="_blank">phpMyAdmin</a>：提供一个简单、方便的 Web 数据库管理界面。<a href="http://www.phpmyadmin.net/home_page/downloads.php" target="_blank">下载地址</a></li>
</ol>
<h3>3、创建所需的用户、组和目录</h3>
<p>创建所需要的用户组和用户，为了不和 Slackware 的默认 GID/UID 冲突，所以我们从 200 和 2000 开始。如果你使用自己的 GID/UID，那么后继的配置需要注意替换成您的 GID/UID。</h3>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Slackware 默认安装有 mysql:mysql 用户组，所以不必再新增</span><br />
<span style="color: #666666; font-style: italic;"># groupadd mysql</span><br />
<span style="color: #666666; font-style: italic;"># useradd -g mysql -d /home/mysql -s /sbin/false -c &quot;MySQL&quot; mysql</span><br />
groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">200</span> postfix<br />
groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">201</span> postdrop<br />
groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">202</span> vmail<br />
groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">203</span> amavis<br />
groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">204</span> clamav<br />
useradd <span style="color: #660033;">-u</span> <span style="color: #000000;">2000</span> <span style="color: #660033;">-g</span> postfix <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> postfix<br />
useradd <span style="color: #660033;">-u</span> <span style="color: #000000;">2002</span> <span style="color: #660033;">-g</span> vmail <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> vmail<br />
useradd <span style="color: #660033;">-u</span> <span style="color: #000000;">2003</span> <span style="color: #660033;">-g</span> amavis &nbsp;<span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>amavis <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> amavis<br />
useradd <span style="color: #660033;">-u</span> <span style="color: #000000;">2004</span> <span style="color: #660033;">-g</span> clamav <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>clamav <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;Clam Antivirus&quot;</span> clamav<br />
useradd <span style="color: #660033;">-u</span> <span style="color: #000000;">2010</span> <span style="color: #660033;">-g</span> <span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>courier <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> courier</div></td></tr></tbody></table></div>
<p>创建邮件（虚拟域、虚拟帐号）所在的目录，并修改权限。</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mailbox<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> vmail:vmail <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mailbox <span style="color: #660033;">-R</span></div></td></tr></tbody></table></div>
<p>创建 Web 服务(虚拟主机)所在目录，并且修改权限。</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www<br />
<span style="color: #c20cb9; font-weight: bold;">chown</span> vmail:vmail <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #660033;">-R</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/mail-server-on-slackware-1-prepare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PHP w/ IMAP support on Slackware</title>
		<link>http://blog.nulltao.net/2009/07/installing-php-w-imap-support-on-slackware/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/07/installing-php-w-imap-support-on-slackware/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 14:57:12 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=247</guid>
		<description><![CDATA[When installing PostfixAdmin, I found that I need to re-compile PHP to support IMAP, but later more problems came to me.
Environment:&#160;Linux mail 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 Intel(R) Xeon(R) CPU E5405  @ 2.00GHz GenuineIntel GNU/Linux
Q:&#160;PHP configure utility reports that  [...]]]></description>
			<content:encoded><![CDATA[<p>When installing PostfixAdmin, I found that I need to re-compile PHP to support IMAP, but later more problems came to me.</p>
<p><strong>Environment:&nbsp;</strong>Linux mail 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 Intel(R) Xeon(R) CPU E5405  @ 2.00GHz GenuineIntel GNU/Linux</p>
<h3><strong>Q:&nbsp;</strong>PHP configure utility reports that there is no IMAP support on my system.</h3>
<p><strong>A:&nbsp;</strong>According to <a href="http://cn2.php.net/manual/en/imap.installation.php" target="_blank">PHP Manual: IMAP Installation</a>, I need to get something named <strong>c-client</strong>, and compile PHP with <code class="codecolorer text geshi"><span class="text">--with-imap[=DIR]</span></code>.</p>
<h3><strong>Q:&nbsp;</strong>Where to get <strong>c-client</strong>?</h3>
<p><strong>A:&nbsp;</strong>Googled answer <a href="http://www.washington.edu/imap/" target="_blank">IMAP Information Center</a>: The software and documentation is available at <a href="ftp://ftp.cac.washington.edu/imap#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">ftp://ftp.cac.washington.edu/imap</a>. UW IMAP toolkit<br />
source distribution is available at <a href="ftp://ftp.cac.washington.edu/mail/imap.tar.Z#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">ftp://ftp.cac.washington.edu/mail/imap.tar.Z</a>.</p>
<h3><strong>Q:&nbsp;</strong>So strange a package, how to make and install?</h3>
<p><strong>A:&nbsp;</strong>Normally, you should run configure, make and make install to install a package from source, but no configure found and make is different.</p>
<p>First, make sure you have OpenSSL installed, and then follow the setps:</p>
<p>Extract the archive downloaded to <code class="codecolorer text geshi"><span class="text">/usr/local</span></code> folder named imap-2007e</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>imap-2007e<br />
<span style="color: #666666; font-style: italic;"># slx means Linux using -lcrypt to get the crypt() function</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> slx<br />
<span style="color: #666666; font-style: italic;"># BTW: you are supposed to fail this step, see notes below</span><br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> include<br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> lib<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> c-client<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">*</span>.h ..<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">*</span>.c ..<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ..<span style="color: #000000; font-weight: bold;">/</span>c-client<span style="color: #000000; font-weight: bold;">/</span>c-client.a ..<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libc-client.a</div></td></tr></tbody></table></div>
<h3>NOTE:</h3>
<blockquote>
<p>If you like me discover that &#8220;make slx&#8221; fails, but you&#8217;re damn sure you&#8217;ve openssl installed then, it might be that the lib and include paths on your distribution are different then the defaults provided in the imap-2007e (or imap-XXXXx). To modify go to dir src/osdep/unix and edit Makefile, around L55:</p>
<div class="codecolorer-container ini geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Extended flags needed for SSL. &nbsp;You may need to modify.<br />
<br />
<span style="color: #000099;">SSLDIR</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/usr/local/ssl</span><br />
<span style="color: #000099;">SSLCERTS</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLDIR<span style="">&#41;</span>/certs</span><br />
<span style="color: #000099;">SSLKEYS</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLCERTS<span style="">&#41;</span></span><br />
<span style="color: #000099;">SSLINCLUDE</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLDIR<span style="">&#41;</span>/include</span><br />
<span style="color: #000099;">SSLLIB</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLDIR<span style="">&#41;</span>/lib</span><br />
<br />
<span style="color: #000099;">SSLCRYPTO</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">-lcrypto</span></div></td></tr></tbody></table></div>
<p>Change SSLDIR, SSLINCLUDE and SSLIB to valid paths for Slackware. In my case, it should like this:</p>
<div class="codecolorer-container ini geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Extended flags needed for SSL. &nbsp;You may need to modify.<br />
<br />
<span style="color: #000099;">SSLDIR</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/etc/ssl</span><br />
<span style="color: #000099;">SSLCERTS</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLDIR<span style="">&#41;</span>/certs</span><br />
<span style="color: #000099;">SSLKEYS</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$<span style="">&#40;</span>SSLCERTS<span style="">&#41;</span></span><br />
<span style="color: #000099;">SSLINCLUDE</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/usr/include/openssl</span><br />
<span style="color: #000099;">SSLLIB</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/usr/lib</span><br />
<br />
<span style="color: #000099;">SSLCRYPTO</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">-lcrypto</span></div></td></tr></tbody></table></div>
<p>You should also check your ld.so.conf for valid paths.</p>
</blockquote>
<h3><strong>Q:&nbsp;</strong>How to compile PHP w/ IMAP support?</h3>
<p><strong>A:&nbsp;</strong>Finally, we&#8217;ve reached the last step. Re-compile PHP and everything is done. When configuring, just add those two imap options</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">/</span>configure ... <span style="color: #660033;">--with-imap</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>imap-2007e <span style="color: #660033;">--with-imap-ssl</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<p>Bing! Your system is ready for your imap application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/07/installing-php-w-imap-support-on-slackware/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>被 AdobeReader 浪费浪费感情一把</title>
		<link>http://blog.nulltao.net/2009/04/adobereader/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/04/adobereader/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:02:42 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[joke]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=245</guid>
		<description><![CDATA[刚才从网上down了一本电子书名为《大道至简》，传说乃一高人所做，故以景仰之心翻阅。第一页，大气磅礴的四个大字：大道至简，第二页，标题，序言，正文，全是大小不一的点，顿时如云里雾里，只见下面一行脚注，关于序言的说明请参见附录，顿时对作者的景仰之情如滔滔江水延绵不绝，但是看了附录，还是大小不一的点，再看正文也全是这样的，感慨作者多么伟大，用得如此新式编码方法方案来迷惑偶等菜鸟，遂google之，无果，正要抱憾放弃时，AdobeReader提示：宋体（简体中文）损坏，按Ok键开始使用自动更新修复……
]]></description>
			<content:encoded><![CDATA[<p>刚才从网上down了一本电子书名为《大道至简》，传说乃一高人所做，故以景仰之心翻阅。第一页，大气磅礴的四个大字：大道至简，第二页，标题，序言，正文，全是大小不一的点，顿时如云里雾里，只见下面一行脚注，关于序言的说明请参见附录，顿时对作者的景仰之情如滔滔江水延绵不绝，但是看了附录，还是大小不一的点，再看正文也全是这样的，感慨作者多么伟大，用得如此新式编码方法方案来迷惑偶等菜鸟，遂google之，无果，正要抱憾放弃时，AdobeReader提示：宋体（简体中文）损坏，按Ok键开始使用自动更新修复……</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/04/adobereader/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>倒霉24小时——Season 1</title>
		<link>http://blog.nulltao.net/2009/03/fuck-my-life-season-1/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2009/03/fuck-my-life-season-1/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 15:59:25 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TrashcaN]]></category>
		<category><![CDATA[fml]]></category>
		<category><![CDATA[joke]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=242</guid>
		<description><![CDATA[虽然过年的时候洒家许下愿心要做走技术路线的纯情小男生，但是 2009 年第一篇不得不以这个开场：
今天是3月份第一天，应该有个好的开始。
00:00-01:00 为了这个好的开始，决定早早睡觉早早起床，结果因为一通电话，打完了居然精神了，睡不着了；
01:00-02:00 睡不着觉就顺便整理一下柜子里乱七八糟的东西，结果把一个纸箱子放到柜子上面的时候居然砸到手了；
02:00-03:00 洗个热水澡吧，有助于睡眠。顺便刮下胡子，结果刮破了一个小口子。抹须后水的时候火辣火辣的疼；
03:00-04:00 躺床上发现晚上的网络不错，进校速度都很快，那么就把 HP  [...]]]></description>
			<content:encoded><![CDATA[<p>虽然过年的时候洒家许下愿心要做走技术路线的纯情小男生，但是 2009 年第一篇不得不以这个开场：</p>
<p>今天是3月份第一天，应该有个好的开始。</p>
<p><font color="blue">00:00-01:00</font> 为了这个好的开始，决定早早睡觉早早起床，结果因为一通电话，打完了居然精神了，睡不着了；</p>
<p><font color="blue">01:00-02:00</font> 睡不着觉就顺便整理一下柜子里乱七八糟的东西，结果把一个纸箱子放到柜子上面的时候居然砸到手了；</p>
<p><font color="blue">02:00-03:00</font> 洗个热水澡吧，有助于睡眠。顺便刮下胡子，结果刮破了一个小口子。抹须后水的时候火辣火辣的疼；</p>
<p><font color="blue">03:00-04:00</font> 躺床上发现晚上的网络不错，进校速度都很快，那么就把 HP 的服务器的最后一步配置完吧。一切顺利，Httpd、MySQL、PHP、SVN、FtpD 都配置的非常好，甚至 FtpD 的虚拟账户都配置的很完美。结果手贱非要把 svnRoot 目录改名为 svn。然后不小心把缓冲区的数据都发到了 console 上，不知道是哪辈子的数据，里面居然有一个分号，好死不死的是分号后面居然跟着 <code class="codecolorer text geshi"><span class="text">rm -fr /home</span></code>！一个星期的心血就这么木有了……</p>
<p><font color="blue">04:00-05:00</font> 算了，什么都做不了了，睡觉吧；</p>
<p><font color="blue">05:00-06:00</font> 睡觉；</p>
<p><font color="blue">06:00-07:00</font> 睡觉；</p>
<p><font color="blue">07:00-08:00</font> 睡觉；</p>
<p><font color="blue">08:00-09:00</font> 睡觉；</p>
<p><font color="blue">09:00-10:00</font> 睡觉；</p>
<p><font color="blue">10:00-11:00</font> 到办公室测试才下载的 VMWare ESXi Server。还特意申请了一个 HP 的本本来做一个全新的安装。开始启动……初始化……进入引导……啊哦，居然说偶只有 512M 内存，直接拒绝安装，就这么赤果果的被鄙视了……NND，老子想装俩 DOS 丫有意见啊！</p>
<p><font color="blue">11:00-12:00</font> 恩。不过偶的 DELL 的工作站配置还不错。那么在工作站上用 VMware WorkStation 虚拟出来一个服务器装 VMware ESXi Server 再装虚拟机吧。哈哈，我是天才。划分了 2CPU w/ VT support、4G MEM、100G SCSI HDD 给虚拟服务器用，应该够吧。继续启动……安装……初始化，很顺利的成功了，赞一个；</p>
<p><font color="blue">13:00-14:00</font> 研究怎么用这个 ESXi Server，下载安装必要的软件，划分好分区，把 ISO 拷贝过去，开始安装。Damn it！居然说不能再虚拟机里面跑虚拟机！NND！丫既然不让这么折腾，倒是早说啊。为什么不在安装的时候就提醒我啊；</p>
<p><font color="blue">14:00-15:00</font> 算啦，不折腾了，决定用华丽丽的 19 寸的屏幕看以前攒下来的电影吧。就看那个布鲁斯南的《天崩地裂》好啦。老片子了，不过补习一下也不错。CD1实在是无聊，情节老套，特技虚假，主角无敌，配角闹事，男主角单身，女主角寡妇……太恶俗了吧；</p>
<p><font color="blue">15:00-16:00</font> 一边看 CD2 一边远程控制服务器。输入那些熟悉的不能再熟悉的命令，咦，怎么没反应？哦，窗口焦点在 KMPlayer 上，刚才输入的命令都被 KMPlayer 截获了，不过……我输入的那些命令怎么和 KMPlayer 的快捷键一样？结果导致播放器字幕模糊，影响变形。都不知道怎么调回去。关了重开吧。咦，这个片子怎么压缩的，居然不能拖！</p>
<p><font color="blue">16:00-17:00</font> CD2 前半段又看了一遍，等到 30min 左右快要进入结局的时候，居然提示视频压缩损坏！根本播放不下去；</p>
<p><font color="blue">17:00-18:00</font> 突然发现午饭没吃，早饭就吃了两个小面包，饿了。准备去觅食+逛超市。路过一个镇江面馆，进去吃面吧。居然没有偶要吃的面，真是不顺。去超市刷卡，发现还差两块钱凑 CMB 积分，要不要再买条口香糖？还是节约过日子？赚积分痛苦啊……</p>
<p><font color="blue">18:00-19:00</font> 回到机房，准备重装。反正 /home 下面已经都被 rm -fr *了，直接重装吧；花了半个小时格式化 300G 的 SCSI RAID 硬盘后，才想起来 /root/ 下面还是有点东西需要备份的；</p>
<p><font color="blue">10:00-20:00</font> 不过想起来模式动物中心机房的 100.7 的服务器上有这些数据的备份，还好，可以松口气了；100.7 在内网，访问不到，只能通过 100.1 跳过去，不过怎么在 100.1 上 ssh 不过去呢？ping 一下发现丢包率超过了 80%！</p>
<p><font color="blue">20:00-21:00</font> 看来是网络问题了，打电话给模式动物中心机房的网管，结果说不在所里，只能等明天再说了……</p>
<p><font color="blue">21:00-22:00</font> 回家。逛超市的时候准备安慰自己+超市特价买了一堆零食酸奶。开始犒劳自己。恩，那个什么粟米棒还不错，就吃多了口渴。喝下酸奶一大罐，没用，喝了一壶水才好受点；</p>
<p><font color="blue">22:00-23:00</font> 困了，准备上床，刷牙的时候发现洗脸盆的下水管道堵了，拿个皮搋子搋了半天才弄好；</p>
<p><font color="blue">23:00-00:00</font> 搋了半天下水管，加上刚才喝的一大壶水，睡不着了……开始失眠……</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2009/03/fuck-my-life-season-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Read It Later 集成到 Google Reader</title>
		<link>http://blog.nulltao.net/2008/11/read_it_later_comes_to_google_reader/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2008/11/read_it_later_comes_to_google_reader/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 09:06:55 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TranslatioN]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[readitlater]]></category>
		<category><![CDATA[rww]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=240</guid>
		<description><![CDATA[洒家阅读新闻用的两个最重要的工具：Read It Later 和 Google Reader 终于能够直接集成了。实在是美哉。

Read It Later Comes To Google Reader]]></description>
			<content:encoded><![CDATA[<p>洒家阅读新闻用的两个最重要的工具：Read It Later 和 Google Reader 终于能够直接集成了。实在是美哉。</p>
<hr />
<p><a href="http://www.readwriteweb.com/archives/read_it_later_comes_to_google_reader.php" target="_blank">Read It Later Comes To Google Reader</a</p>
<hr />
<p><img src="http://www.readwriteweb.com/images/readitlater_logo.png" class="content-block-fix" /><a href="http://readitlaterlist.com/" target="_blank">Read It Later</a>，一个流行的 Firefox 插件，最近发布了升级版本，该版本给 <a href="http://reader.google.com" target="_blank">Google Reader</a>增加了一些新功能。这个新扩展同时兼容 Firefox 和 IE，这个新扩展让你能够在阅读你所订阅的 RSS 种子的时候勾选出需要稍后再做详细阅读的新闻，以此来加快你的浏览速度。 你还能够使用任何浏览器访问到这些你想稍后阅读的这些新闻，不管是在家里的 Firefox，在单位的 IE，甚至你的 iPhone 手机都可以。</p>
<p><img align="left" src="http://www.readwriteweb.com/images/readitlater_2.gif" class="default-content-margin" />这个升级版的 <a href="http://readitlaterlist.com/" target="_blank">Read It Later</a> 扩展给你的 Google Reader 的种子列表增加了一个 Greasemonkey-esque 功能，就是在每个新闻条目的旁边，星标的右边增加一个对勾符号。在你浏览你的订阅的时候，你勾选上的帖子会自动增加到你的阅读列表中——你可以随时在 <a href="http://readitlaterlist.com" target="_blank">readitlaterlist.com</a> 网站上访问到你保存的阅读列表。通过内置的离线浏览功能，你还能在准备要离开网络的时候，下载一系列文章供你以后阅读——比如说当你乘飞机旅行的时候。</p>
<p>如果你使用书签插件来管理你的阅读列表，那么现在你有更多的选项供你定制。你可以使用“普通”模式或者“紧凑”模式查看阅读列表、选择每页显示的条目数、是否在侧边栏打开阅读列表、以及是否启用上下文关联菜单和附加的工具栏按钮。</p>
<p><img align="right" src="http://www.readwriteweb.com/images/readitlater_1.gif" class="default-content-margin" />不过，新加的功能中最棒的就是可以按照 <a href="http://postrank.com/" target="_blank">PostRank</a> 对阅读列表进行排序。我们在读写网<a href="http://www.readwriteweb.com/archives/first_look_aiderss_feed_filtering.php" target="_blank">好几次</a>都<a href="http://www.readwriteweb.com/archives/aiderss_funding.php" target="_blank">非常关注</a>这个曾经名为 AideRSS 的功能。在启用 PostRank 后，你的阅读列表会智能的按照流行度进行过滤。 有几种方式给一个帖子打分，包括该帖子收到的评论数、在美味书签上被标记的次数，被 digg 的次数，以及被引用的连接数。 你现在可以按照帖子的重要程度来浏览你的阅读列表，这对那些被过量的信息所困扰的人特别有用。</p>
<p>该插件还有一些其他的改进，例如升级了的隐私控制、现有功能的更强大技巧等，这些改进让 Read It Later 逐渐成你的浏览器中一个重要的插件，不管你用的是 Fireofox 还是 IE。 现在，我们就只需要的就是能够在 iPhone 上使用的书签插件，那就就齐活了。</p>
<p><embed width="425" height="344" type="application/x-shockwave-flash" wmode="transparent" allowfullscreen="true" allowscriptaccess="never" src="http://www.youtube.com/v/mLNfsLpM8zo&amp;hl=en&amp;fs=1" class="content-block-fix" /><span class="link popout"title="Click to open in a new window">Popout</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2008/11/read_it_later_comes_to_google_reader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>真实世界让你很沮丧吗？IBM 邀请你到超越时空的紫禁城一游。</title>
		<link>http://blog.nulltao.net/2008/10/real-world-got-you-down-ibm-invites-you-to-a-virtual-forbidden-city/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2008/10/real-world-got-you-down-ibm-invites-you-to-a-virtual-forbidden-city/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 03:21:59 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TranslatioN]]></category>
		<category><![CDATA[techcrunch]]></category>
		<category><![CDATA[virtualworld]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=237</guid>
		<description><![CDATA[原文：Real World Got You Down? IBM Invites You To A Virtual Forbidden City.。


想去中国游览紫禁城又买不起机票？现在，你只要有台计算机就行了。IBM——虚拟世界最忠实的信徒——和中国故宫博物院共同把这个占地 178 英亩的紫禁城在虚拟世界里重现。在三年时间里，他们非常细致的重建了所有的建筑物和数以千计的重要文物，现在，“超越时空的紫禁城”已经可供下载(有 Windows、Mac 和 Linux 版)。这个软件可以免费下载，不过先提醒你，Mac 版的可是一个实实在在的 275M  [...]]]></description>
			<content:encoded><![CDATA[<p>原文：<a href="http://www.techcrunch.com/2008/10/10/real-world-got-you-down-ibm-invites-you-to-a-virtual-forbidden-city/" target="_blank">Real World Got You Down? IBM Invites You To A Virtual Forbidden City.</a>。</p>
<hr />
<p><a href="http://tctechcrunch.files.wordpress.com/2008/10/forbidden-city-ghosts.png" target="_blank"><img width="515" height="287" title="forbidden-city-ghosts" alt="" src="http://tctechcrunch.files.wordpress.com/2008/10/forbidden-city-ghosts.png"/></a></p>
<p>想去中国游览紫禁城又买不起机票？现在，你只要有台计算机就行了。IBM——虚拟世界最忠实的信徒——和中国故宫博物院共同把这个占地 178 英亩的紫禁城在虚拟世界里重现。在三年时间里，他们非常细致的重建了所有的建筑物和数以千计的重要文物，现在，“<a href="http://www.beyondspaceandtime.org/" target="_blank">超越时空的紫禁城</a>”已经可供下载(有 Windows、Mac 和 Linux 版)。这个软件可以免费下载，不过先提醒你，Mac 版的可是一个实实在在的 275M 的安装包。</p>
<p>当你进去后，你能够选择你的形象、穿上清朝的服装、进行虚拟的浏览、和计算机控制的角色玩耍、查找地图、浏览建筑物和里面的文物，你还可以点击这些建筑物或者文物以得到进一步信息。这个虚拟世界构建在名为 Torque 的游戏平台，这个游戏平台来自 <a href="http://www.garagegames.com/" target="_blank">Garage Games</a>。（我估计是因为 OpenSim 不够好，因为没有评论说虚拟时空紫禁城时候会和第二人生进行<a href="http://www.techcrunch.com/2008/07/08/ibm-and-second-life-announce-interoperability-project-but-bridging-virtual-worlds-is-the-wrong-answer/" target="_blank">互动</a>）</p>
<p>如果你想找个地方躲避现在金融风暴，但是有没钱真的出去旅游的话，那么你可以来 IBM 的超越时空紫禁城里闲逛上几个钟头。</p>
<p><img src="http://tctechcrunch.files.wordpress.com/2008/10/forbidden-city-go.png"/></p>
<p><img src="http://tctechcrunch.files.wordpress.com/2008/10/forbidden-city-plans.png"/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2008/10/real-world-got-you-down-ibm-invites-you-to-a-virtual-forbidden-city/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>终于用上左手的 Logitech V450 Nano Cordless Laser Mouse</title>
		<link>http://blog.nulltao.net/2008/09/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a%e5%b7%a6%e6%89%8b%e7%9a%84-logitech-v450-nano-cordless-laser-mouse/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.nulltao.net/2008/09/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a%e5%b7%a6%e6%89%8b%e7%9a%84-logitech-v450-nano-cordless-laser-mouse/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 04:23:13 +0000</pubDate>
		<dc:creator>净空无道</dc:creator>
				<category><![CDATA[TechniquE]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[setpoint]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.nulltao.net/?p=233</guid>
		<description><![CDATA[和谐四年秋，洒家弱冠六年纪念日当天，于京东购买赛普泰克——啊不，是罗技泰克无尾老鼠一只。
但是此鼠娘家罗技泰克所附送嫁妆 SetPoint 乃伪劣产品，不得博得洒家新欢 Microsoft Windows 2008 之欢心，2008 不认其名门出身，只当是一 HID compliant Mouse，真是狗眼看人低，微软看鼠卑啊。
SetPoint 迫东家 2008 的于淫威，亦不敢主仆相认，就是不敢显示出那欲说还羞的 My Mouse  [...]]]></description>
			<content:encoded><![CDATA[<p>和谐四年秋，洒家弱冠六年纪念日当天，于京东购买赛普泰克——啊不，是罗技泰克无尾老鼠一只。</p>
<p>但是此鼠娘家罗技泰克所附送嫁妆 SetPoint 乃伪劣产品，不得博得洒家新欢 Microsoft Windows 2008 之欢心，2008 不认其名门出身，只当是一 HID compliant Mouse，真是狗眼看人低，微软看鼠卑啊。</p>
<p>SetPoint 迫东家 2008 的于淫威，亦不敢主仆相认，就是不敢显示出那欲说还羞的 My Mouse 选项卡。</p>
<p>借古狗洋大人之力，终于在无尾鼠娘家旁边的一个老爷们扎堆聊天的地方找到了前人留下的洋文名帖一张，将藩语译成我中华之文字，方懂上书意思是，喜新厌旧是罪过的，有了新老婆 2008，不能忘了二老婆 Vista 和小妾 XP，须到二老婆或者小妾房中寻得名为 CDDRV2 的仙丹一枚给新老婆服用才可解除新老婆的障眼之疾。</p>
<p>虽说此方甚好，可以药到病除，但是难为了吾等洁身自好，二老婆小妾皆无之人，难道为了这个还要纳上一房不成？未免荒谬。再看前述之帖，此洋鬼子上留蝇头小楷一行，曰，吾等清白之人之赤心，上可达天庭，故玉帝命他将仙丹藏于一个名为 RapidShare 之八卦炉内，以诚心猛击此<a href="http://rs524.rapidshare.com/files/141942707/CDDRV2.rar" target="_blank">链接</a>即可得仙丹。</p>
<p>洒家于是踏上 NJU_BRAS 大道前去寻访仙丹，不曾想，好事多磨，玉帝说 BRAS 戴着不爽，遂令如来将 BRAS 大道缩成极小，以难为用 BRAS 取经之人。无奈之下，退回来继续用 PROXY 小道，道上无人阻碍，方能够到达藩国按洋鬼子之指点找到仙丹，取回，用 LDPINST.exe 做药引给新欢 2008 服下，之间电光火石之间，2008 立马认出洒家的无尾鼠出自罗技泰克名门，立即取名为 Logitech HID compliant Cordless mouse。此时寻到 SetPoint，SetPoint 一看婆家已经接纳此鼠，亦显现出 My Mouse 以和之。</p>
<p>至此，洒家魂牵梦绕之 My Mouse 终得拨云见日，吾等方能用上左手鼠标。善哉善哉。</p>
<p>口说无凭，立照为证：</p>
<p><img src="http://blog.nulltao.net/wp-content/uploads/2008/09/SetPoint-600x450.png" alt="" title="SetPoint" width="600" height="450" class="alignnone size-medium wp-image-234" /></p>
<p>附上新鼠未嫁之前之裸照一张：</p>
<p><img src="http://blog.nulltao.net/wp-content/uploads/2008/09/V450-600x450.jpg" alt="" title="V450" width="600" height="450" class="alignnone size-medium wp-image-235" /></p>
<p>附上洋泾兵之贴：<a href="http://forums.logitech.com/logitech/board/message?board.id=software_mice&#038;thread.id=12498" target="_blank">Windows Server 2008 x86(32bit) + Setpoint 4.6 installation </a>，后来者请自去寻访仙丹。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nulltao.net/2008/09/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a%e5%b7%a6%e6%89%8b%e7%9a%84-logitech-v450-nano-cordless-laser-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

