<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>nullTao | 净空无道 | Blog - TechniquE</title>
    <link>http://blog.nulltao.net/</link>
    <description>如果死真的是种解脱，那么愿死者有他的天堂，愿生者有他的寄托。但愿在宇宙的深处真有一处天堂，有一天当我们在经历生死契阔之后，还有一个地方在等待着我们的——重逢。</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:nulltao@gmail.com" />
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Mon, 14 Sep 2009 17:34:16 GMT</pubDate>

    <image>
        <url>http://blog.nulltao.net/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: nullTao | 净空无道 | Blog - TechniquE - 如果死真的是种解脱，那么愿死者有他的天堂，愿生者有他的寄托。但愿在宇宙的深处真有一处天堂，有一天当我们在经历生死契阔之后，还有一个地方在等待着我们的——重逢。</title>
        <link>http://blog.nulltao.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>WAMP crashes easily those days: Some notes on PHP configuration</title>
    <link>http://blog.nulltao.net/archives/115-WAMP-crashes-easily-those-days-Some-notes-on-PHP-configuration.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/115-WAMP-crashes-easily-those-days-Some-notes-on-PHP-configuration.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=115</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=115</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;I&#039;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.&lt;/p&gt;
&lt;p&gt;Now I&#039;ve finially got a stably working development environment. And here is some notes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;h3&gt;&lt;code&gt;go-pear.bat&lt;/code&gt; dose not work.&lt;/h3&gt;
&lt;p&gt;When initializing as usual using &lt;code&gt;go-pear.bat&lt;/code&gt; command, I got an error message:
&lt;div class=&quot;dos geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;phar &amp;quot;E:\HTTPD\php-5.3.0-Win32-VC9-x86\PEAR\go-pear.phar&amp;quot; does &lt;a href=&quot;http://www.ss64.com/nt/not.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;not&lt;/span&gt;&lt;/a&gt; have a signature&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;PHP Warning: &amp;#160;require_once&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;phar://go-pear.phar/index.php&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;: failed to open stream: phar error: invalid url or non-existent phar &amp;quot;phar://go-pear.phar/index.php&amp;quot; &lt;a href=&quot;http://www.ss64.com/nt/in.html&quot;&gt;&lt;span style=&quot;color: #00b100; font-weight: bold;&quot;&gt;in&lt;/span&gt;&lt;/a&gt; E:\HTTPD\php-5.3.0-Win32-VC9-x86\PEAR\go-pear.phar on line &lt;span style=&quot;color: #cc66cc;&quot;&gt;1236&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;So, &lt;code&gt;go-pear.bar&lt;/code&gt; did not work for me, but: &lt;div class=&quot;dos geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;php -dphar.require_hash=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; PEAR\go-pear.phar&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; is all right.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;&lt;code&gt;Xdebug&lt;/code&gt; makes Apache crashes everytime.&lt;/h3&gt;
&lt;p&gt;As I said, I&#039;ve upgraded all components to it&#039;s lastest version: Apache, version 2.2.13 form offical site, PHP, version VC9 x86 Thread Safe, MySQL, version 5.1.38-community.&lt;/p&gt;
&lt;p&gt;Following Xdebug manual, I have to download the one matches the PHP version I&#039;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.&lt;/p&gt;
&lt;p&gt;From now on, Apache crashed everytime I call &lt;code&gt;phpinof()&lt;/code&gt; function. I&#039;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:
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Which version do I choose?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP&lt;/p&gt;
&lt;p&gt;If you are using PHP with IIS you should use the VC9 versions of PHP&lt;/p&gt;&lt;/blockquote&gt;
Change my PHP from VC6 to VC9, re-configure all settings and download Xdebug 2.0.5 5.3 VC96(32 bit), it works!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Can&#039;t make new folder when installing PEAR.&lt;/h3&gt;
&lt;p&gt;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:
&lt;div class=&quot;dos geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;PHP Warning: &amp;#160;&lt;a href=&quot;http://www.ss64.com/nt/mkdir.html&quot;&gt;&lt;span style=&quot;color: #b1b100; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;: No such file or directory &lt;a href=&quot;http://www.ss64.com/nt/in.html&quot;&gt;&lt;span style=&quot;color: #00b100; font-weight: bold;&quot;&gt;in&lt;/span&gt;&lt;/a&gt; phar://E:/HTTPD/php-5.3.0-Win32-VC6-x86/PEAR/go-pear.phar/System.php on line 277&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;Warning: &lt;a href=&quot;http://www.ss64.com/nt/mkdir.html&quot;&gt;&lt;span style=&quot;color: #b1b100; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;: No such file or directory &lt;a href=&quot;http://www.ss64.com/nt/in.html&quot;&gt;&lt;span style=&quot;color: #00b100; font-weight: bold;&quot;&gt;in&lt;/span&gt;&lt;/a&gt; phar://E:/HTTPD/php-5.3.0-Win32-VC6-x86/PEAR/go-pear.phar/System.php on line 277&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;Unable to create Temporary directory &lt;a href=&quot;http://www.ss64.com/nt/for.html&quot;&gt;&lt;span style=&quot;color: #00b100; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;/a&gt; processing E:\HTTPD\php\PEAR\tmp.&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;Run this script as administrator or pick another location.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I&#039;m sure nothing is wrong about dir premission. Solved this problem, I&#039;m also sure that few people may face this, because it is due to the immature hardlink mechanism on Windows Server 2008.&lt;/p&gt;
&lt;p&gt;I made hardlink named &lt;em&gt;php&lt;/em&gt; to folder &lt;em&gt;php-5.3.0-Win32-VC6-x86&lt;/em&gt; and I was running the programe in &lt;em&gt;php&lt;/em&gt; folder. After I change my current folder to &lt;em&gt;php-5.3.0-Win32-VC6-x86&lt;/em&gt;, it goes well.&lt;/p&gt;
&lt;p&gt;Conclusion: harklink on Windows is still a load of crap.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt; 
    </content:encoded>

    <pubDate>Mon, 14 Sep 2009 02:11:57 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/115-guid.html</guid>
    <category>apache</category>
<category>pear</category>
<category>php</category>
<category>technique</category>
<category>tip</category>
<category>wamp</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器</title>
    <link>http://blog.nulltao.net/archives/113-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/113-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=113</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=113</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;习惯于自己从源代码开始编译安装软件，现在要配置一个邮件服务器，以前用的 Qmail，感觉不是很好，sendmail 也被骂死了，决定改 &lt;a href=&quot;http://www.postfix.org/&quot; target=&quot;_blank&quot;&gt;Postfix&lt;/a&gt; 看看。&lt;/p&gt;
&lt;p&gt;目的：搭建一个支持 POP3、IMAP、SMTP、WebMail 的邮件系统，支持虚拟域和虚拟账户。&lt;/p&gt;
&lt;p&gt;操作系统：&lt;a href=&quot;www.slackware.com/&quot; target=&quot;_blank&quot;&gt;Slackware&lt;/a&gt;，所需软件(库)：Postfix、Cyrus SASL、Courier Auth Lib、Courier IMAP server、Courier Maildrop、amavisd-new、Clam AntiVirus、MySQL、Apache、Extman/Extmail、RRDtool。&lt;/p&gt;
&lt;p&gt;说明：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;安装操作系统的时候，只安装最基本的开发环境和库，其他的服务器软件一律不装。&lt;/li&gt;
&lt;li&gt;考虑到实际用途，很可能还会需要安装 PHP 和 phpMySQL，请在安装完 Cyrus SASL 后安装 PHP，否则可能会产生依赖关系，关于 PHP 的安装，请参加本 Blog 的其他文章。&lt;/li&gt;
&lt;li&gt;本人习惯于按照如下方式设定安装目录，如果您习惯其它方式，请相应的修改目录，如果您全部采用默认目录，则更简洁：
&lt;ol&gt;
&lt;li&gt;数据文件，放在 &lt;code&gt;/home&lt;/code&gt; 下，比如 www、mailbox。&lt;/li&gt;
&lt;li&gt;大型的，需要配置、启动服务的软件，放在 &lt;code&gt;/home&lt;/code&gt; 下，例如 MySQL、Apache、Postfix 等。&lt;/li&gt;
&lt;li&gt;不需要配置的，而且不需要独立启动的库，放在默认目录下，例如 Perl 的模块等。&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;目录&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.nulltao.net/permalink/mail-server-on-slackware-1-prepare.html&quot; target=&quot;_blank&quot;&gt;一、安装前的准备&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;系统需求&lt;/li&gt;&lt;li&gt;下载软件包&lt;/li&gt;&lt;li&gt;创建所需的用户、组和目录&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.nulltao.net/permalink/mail-server-on-slackware-2-install.html&quot; target=&quot;_blank&quot;&gt;二、软件包安装&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;安装 MySQL&lt;/li&gt;&lt;li&gt;安装 Apache&lt;/li&gt;&lt;li&gt;安装 Cyrus SASL&lt;/li&gt;&lt;li&gt;安装 Postfix&lt;/li&gt;&lt;li&gt;安装 Courier Authlib&lt;/li&gt;
&lt;li&gt;安装 Courier IMAP&lt;/li&gt;&lt;li&gt;安装 Courier Maildrop&lt;/li&gt;&lt;li&gt;安装 Spamassassin&lt;/li&gt;&lt;li&gt;安装 Amavisd-new&lt;/li&gt;
&lt;li&gt;安装 Clam AntiVirus&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.nulltao.net/permalink/mail-server-on-slackware-3-configure.html&quot; target=&quot;_blank&quot;&gt;三、系统配置&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;配置 MySQL&lt;/li&gt;&lt;li&gt;配置 Apache&lt;/li&gt;&lt;li&gt;配置 Postfix&lt;/li&gt;&lt;li&gt;配置 CYRUS-SASL&lt;/li&gt;&lt;li&gt;配置 Courier Authlib&lt;/li&gt;
&lt;li&gt;配置 Courier IMAP&lt;/li&gt;&lt;li&gt;配置 Courier MailDrop&lt;/li&gt;&lt;li&gt;配置 Spamassassin&lt;/li&gt;&lt;li&gt;配置 Amavisd-new&lt;/li&gt;
&lt;li&gt;配置 Clam AntiVirus&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.nulltao.net/permalink/mail-server-on-slackware-4-webmail.html&quot; target=&quot;_blank&quot;&gt;四、Webmail 和管理端 &lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;系统需求说明&lt;/li&gt;&lt;li&gt;添加数据库&lt;/li&gt;&lt;li&gt;安装 Extman/Extmail&lt;/li&gt;&lt;li&gt;配置 Apache 的虚拟主机&lt;/li&gt;
&lt;li&gt;安装 RRDtool&lt;/li&gt;&lt;li&gt;配置 Extman/Extmail&lt;/li&gt;&lt;li&gt;其他配置&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.nulltao.net/permalink/mail-server-on-slackware-5-start.html&quot; target=&quot;_blank&quot;&gt;五、启动并且测试服务 &lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;启动服务&lt;/li&gt;&lt;li&gt;测试&lt;/li&gt;
&lt;/ol&gt; 
    </content:encoded>

    <pubDate>Thu, 23 Jul 2009 15:32:30 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/113-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>Install LILO to MBR on CCISS device</title>
    <link>http://blog.nulltao.net/archives/112-Install-LILO-to-MBR-on-CCISS-device.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/112-Install-LILO-to-MBR-on-CCISS-device.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=112</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=112</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;I was in hell when trying to get LILO installed on a CCISS driver, which is how &lt;i&gt;HP SmartArray&lt;/i&gt; RAID card recognized as. No matter I installed LILO to MBR or Boot Record, it always failed.&lt;/p&gt;
&lt;p&gt;Here is my solution:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;After installing Slackware finished, reboot server with Installation CD.&lt;/li&gt;
&lt;li&gt;At prompt, input:
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;hugesmp.s &lt;span style=&quot;color: #007800;&quot;&gt;root&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cciss&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;c0d0p2 &lt;span style=&quot;color: #007800;&quot;&gt;rdinit&lt;/span&gt;= ro&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
Change &lt;code&gt;hugesmp.s&lt;/code&gt; to your kernel if necessary.
&lt;code&gt;c0d0p2&lt;/code&gt; means second partition of logical drive 0 on controller 0, which is my &quot;/&quot; partition.&lt;/li&gt;
&lt;li&gt;Login as root, modify &lt;code&gt;/etc/lilo.conf&lt;/code&gt;. Change &lt;code&gt;boot = /dev/sda&lt;/code&gt; to &lt;code&gt;boot = /dev/cciss/c0d0p2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run the command:
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;lilo &lt;span style=&quot;color: #660033;&quot;&gt;-M&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cciss&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;c0d0 mbr&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;lilo&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Reboot to check if everthing is right.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 23 Jul 2009 11:39:20 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/112-guid.html</guid>
    <category>cciss</category>
<category>lilo</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器：五、启动并且测试服务</title>
    <link>http://blog.nulltao.net/archives/111-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/111-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=111</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=111</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;h3&gt;1、启动服务&lt;/h3&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 MySQL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;mysql.server start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动病毒防护&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;su&lt;/span&gt; - amavis &lt;span style=&quot;color: #660033;&quot;&gt;-c&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;/home/amavis/sbin/amavisd&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;clamav&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;sbin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;clamd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 authlib&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;authlib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;sbin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;authdaemond start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 POP3 和 IMAP&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;libexec&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imapd.rc start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;libexec&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imapd-ssl.rc start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;libexec&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;pop3d.rc start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;libexec&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;pop3d-ssl.rc start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 Postfix&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;postfix&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;sbin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;postfix start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 Extman 所需的图形统计&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extman&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;addon&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailgraph-init start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extman&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;addon&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;qmonitor-init start&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 启动 Apache&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;apachectl &lt;span style=&quot;color: #660033;&quot;&gt;-k&lt;/span&gt; start&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;2、测试&lt;/h3&gt;
&lt;p&gt;执行 &lt;strong&gt;netstat -ap&lt;/strong&gt;，看看已经打开被监听的端口中是否有下面的所有端口：&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;Active Internet connections &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;servers and established&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;Proto Recv-Q Send-Q Local Address &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Foreign Address &amp;#160; &amp;#160; &amp;#160; &amp;#160; State &amp;#160; &amp;#160; &amp;#160; PID&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;Program name&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;3306&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3377&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mysqld &amp;#160; &amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:auth &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3080&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;inetd &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:smtp &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;29100&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;master &amp;#160; &amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp6 &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:imaps &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;29020&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;couriertcpd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp6 &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:pop3s &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;29032&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;couriertcpd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp6 &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:pop3 &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;29026&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;couriertcpd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp6 &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:imap &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;29013&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;couriertcpd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;tcp6 &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:http &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;LISTEN &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3307&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;httpd &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;注：如果你没有加载 &lt;code&gt;POP3-SSL&lt;/code&gt; 和 &lt;code&gt;IMAP-SSL&lt;/code&gt; 支持，那么 &lt;code&gt;pop3s&lt;/code&gt; 和 &lt;code&gt;imaps&lt;/code&gt; 端口就不会打开。&lt;/p&gt;
&lt;p&gt;然后看看 &lt;strong&gt;/var/log/maillog&lt;/strong&gt; 里面是否有错误，本系统主要的日志都在这个文件里。&lt;/p&gt;
&lt;p&gt;下面就是用浏览器打开 &lt;a href=&quot;http://blog.nulltao.net&quot; target=&quot;_blank&quot;&gt;http://domail.ltd/extman/&lt;/a&gt;，用 postmaster@domail.ltd:extmail*123* 登录，然后添加域、帐号并且使用邮件系统吧。&lt;/p&gt;
&lt;p&gt;下面测试垃圾邮件和病毒邮件监控是否正常工作。&lt;/p&gt;
&lt;p&gt;用其他的邮箱给自己的帐号发信，分别包含如下特征字符串：&lt;/p&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;第一行是病毒邮件的特征字符串，第二行是 Spamassassin 的 &lt;a href=&quot;http://spamassassin.apache.org/gtube/gtube.txt&quot; target=&quot;_blank&quot;&gt;GTUBE&lt;/a&gt; 垃圾邮件特征字符串。&lt;/p&gt;
&lt;p&gt;如果一切正常的话，那么病毒邮件就会显示出被隔离的字样，而垃圾邮件则自动存入垃圾邮件箱。如果没有，请检查 &lt;code&gt;/var/log/maillog&lt;/code&gt; 以定位问题。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 21 Jul 2009 16:31:55 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/111-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器：四、Webmail 和管理端</title>
    <link>http://blog.nulltao.net/archives/110-Slackware-Webmail.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/110-Slackware-Webmail.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=110</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=110</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;h3&gt;1、系统需求说明&lt;/h3&gt;
&lt;p&gt;Extman 登录时的验证码需要 &lt;code&gt;libXpm&lt;/code&gt; 的支持，统计图表需要 &lt;code&gt;RRDtool&lt;/code&gt; 和 Perl 的 &lt;code&gt;GD&lt;/code&gt; 模块的支持，Extman 还需要 Perl 的 &lt;code&gt;Unix::Syslog&lt;/code&gt; 模块支持，mailgraph_ext 需要 Perl 的 &lt;code&gt;File::Tail&lt;/code&gt; 模块支持。可以使用 &lt;strong&gt;/home/www/extsuite/extmail/tools/pkg_stats.sh&lt;/strong&gt; 来查看还缺少什么模块。&lt;/p&gt;
&lt;h3&gt;2、添加数据库&lt;/h3&gt;
&lt;p&gt;使用 phpMyAdmin 或者其他的 MySQL 客户端，在 &lt;strong&gt;postfix&lt;/strong&gt; 表中增加如下的表和初始管理员记录：&lt;/p&gt;
&lt;div class=&quot;mysql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;SET&lt;/span&gt; SQL_MODE&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&amp;quot;NO_AUTO_VALUE_ON_ZERO&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`alias`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`address`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`goto`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TEXT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`address`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`address`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`address`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;ExtMail - Virtual Aliases&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`alias_domain`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`alias_domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`target_domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`created`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`modified`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`alias_domain`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`target_domain`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`target_domain`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;Postfix Admin - Domain Aliases&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`description`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`hashdirpath`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`maxalias`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;10&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`maxusers`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;10&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`maxquota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;16&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`maxnetdiskquota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;16&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`transport`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`can_signup`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`default_quota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`default_netdiskquota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`default_expire`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;12&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablesmtpd`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablesmtp`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablewebmail`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablenetdisk`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disableimap`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablepop3`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`expiredate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATE&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;ExtMail - Virtual Domains&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`domain_manager`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;Ext/Webman - Domain Admins&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`mailbox`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`uid`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`password`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`clearpwd`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;128&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`name`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`mailhost`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`maildir`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`homedir`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`quota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;16&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`netdiskquota`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;16&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`domain`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`uidnumber`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;6&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1000&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`gidnumber`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;6&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1000&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`expiredate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATE&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablepwdchange`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablesmtpd`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablesmtp`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablewebmail`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablenetdisk`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disableimap`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablepop3`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`question`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TEXT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`answer`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TEXT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;ExtMail - Virtual Mailboxes&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`manager`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`password`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`type`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;64&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;postmaster&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`uid`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`name`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;255&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`question`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TEXT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`answer`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TEXT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt; utf8_unicode_ci &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`disablepwdchange`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;SMALLINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATETIME&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00 00:00:00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`expiredate`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;DATE&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;0000-00-00&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt; &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;TINYINT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INNODB&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8 &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;COLLATE&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;utf8_unicode_ci COMMENT&lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;Ext/Webman - Admin Accounts&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;INTO&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`manager`&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;`username`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`password`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`type`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`uid`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`name`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`question`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`answer`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`disablepwdchange`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`createdate`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`expiredate`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;`active`&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;VALUES&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;&#039;postmaster@domain.ltd&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;$1$BrT9qxfB$Ha81Mb5YVV6rNKNN5jmtj1&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;admin&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;root&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;Super User&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;my question&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;my answer&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008080;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;2007-02-14 15:10:04&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#039;2010-11-08&#039;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; 1&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;创建的初始管理员用户名是 &lt;strong&gt;postmaster@domain.ltd&lt;/strong&gt;，初始密码是 &lt;strong&gt;extmail*123*&lt;/strong&gt;，下面会用到。&lt;/p&gt;
&lt;h3&gt;3、安装 Extman/Extmail&lt;/h3&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;tar&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-zxvf&lt;/span&gt; extmail-1.1.0.tar.gz &amp;#160;&lt;span style=&quot;color: #660033;&quot;&gt;-C&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;tar&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-zxvf&lt;/span&gt; extman-1.0.0.tar.gz &lt;span style=&quot;color: #660033;&quot;&gt;-C&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;ln&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extman-1.0.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extman&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;ln&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extmail-1.1.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extmail&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;chown&lt;/span&gt; vmail:vmail &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-R&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;4、配置 Apache 的虚拟主机&lt;/h3&gt;
&lt;p&gt;修改 &lt;strong&gt;/home/httpd/conf/extra/httpd-vhosts.conf&lt;/strong&gt;，增加如下指令：&lt;/p&gt;
&lt;div class=&quot;apache geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;VirtualHost&lt;/span&gt; *:80&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ServerAdmin&lt;/span&gt; support@domain.ltd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;DocumentRoot&lt;/span&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;&amp;quot;/home/www/extsuite/extmail/html&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ServerName&lt;/span&gt; mail.domain.ltd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ServerAlias&lt;/span&gt; domain.ltd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ErrorLog&lt;/span&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;&amp;quot;logs/ext-error_log&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;CustomLog&lt;/span&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;&amp;quot;logs/ext-access_log&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;&amp;quot;common&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ScriptAlias&lt;/span&gt; /extman/cgi/ /home/www/extsuite/extman/cgi/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;Alias&lt;/span&gt; /extman/ /home/www/extsuite/extman/html/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;ScriptAlias&lt;/span&gt; /extmail/cgi/ /home/www/extsuite/extmail/cgi/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #00007f;&quot;&gt;Alias&lt;/span&gt; /extmail/ /home/www/extsuite/extmail/html/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;VirtualHost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;5、安装 RRDtool&lt;/h3&gt;
&lt;p&gt;将 &lt;code&gt;rrdtool-1.3.8.tar.gz&lt;/code&gt; 解压后，请参阅 &lt;strong&gt;doc/rrdbuild.txt&lt;/strong&gt; 的指令安装 RRDtool 的依赖包和 RRDTool，注意首先执行下面的指令：&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #007800;&quot;&gt;INSTALL_DIR&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;local&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;rrdtool-1.3.8&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #007800;&quot;&gt;PKG_CONFIG_PATH&lt;/span&gt;=&lt;span style=&quot;color: #800000;&quot;&gt;${INSTALL_DIR}&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;pkgconfig&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #007800;&quot;&gt;PATH&lt;/span&gt;=&lt;span style=&quot;color: #007800;&quot;&gt;$INSTALL_DIR&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin:&lt;span style=&quot;color: #007800;&quot;&gt;$PATH&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;否则后面可能提示找不到依赖的库。&lt;/p&gt;
&lt;p&gt;最后一步安装 &lt;code&gt;rrdtool-1.3.8&lt;/code&gt; 包的时候，在 &lt;code&gt;make install&lt;/code&gt; 后，执行：&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;make&lt;/span&gt; site-perl-instal&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cp&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;perl&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;5.10.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;i486-linux-thread-multi&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;RRDs.pm &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;perl5&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;site_perl&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;5.10.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;i486-linux-thread-multi&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cp&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;perl&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;5.10.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;i486-linux-thread-multi&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;auto&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/*&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;perl5&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;site_perl&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;5.10.0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;i486-linux-thread-multi&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;auto&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-R&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;安装 RRDtool 的 Perl 支持。&lt;/p&gt;
&lt;h3&gt;6、配置 Extman/Extmail&lt;/h3&gt;
&lt;h4&gt;6.1、extman/webman.cf&lt;/h4&gt;
&lt;p&gt;编辑 &lt;strong&gt;/home/www/extsuite/extman/webman.cf&lt;/strong&gt;，找到如下行：&lt;/p&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_CONFIG = /var/www/extsuite/extman/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_LANGDIR = /var/www/extsuite/extman/lang&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_TEMPLDIR = /var/www/extsuite/extman/html&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MAILDIR_BASE = /home/domains&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;# SYS_LANG = en_US&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_GROUPMAIL_SENDER = postmaster@extmail.org&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_USER = webman&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_PASS = webman&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_DB = extmail&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;对应修改为如下：&lt;/p&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_CONFIG = /home/www/extsuite/extman/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_LANGDIR = /home/www/extsuite/extman/lang&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_TEMPLDIR = /home/www/extsuite/extman/html&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MAILDIR_BASE = /home/mailbox&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_LANG = zh_CN&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_GROUPMAIL_SENDER = postmaster@domain.ltd&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_USER = postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_PASS = postfix_user_password&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_DB = postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_SOCKET = /tmp/mysql.sock&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h4&gt;6.2、extmail/webmail.cf&lt;/h4&gt;
&lt;p&gt;将 &lt;code&gt;/home/www/extsuite/extmail/webmail.cf.default&lt;/code&gt; 在同目录复制为 &lt;strong&gt;webmail.cf&lt;/strong&gt;，然后找到如下行：&lt;/p&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_CONFIG = /var/www/extsuite/extmail/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_LANGDIR = /var/www/extsuite/extmail/lang&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_TEMPLDIR = /var/www/extsuite/extmail/html&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_SPAM_REPORT_TYPE = dspam&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_USER_LANG = en_US&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MAILDIR_BASE = /home/domains&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_USER = db_user&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_PASS = db_pass&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_DB = extmail&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_G_ABOOK_FILE_PATH = /var/www/extsuite/extmail/globabook.cf&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;对应修改为如下：&lt;/p&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_CONFIG = /home/www/extsuite/extmail/&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_LANGDIR = /home/www/extsuite/extmail/lang&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_TEMPLDIR = /home/www/extsuite/extmail/html&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_SPAM_REPORT_TYPE = spamassassin&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_USER_LANG = zh_CN&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MAILDIR_BASE = /home/mailbox&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_USER = postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_PASS = 42R854&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_DB = postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_MYSQL_SOCKET = /tmp/mysql.sock&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_AUTHLIB_SOCKET = /home/courier/authlib/var/spool/authdaemon/socket&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;SYS_G_ABOOK_FILE_PATH = /home/www/extsuite/extmail/globabook.cf&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;7、其他配置&lt;/h3&gt;
&lt;p&gt;修改 &lt;strong&gt;/home/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init&lt;/strong&gt; 和 &lt;strong&gt;/home/www/extsuite/extman/addon/mailgraph_ext/qmonitor-init&lt;/strong&gt;，分别找到：&lt;/p&gt;
&lt;div class=&quot;perl geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;MAILGRAPH_PL&lt;span style=&quot;color: #339933;&quot;&gt;=/&lt;/span&gt;usr&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://perldoc.perl.org/functions/local.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;pl&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;MAILGRAPH_PL&lt;span style=&quot;color: #339933;&quot;&gt;=/&lt;/span&gt;usr&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://perldoc.perl.org/functions/local.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;qmonitor&lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;pl&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;相应的修改为：&lt;/p&gt;
&lt;div class=&quot;perl geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;MAILGRAPH_PL&lt;span style=&quot;color: #339933;&quot;&gt;=/&lt;/span&gt;home&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;extman&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;addon&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;pl&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;MAILGRAPH_PL&lt;span style=&quot;color: #339933;&quot;&gt;=/&lt;/span&gt;home&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;extman&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;addon&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;qmonitor&lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;pl&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;初始化日志统计图所需要的目录：&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extsuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;extman&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;addon&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailgraph_ext&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;queue_mkrrd.sh&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Tue, 21 Jul 2009 12:04:04 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/110-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器：三、系统配置</title>
    <link>http://blog.nulltao.net/archives/109-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/109-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=109</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=109</wfw:commentRss>
    

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

    <pubDate>Mon, 20 Jul 2009 15:36:34 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/109-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器：二、软件包安装</title>
    <link>http://blog.nulltao.net/archives/108-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/108-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=108</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    

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

    <pubDate>Mon, 20 Jul 2009 03:03:55 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/108-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>在 Slackware 下全部从源代码安装邮件服务器：一、安装前的准备</title>
    <link>http://blog.nulltao.net/archives/107-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/107-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=107</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=107</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;h3&gt;1、系统需求&lt;/h3&gt;
&lt;p&gt;在安装前请确认您的系统已经安装了以下的组件或者类库，如果没有请先安装：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Perl w/ CPAN&lt;/li&gt;
&lt;li&gt;OpenSSL&lt;/li&gt;
&lt;li&gt;Berkeley Database / libdb&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;2、下载软件包&lt;/h3&gt;
&lt;p&gt;下面是我们必须用的软件包，请分别下载：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.postfix.org/&quot; target=&quot;_blank&quot;&gt;Postfix&lt;/a&gt;：消息传送代理/电子邮件服务器。&lt;a href=&quot;http://www.postfix.org/download.html&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://asg.web.cmu.edu/sasl/&quot; target=&quot;_blank&quot;&gt;Cyrus SASL&lt;/a&gt;：简单认证安全层。&lt;a href=&quot;http://ftp.andrew.cmu.edu/pub/cyrus-mail/&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.courier-mta.org/authlib/&quot; target=&quot;_blank&quot;&gt;Courier Auth Lib&lt;/a&gt;：嵌入式身份认证系统。&lt;a href=&quot;http://www.courier-mta.org/download.php#authlib&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.courier-mta.org/imap/&quot; target=&quot;_blank&quot;&gt;Courier IMAP server&lt;/a&gt;：提供 POP3 和 IMAP 服务。&lt;a href=&quot;http://www.courier-mta.org/download.php#imap&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.courier-mta.org/maildrop/&quot; target=&quot;_blank&quot;&gt;Courier Maildrop&lt;/a&gt;：投递邮件。&lt;a href=&quot;http://www.courier-mta.org/download.php#maildrop&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijs.si/software/amavisd/&quot; target=&quot;_blank&quot;&gt;amavisd-new&lt;/a&gt;：位于 MTA 和内容过滤器之间的接口。&lt;a href=&quot;http://www.ijs.si/software/amavisd/#download&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.clamav.net/&quot; target=&quot;_blank&quot;&gt;Clam AntiVirus&lt;/a&gt;：对邮件进行病毒检查。&lt;a href=&quot;http://www.clamav.net/download/sources&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mysql.com/&quot; target=&quot;_blank&quot;&gt;MySQL&lt;/a&gt;：数据库服务器，用来存储虚拟域、虚拟账户等信息。&lt;a href=&quot;http://dev.mysql.com/downloads/&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/&quot; target=&quot;_blank&quot;&gt;Apache&lt;/a&gt;：Web 服务器，用来给 Extman/Extmail 提供 Web 服务。&lt;a href=&quot;http://httpd.apache.org/download.cgi&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.extmail.org/&quot; target=&quot;_blank&quot;&gt;Extman/Extmail&lt;/a&gt;：网页客户端和网页管理端。&lt;a href=&quot;http://www.extmail.org/cgi-bin/download.cgi&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://oss.oetiker.ch/rrdtool/&quot; target=&quot;_blank&quot;&gt;RRDtool&lt;/a&gt;：数据日志可视化库，Extman 生成统计图时使用。&lt;a href=&quot;http://oss.oetiker.ch/rrdtool/pub/?M=D&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;下面是可选组件，请根据情况下载：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.php.net/&quot; target=&quot;_blank&quot;&gt;PHP&lt;/a&gt;：如果你想使用 phpMyAdmin，或者同时提供其他的 Web 服务，则需要 PHP 支持。&lt;a href=&quot;http://www.php.net/downloads.php&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.phpmyadmin.net/&quot; target=&quot;_blank&quot;&gt;phpMyAdmin&lt;/a&gt;：提供一个简单、方便的 Web 数据库管理界面。&lt;a href=&quot;http://www.phpmyadmin.net/home_page/downloads.php&quot; target=&quot;_blank&quot;&gt;下载地址&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;3、创建所需的用户、组和目录&lt;/h3&gt;
&lt;p&gt;创建所需要的用户组和用户，为了不和 Slackware 的默认 GID/UID 冲突，所以我们从 200 和 2000 开始。如果你使用自己的 GID/UID，那么后继的配置需要注意替换成您的 GID/UID。&lt;/h3&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# Slackware 默认安装有 mysql:mysql 用户组，所以不必再新增&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# groupadd mysql&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# useradd -g mysql -d /home/mysql -s /sbin/false -c &amp;quot;MySQL&amp;quot; mysql&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;groupadd &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; 200 postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;groupadd &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; 201 postdrop&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;groupadd &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; 202 vmail&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;groupadd &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; 203 amavis&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;groupadd &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; 204 clamav&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;useradd &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; 2000 &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; postfix &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;false&lt;/span&gt; postfix&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;useradd &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; 2002 &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; vmail &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;false&lt;/span&gt; vmail&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;useradd &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; 2003 &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; amavis &amp;#160;&lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;amavis &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;bash&lt;/span&gt; amavis&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;useradd &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; 2004 &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; clamav &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;clamav &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-c&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Clam Antivirus&amp;quot;&lt;/span&gt; clamav&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;useradd &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; 2010 &lt;span style=&quot;color: #660033;&quot;&gt;-g&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;users&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;courier &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;bash&lt;/span&gt; courier&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;创建邮件（虚拟域、虚拟帐号）所在的目录，并修改权限。&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailbox&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;chown&lt;/span&gt; vmail:vmail &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;mailbox &lt;span style=&quot;color: #660033;&quot;&gt;-R&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;创建 Web 服务(虚拟主机)所在目录，并且修改权限。&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;chown&lt;/span&gt; vmail:vmail &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;www &lt;span style=&quot;color: #660033;&quot;&gt;-R&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Fri, 10 Jul 2009 10:26:38 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/107-guid.html</guid>
    <category>mail</category>
<category>postfix</category>
<category>server</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>Installing PHP w/ IMAP support on Slackware</title>
    <link>http://blog.nulltao.net/archives/106-Installing-PHP-w-IMAP-support-on-Slackware.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/106-Installing-PHP-w-IMAP-support-on-Slackware.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=106</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=106</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;When installing PostfixAdmin, I found that I need to re-compile PHP to support IMAP, but later more problems came to me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Environment:&amp;#160;&lt;/strong&gt;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&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Q:&amp;#160;&lt;/strong&gt;PHP configure utility reports that there is no IMAP support on my system.&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&amp;#160;&lt;/strong&gt;According to &lt;a href=&quot;http://cn2.php.net/manual/en/imap.installation.php&quot; target=&quot;_blank&quot;&gt;PHP Manual: IMAP Installation&lt;/a&gt;, I need to get something named &lt;strong&gt;c-client&lt;/strong&gt;, and compile PHP with &lt;code&gt;--with-imap[=DIR]&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Q:&amp;#160;&lt;/strong&gt;Where to get &lt;strong&gt;c-client&lt;/strong&gt;?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&amp;#160;&lt;/strong&gt;Googled answer &lt;a href=&quot;http://www.washington.edu/imap/&quot; target=&quot;_blank&quot;&gt;IMAP Information Center&lt;/a&gt;: The software and documentation is available at &lt;a href=&quot;ftp://ftp.cac.washington.edu/imap&quot;&gt;ftp://ftp.cac.washington.edu/imap&lt;/a&gt;. UW IMAP toolkit 
source distribution is available at &lt;a href=&quot;ftp://ftp.cac.washington.edu/mail/imap.tar.Z&quot;&gt;ftp://ftp.cac.washington.edu/mail/imap.tar.Z&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Q:&amp;#160;&lt;/strong&gt;So strange a package, how to make and install?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&amp;#160;&lt;/strong&gt;Normally, you should run configure, make and make install to install a package from source, but no configure found and make is different.&lt;/p&gt;
&lt;p&gt;First, make sure you have OpenSSL installed, and then follow the setps:&lt;/p&gt;
&lt;p&gt;Extract the archive downloaded to &lt;code&gt;/usr/local&lt;/code&gt; folder named imap-2007e&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;local&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap-2007e&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# slx means Linux using -lcrypt to get the crypt() function&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;make&lt;/span&gt; slx&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# BTW: you are supposed to fail this step, see notes below&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; include&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; lib&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;cd&lt;/span&gt; c-client&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cp&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;.h ..&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;include&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cp&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;*&lt;/span&gt;.c ..&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;ln&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-s&lt;/span&gt; ..&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;c-client&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;c-client.a ..&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;lib&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;libc-client.a&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;NOTE:&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;If you like me discover that &quot;make slx&quot; fails, but you&#039;re damn sure you&#039;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:&lt;/p&gt;
&lt;div class=&quot;ini geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;# Extended flags needed for SSL. &amp;#160;You may need to modify.&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLDIR&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;/usr/local/ssl&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLCERTS&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLDIR&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;/certs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLKEYS&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLCERTS&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLINCLUDE&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLDIR&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;/include&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLLIB&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLDIR&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;/lib&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLCRYPTO&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;-lcrypto&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Change SSLDIR, SSLINCLUDE and SSLIB to valid paths for Slackware. In my case, it should like this:&lt;/p&gt;
&lt;div class=&quot;ini geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;# Extended flags needed for SSL. &amp;#160;You may need to modify.&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLDIR&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;/etc/ssl&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLCERTS&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLDIR&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;/certs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLKEYS&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;$&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;SSLCERTS&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLINCLUDE&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;/usr/include/openssl&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLLIB&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;/usr/lib&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000099;&quot;&gt;SSLCRYPTO&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight:bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #660066;&quot;&gt;-lcrypto&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;You should also check your ld.so.conf for valid paths.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3&gt;&lt;strong&gt;Q:&amp;#160;&lt;/strong&gt;How to compile PHP w/ IMAP support?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&amp;#160;&lt;/strong&gt;Finally, we&#039;ve reached the last step. Re-compile PHP and everything is done. When configuring, just 

add those two imap options&lt;/p&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;configure ... &lt;span style=&quot;color: #660033;&quot;&gt;--with-imap&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;local&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;imap-2007e &lt;span style=&quot;color: #660033;&quot;&gt;--with-imap-ssl&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;make&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;make&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;install&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Bing! Your system is ready for your imap application.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 02 Jul 2009 22:57:13 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/106-guid.html</guid>
    <category>imap</category>
<category>php</category>
<category>slackware</category>
<category>technique</category>

</item>
<item>
    <title>终于用上左手的 Logitech V450 Nano Cordless Laser Mouse</title>
    <link>http://blog.nulltao.net/archives/100-Logitech-V450-Nano-Cordless-Laser-Mouse.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/100-Logitech-V450-Nano-Cordless-Laser-Mouse.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=100</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=100</wfw:commentRss>
    

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

    <pubDate>Tue, 16 Sep 2008 12:23:24 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/100-guid.html</guid>
    <category>mouse</category>
<category>setpoint</category>
<category>technique</category>
<category>tip</category>

</item>
<item>
    <title>一个 # 不够，那么就多来几个吧</title>
    <link>http://blog.nulltao.net/archives/97-unknown.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/97-unknown.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=97</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=97</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;网页中经常要做的一件事情就是让一个链接来执行一个 JavaScript 脚本，例如：&lt;code&gt;&amp;lt; href=&quot;#&quot; onClick=&quot;some_js_here();&quot;&amp;gt;Some text&amp;lt;/a&amp;gt;&lt;/code&gt;，不过这样的副作用是因为有 &lt;code&gt;href=&quot;#&quot;&lt;/code&gt;。所以导致点击完后页面会滚动到最上面。&lt;/p&gt;
&lt;p&gt;以前用的几种解决方案：&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;不写 href，这样会导致很多浏览器不会把 a 标签按照你预期的方式渲染；&lt;/li&gt;
&lt;li&gt;在href 里面直接写 JavaScript 脚本，这样不完全符合 W3C 的规范。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;其实要解决这个问题，不让浏览器把页面滚动到最上面，很简单，&lt;code&gt;href=&quot;&quot;&lt;/code&gt; 里面 多写几个 # 就行了，我一般用 6 个比较保险，这个方法适用于 IE5、IE6、IE7、FF2、FF3。虽然不知道为什么但是很好用。猜测是因为 # 表示进行页内书签的跳转，但是多个 # 浏览器就不知道什么意思了，干脆罢工好了，哈哈。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 03 Sep 2008 15:15:11 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/97-guid.html</guid>
    <category>html</category>
<category>technique</category>
<category>tip</category>

</item>
<item>
    <title>解决 propel-convert-xml-schema 把 null 默认值处理为字符串的问题</title>
    <link>http://blog.nulltao.net/archives/94-propel-convert-xml-schema-null.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/94-propel-convert-xml-schema-null.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=94</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=94</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;通过 propel-convert-xml-schema 把 xml schema 转化成 PHP 代码的时候，如果一个字符型字段不能为空且没有明确输入默认值，例如：&lt;/p&gt;
&lt;div class=&quot;xml geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;column&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;username&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;VARCHAR&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;128&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;required&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;default&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;生成的 PHP 代码中该字段的默认值是 &#039;null&#039; 而不是 null，导致页面输入框的默认值不是空值，而是一个字符串的 null，很恼火。因为要么在页面中每个字段都对 &#039;null&#039; 做特殊处理，要么修改生成的 PHP 类文件，但是一旦重新执行 propel-convert-xml-schema 就会重新覆盖。&lt;/p&gt;
&lt;p&gt;解决办法：修改 &lt;code&gt;propel-generator/classes/propel/phing/PropelCreoleTransformTask.php&lt;/code&gt; 文件（对于 Symfony 来说，就是 &lt;code&gt;symfony/vendor/propel-generator/classes/propel/phing/PropelCreoleTransformTask.php&lt;/code&gt;）。应用如下 patch：&lt;/p&gt;
&lt;div class=&quot;diff geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #440088;&quot;&gt;&lt;span style=&quot;&quot;&gt;507&lt;/span&gt;,510c507&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #991111;&quot;&gt;&amp;lt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; //$node-&amp;gt;setAttribute&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;quot;default&amp;quot;, iconv&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;$this-&amp;gt;dbEncoding, &#039;utf-8&#039;, $defValue&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #991111;&quot;&gt;&amp;lt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;!empty&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;$defValue&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #991111;&quot;&gt;&amp;lt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; $node-&amp;gt;setAttribute&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;quot;default&amp;quot;, iconv&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;$this-&amp;gt;dbEncoding, &#039;utf-8&#039;, $defValue&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #991111;&quot;&gt;&amp;lt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #888822;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #888822;&quot;&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; $node-&amp;gt;setAttribute&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;quot;default&amp;quot;, iconv&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;$this-&amp;gt;dbEncoding, &#039;utf-8&#039;, $defValue&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;参见：&lt;a href=&quot;http://trac.symfony-project.org/ticket/2045&quot; target=&quot;_blank&quot;&gt;#2045 (propel-convert-xml-schema generate null text as default values) - symfony - Trac&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;下载：&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/PropelCreoleTransformTask.7z&quot;&gt;PropelCreoleTransformTask.7z&lt;/a&gt;。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 21 Aug 2008 11:32:56 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/94-guid.html</guid>
    <category>bug</category>
<category>php</category>
<category>propel</category>
<category>symfony</category>
<category>technique</category>

</item>
<item>
    <title>在 Symfony 中结合使用 Structures/DataGrid、sfSmartView、Propel</title>
    <link>http://blog.nulltao.net/archives/93-Symfony-StructuresDataGridsfSmartViewPropel.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/93-Symfony-StructuresDataGridsfSmartViewPropel.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=93</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=93</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;今天需要在 &lt;code&gt;symfony&lt;/code&gt; 中使用 datagrid 型控件对一个分页+排序的表格进行展示。但是 &lt;code&gt;sfDataGrid&lt;/code&gt; 写得实在是太糟糕了，没有找到其他的比较好的 plugin。&lt;/p&gt;
&lt;p&gt;&lt;code&gt;PEAR&lt;/code&gt; 中的 &lt;code&gt;Structures/DataGrid&lt;/code&gt; 倒是不错。但是两个问题：无法和现在偶使用的 &lt;code&gt;sfSmartyView&lt;/code&gt; 直接结合，因为在 &lt;code&gt;$datagrid-&gt;fill($smarty);&lt;/code&gt; 的时候，&lt;code&gt;symfony&lt;/code&gt; 还没有生成 view instance，除非直接获取生成的 HTML_TABLE 或者类似的结果，这样不利于 MVC 的分离和对具体样式的控制；二是现有的 &lt;code&gt;datasource&lt;/code&gt; 无法和 &lt;code&gt;symfony&lt;/code&gt; 使用的 &lt;code&gt;propel&lt;/code&gt; 直接结合，如果采用检索全部结果再传递给 &lt;code&gt;Structures/DataGrid&lt;/code&gt; 进行分页处理，那么效率非常低下。&lt;/p&gt;
&lt;p&gt;于是自己写一个 &lt;code&gt;datasource&lt;/code&gt;，并且使用了一点技巧解决和 &lt;code&gt;sfSmartyView&lt;/code&gt; 结合的问题。&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Structures_DataGrid_DataSource_Propel&lt;/code&gt; 类的定义：&lt;/p&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Structures_DataGrid_DataSource_Propel &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;extends&lt;/span&gt; Structures_DataGrid_DataSource &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; protected &lt;span style=&quot;color: #000088;&quot;&gt;$criteria&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; protected &lt;span style=&quot;color: #000088;&quot;&gt;$con&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; protected &lt;span style=&quot;color: #000088;&quot;&gt;$object&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; __construct&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$object&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$con&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; parent&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;Structures_DataGrid_DataSource&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;object&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$object&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;con&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$con&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; &lt;a href=&quot;http://www.php.net/count&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;count&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//TODO: this is not a good way, due to MySQL Bug #21787&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setLimit&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;0&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setOffset&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;0&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$result&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;doCount&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; &lt;a href=&quot;http://www.php.net/sort&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;sort&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sortSpec&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$sortDir&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ASC&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;switch&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strtolower&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;strtolower&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sortDir&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;asc&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;addAscendingOrderByColumn&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sortSpec&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;desc&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;addDescendingOrderByColumn&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sortSpec&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;default&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; PEAR&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;raiseError&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;Sorting dir must be ASC or DESC!&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; fetch&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$offset&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; 0&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setOffset&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$offset&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt; &lt;a href=&quot;http://www.php.net/is_null&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;is_null&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setLimit&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$objects&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;doSelect&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$result&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$objects&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$object&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$object&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;toArray&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;BasePeer&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;TYPE_COLNAME&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;action&lt;/code&gt; 中的代码段：&lt;/p&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; execute&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// get data source&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Criteria&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$datasource&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Structures_DataGrid_DataSource_Propel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;SysUiaAccountPeer&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// setup datagrid&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Structures_DataGrid&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;10&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;bindDataSource&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$datasource&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setDefaultSort&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; SysUiaAccountPeer&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;USERNAME&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;DESC&amp;quot;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;addColumn&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Structures_DataGrid_Column&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;用户名&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; SysUiaAccountPeer&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;USERNAME&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; SysUiaAccountPeer&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;USERNAME&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&amp;amp;nbsp;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// add more columns here&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// use a tip to get output using smarty&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$smarty&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;setRenderer&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;smarty&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// set pager params&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$pager&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$smarty&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;smartyGetPaging&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;prevImg&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;上一页&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;nextImg&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;下一页&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;separator&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;|&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;delta&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;5&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;clearIfVoid&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;true&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;spacesBeforeSeparator&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;spacesAfterSeparator&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;firstPageText&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;第一页&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;lastPageText&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;最后页&#039;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$smarty&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;dg&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$datagrid&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getOutput&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;pager&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$pager&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; sfView&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;SUCCESS&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;模板中的处理：&lt;/p&gt;
&lt;div class=&quot;html4strict geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- Build header --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {section name=col loop=$dg.columnSet}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;th&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;$dg.columnSet&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;col&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.attributes&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- Check if the column is sortable --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {if $dg.columnSet[col].link != &amp;quot;&amp;quot;} &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/a.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #000066;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;{$dg.columnSet[col].link}&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;{$dg.columnSet[col].label}&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/a.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- Show the current ordering with an arrow --&amp;gt;&lt;/span&gt; {if&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; $dg.columnSet[col].name == $smarty.request.orderBy} {if&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; $smarty.request.direction == &amp;quot;ASC&amp;quot;}&lt;span style=&quot;color: #ddbb00;&quot;&gt;&amp;amp;uarr;&lt;/span&gt;{elseif&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; $smarty.request.direction == &amp;quot;DESC&amp;quot;}&lt;span style=&quot;color: #ddbb00;&quot;&gt;&amp;amp;darr;&lt;/span&gt;{/if} {/if} {else}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {$dg.columnSet[col].label} {/if}&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/th.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {/section}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- Build body --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; {section name=row loop=$dg.recordSet}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;if $smarty.section.row.iteration is even&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;bgcolor&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;#EEEEEE&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;if&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {section name=col loop=$dg.recordSet[row]}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;td&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;$columnSet&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;col&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.attributes&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&amp;gt;&lt;/span&gt;{$dg.recordSet[row][col]}&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; {/section}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; {/section}&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #000066;&quot;&gt;colspan&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;...&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;{$pager}&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Mon, 18 Aug 2008 00:15:50 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/93-guid.html</guid>
    <category>datagrid</category>
<category>symfony</category>
<category>technique</category>

</item>
<item>
    <title>MySQL 对于 COUNT(*) 和 LIMIT 同时使用的 BUG  </title>
    <link>http://blog.nulltao.net/archives/92-MySQL-COUNT-LIMIT-BUG.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/92-MySQL-COUNT-LIMIT-BUG.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=92</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=92</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;对一个有 29 条记录的表进行如下操作：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; COUNT&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; sys_uia_account&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;ID &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; sys_uia_account&lt;/div&gt;结果 29&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; COUNT&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; sys_uia_account&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;ID &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; sys_uia_account &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;LIMIT&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt;&lt;/div&gt;结果 29&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; COUNT&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; sys_uia_account&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;ID &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; sys_uia_account &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;LIMIT&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt;&lt;/div&gt;没有结果&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;看来以后使用 &lt;code&gt;COUNT(*)&lt;/code&gt; 的时候不能同时使用 &lt;code&gt;LIMIT offset, row_count&lt;/code&gt; 这种表达方式了。&lt;/p&gt;
&lt;p&gt;PS：如果统计全表记录，使用下面的方法会更加快捷：&lt;/p&gt;
&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; SQL_CALC_FOUND_ROWS &lt;span style=&quot;color: #66cc66;&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; sys_uia_account;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; FOUND_ROWS&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;唯一需要注意的就是，这两个查询必须在一起进行，因为 &lt;code&gt;SQL_CALC_FOUND_ROWS&lt;/code&gt; 不对结果进行任何缓存。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 17 Aug 2008 23:53:05 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/92-guid.html</guid>
    <category>bug</category>
<category>mysql</category>
<category>technique</category>
<category>tip</category>

</item>
<item>
    <title>MySQL 中用 GKB 来让 UTF-8 字段中的中文按照拼音排序</title>
    <link>http://blog.nulltao.net/archives/91-MySQL-GKB-UTF-8.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/91-MySQL-GKB-UTF-8.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=91</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=91</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;UTF-8 中的中文不是按照拼音排序的，因此对于 使用 UTF-8 编码集的字段就无法按照拼音进行排序，最简单的解决方法就是转成 GBK 编码。&lt;/p&gt;
&lt;p&gt;实例代码：&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;`test`&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;ORDER&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;BY&lt;/span&gt; CONVERT&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;`test`&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;`name`&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;USING&lt;/span&gt; GBK &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;LIMIT&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;30&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;数据库表结构：&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;EXISTS&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;`test`&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;`id`&lt;/span&gt; int&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;3&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;AUTO_INCREMENT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;`name`&lt;/span&gt; varchar&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;10&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; COLLATE utf8_bin &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;`id`&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ENGINE&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;InnoDB &amp;#160;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;DEFAULT&lt;/span&gt; CHARSET&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;utf8 COLLATE&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;utf8_bin &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;AUTO_INCREMENT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;1 ;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;测试环境：Windows 2003 Standard Edition，MySQL 5.1.22-rc-community。&lt;/p&gt;
&lt;p&gt;对于偶正在使用的 Symfony 框架，因为使用了 propel 做 ORM，比较难直接操作SQL，除非使用 RAW SQL，而且使用 RAW SQL会导致很多高级特性无法使用，解决方式：&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$criteria&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;addAscendingOrderByColumn&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;CONVERT(&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; TestPeer&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;NAME&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039; USING GBK)&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 16 Aug 2008 15:39:24 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/91-guid.html</guid>
    <category>mysql</category>
<category>php</category>
<category>sort</category>
<category>technique</category>
<category>utf-8</category>

</item>
<item>
    <title>让 Firefox3 支持 Flash</title>
    <link>http://blog.nulltao.net/archives/89-Firefox3-Flash.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/89-Firefox3-Flash.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=89</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=89</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;Firefox3 在 beta 和 RC 阶段对 Flash 支持的不好是臭名昭著，用 Google 随便搜索 Firefox3+Flash 看看结果就知道了。&lt;/p&gt;
&lt;p&gt;Beata 和 RC 不支持吧。还能说是 bug，今天正式版发布，居然还是不支持，这就说不过去啦。用 Firefox 内嵌的 addons 管理机制安装 Flash 从来就木有成功过。&lt;/p&gt;
&lt;p&gt;最后用如下方法才安装成功：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;下载 &lt;a href=&quot;http://fpdownload.macromedia.com/get/flashplayer/current/uninstall_flash_player.exe&quot; target=&quot;_blank&quot;&gt;Adobe 官方的 FLash 卸载程序&lt;/a&gt;；&lt;/li&gt;
&lt;li&gt;下载 &lt;a href=&quot;http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe&quot; target=&quot;_blank&quot;&gt;Adobe 官方的 Flash 安装程序&lt;/a&gt;；&lt;/li&gt;
&lt;li&gt;关闭 Firefox；&lt;/li&gt;
&lt;li&gt;运行卸载程序，再运行安装程序；&lt;/li&gt;
&lt;li&gt;如果有必须要，则&lt;a href=&quot;http://support.mozilla.com/en-US/kb/Troubleshooting+plugins#Re_initializing_the_plugins_database&quot; target=&quot;_blank&quot;&gt;重建 Firefox 插件数据库&lt;/a&gt;。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;最后一步不是必需的，至少偶就木有用到。&lt;/p&gt;
&lt;p&gt;现在终于能够看到满屏的 Flash 了……下一步，安装 flashblock 插件屏幕它们～hiahia～～&lt;/p&gt;
&lt;p&gt;参考：&lt;a href=&quot;http://support.mozilla.com/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=10088&quot; target=&quot;_blank&quot;&gt;FIrefox 3 and Flash pluggins &lt;/a&gt;。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 18 Jun 2008 11:49:37 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/89-guid.html</guid>
    <category>firefox</category>
<category>flash</category>
<category>technique</category>
<category>tip</category>

</item>
<item>
    <title>干活啦，开工啦，ThingingStone开始开发啦</title>
    <link>http://blog.nulltao.net/archives/84-ThingingStone.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/84-ThingingStone.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;最近赋闲，恩。好像太过于赋闲了，不怎么写代码手都生了。于是开始开启偶的 ThinkingStone 项目。&lt;/p&gt;
&lt;p&gt;之所以叫这个名字，因为偶准备把 ThinkingRock web 化，人家是 rock，俺就弄个 stone 玩玩吧。呵呵&lt;/p&gt;
&lt;p&gt;顺便玩玩 symfony 框架，据说是 PHP 界最 BT 的框架，偶喜欢，hiahia。&lt;/p&gt;
&lt;p&gt;废话不多说，上两张现在的截图看看，然后就等着发布吧。hoho。&lt;/p&gt;
&lt;p&gt;Contexts:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/contextList.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/contextList.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add a new context:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/contextInsert.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/contextInsert.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Topics:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/topicList.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/topicList.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add a new topic:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/topicInsert.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/topicInsert.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Collect thought:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/thoughtCollect.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/thoughtCollect.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add thoughts:&lt;br /&gt;&lt;a href=&quot;http://blog.nulltao.net/uploads/images/2008/thoughtInsert.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.nulltao.net/uploads/images/2008/thoughtInsert.thumb.png&quot;&gt;&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 05 Jun 2008 22:06:59 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/84-guid.html</guid>
    <category>technique</category>
<category>thingingstone</category>

</item>
<item>
    <title>symfony 学习笔记 - 2 - 开始运行 symfony</title>
    <link>http://blog.nulltao.net/archives/75-symfony-2-symfony.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/75-symfony-2-symfony.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=75</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=75</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;h3&gt;安装 symfony 库&lt;/h3&gt;
&lt;h4&gt;用 PEAR 方式安装&lt;/h4&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 在 PEAR 频道列表里添加 symfony 频道 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;pear channel-discover pear.symfony-project.com &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 查看该频道内可用的包 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;pear remote-list &lt;span style=&quot;color: #660033;&quot;&gt;-c&lt;/span&gt; symfony &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 安装 symfony 包 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;pear &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;install&lt;/span&gt; symfony&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 安装完毕后，查看版本，确认安装成功 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;symfony &lt;span style=&quot;color: #660033;&quot;&gt;-V&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 用下面这句来安装最新的 beta 版 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;install&lt;/span&gt; symfony&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony-beta&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Symfony 库被安装在以下目录内：&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;$php_dir/symfony/&lt;/code&gt;：核心库。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;$data_dir/symfony/&lt;/code&gt;：symfony
	的程序框架，默认的模块和配置信息，全球化数据等。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;$doc_dir/symfony/&lt;/code&gt;：文档。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;$test_dir/symfony/&lt;/code&gt;：单元测试。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;注：最新版本的 PEAR 安装 symfony 会出现错误，解决方法参见&lt;a
	href=&quot;http://blog.nulltao.net/archives/66-Linux-PEAR-Symfony.html&quot;
	target=&quot;_blank&quot;
&gt;在 Linux 下用 PEAR 安装 Symfony 出现错误的解决方案&lt;/a&gt;。&lt;/p&gt;
&lt;h4&gt;通过 SVN 安装&lt;/h4&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 创建 symfony 库的目录 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;mkdir&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;path&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;to&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;path&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;to&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 通过 SVN 检出发行版文件 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;svn&lt;/span&gt; checkout http:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;//&lt;/span&gt;svn.symfony-project.com&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;tags&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;RELEASE_1_0_0&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt; . &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 查看版本号，确认安装成功 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;php &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;path&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;to&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;data&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;symfony &lt;span style=&quot;color: #660033;&quot;&gt;-V&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;如果你用 SVN 方式安装，那么你需要在 &lt;code&gt;config/config.php&lt;/code&gt;
文件内修改下面两个变量的信息：&lt;/p&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sf_symfony_lib_dir&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/path/to/symfony/lib/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$sf_symfony_data_dir&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/path/to/symfony/data/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h3&gt;创建第一个程序&lt;/h3&gt;
&lt;h4&gt;创建项目&lt;/h4&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 假设当前目录为 htdocs 目录 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;a href=&quot;http://www.php.net/mkdir&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt; myproject &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;cd myproject &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 下面这句适用于 PEAR 安装方式 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;symfony init&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;project myproject &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# 下面这句适用于 SVN 安装方式 &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;php &lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;path&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;to&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;symfony&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;data&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;bin&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;symfony init&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;project myproject&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Symfony 会自动生成上一节说的那些目录结构。&lt;/p&gt;
&lt;h4&gt;创建应用&lt;/h4&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;symfony init&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;app myapp&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;建立 &lt;code&gt;web/sf/&lt;/code&gt; 目录。把 &lt;code&gt;/path/to/symfony/data/web/sf/&lt;/code&gt;
拷贝到 &lt;code&gt;myproject/web/sf/&lt;/code&gt;，或者创建对应的符号链接。&lt;/p&gt;
&lt;p&gt;现在访问 &lt;code&gt;http://localhost/myproject/web/myapp_dev.php/&lt;/code&gt;
应该能看到这样的界面：&lt;/p&gt;
&lt;p&gt;&lt;a
	href=&quot;http://www.symfony-project.org/images/book/dev/F0301.jpg&quot;
	target=&quot;_blank&quot;
&gt;&lt;img src=&quot;http://www.symfony-project.org/images/book/dev/F0301.jpg&quot;
	width=&quot;600&quot;
&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;如果你看到类似这样的界面，那么你的 symfony 第一步安装成功了。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 28 Feb 2008 16:23:45 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/75-guid.html</guid>
    <category>symfony</category>
<category>technique</category>

</item>
<item>
    <title>symfony 学习笔记 - 1 - 基础知识</title>
    <link>http://blog.nulltao.net/archives/71-symfony-1.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/71-symfony-1.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=71</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=71</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;h3&gt;symfont 的 MVC 实现&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;模型层
	&lt;ul&gt;
		&lt;li&gt;数据库抽象层&lt;/li&gt;
		&lt;li&gt;数据访问&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;视图层
	&lt;ul&gt;
		&lt;li&gt;视图&lt;/li&gt;
		&lt;li&gt;模板&lt;/li&gt;
		&lt;li&gt;布局&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;控制层
	&lt;ul&gt;
		&lt;li&gt;前端控制&lt;/li&gt;
		&lt;li&gt;动作&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;symfont 的工作流：&lt;/p&gt;
&lt;p&gt;&lt;img
	src=&quot;http://www.symfony-project.org/images/book/dev/F0202.png&quot;
/&gt;&lt;/p&gt;
&lt;h3&gt;代码组织&lt;/h3&gt;
&lt;p&gt;代码组织实例：&lt;/p&gt;
&lt;p&gt;&lt;img
	src=&quot;http://www.symfony-project.org/images/book/dev/F0203.png&quot;
/&gt;&lt;/p&gt;
&lt;h4&gt;根目录文件树结构&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;apps/&lt;/code&gt;：一个子目录对应一个应用，通常是 &lt;code&gt;frontend&lt;/code&gt; 对应前台，&lt;code&gt;backend&lt;/code&gt;对应后台。
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;frontend/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;backend/&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;batch/&lt;/code&gt;：需要从命令行运行或者周期性运行的 PHP 批处理脚本。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;cache/&lt;/code&gt;：配置信息的缓存，以及动作和和模板的缓存(如果你启用了的话)。用这个缓存机制来加速请求的响应速度，每个应用都有一个对应的目录，放置预处理过的
	PHP 和 HTML 文件。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;config/&lt;/code&gt;：每个项目的常规配置信息。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;data/：项目里和数据相关的文件，比如数据库模式、SQL 文件，甚至是 SQLite
	的数据库文件。&lt;/code&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;sql/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;functional/&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;doc/&lt;/code&gt;：项目文档，包括你自己写的文档，和由 PHPDoc 生成的文档。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;lib/&lt;/code&gt;：外部的类或者库。你可以在这里添加需要在项目级共享的代码。&lt;code&gt;model/&lt;/code&gt;
	目录里是项目整体的对象模型。
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;model/&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;log/&lt;/code&gt;：由 symfony 直接生成的日志文件。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;plugins/&lt;/code&gt;：插件目录。&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;test/&lt;/code&gt;：单元测试和功能测试脚本。在创建项目的过程中，symfony 会自动创建一些测试的。
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;unit/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;functional/&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;web/&lt;/code&gt;：Web 服务器的根目录，只有这个目录里面的文件才能被访问到。
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;css/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;images/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;js/&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;uploads/&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;模型目录树文件结构&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;apps/&lt;/code&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;[application name]&lt;/code&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;code&gt;[module name]&lt;/code&gt;
			&lt;ul&gt;
				&lt;li&gt;&lt;code&gt;actions/&lt;/code&gt;：通常情况下这个目录里只有一个名为 &lt;code&gt;actions.class.php&lt;/code&gt;
				的文件，这个文件里是该模型的全部动作，你也可以分开成单独的文件。
				&lt;ul&gt;
					&lt;li&gt;&lt;code&gt;actions.class.php&lt;/code&gt;&lt;/li&gt;
				&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;&lt;code&gt;config/&lt;/code&gt;：该模型的自定义配置信息，可以有本地化参数。&lt;/li&gt;
				&lt;li&gt;&lt;code&gt;lib/&lt;/code&gt;：该模型特有的类库。&lt;/li&gt;
				&lt;li&gt;&lt;code&gt;templates/&lt;/code&gt;：与每个动作对应的模板文件。在创建模型的时候会自动生成默认模板文件 &lt;code&gt;indexSuccess.php&lt;/code&gt;。
				&lt;ul&gt;
					&lt;li&gt;&lt;code&gt;indexSuccess.php&lt;/code&gt;&lt;/li&gt;
				&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;&lt;code&gt;validate/&lt;/code&gt;：专门用来校验表单数据的配置文件。&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Web 目录树文件结构&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;web/&lt;/code&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;code&gt;css/&lt;/code&gt;：样式表文件。&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;images/&lt;/code&gt;：图形文件。&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;js/&lt;/code&gt;：JavaScript 脚本文件。&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;uploads/&lt;/code&gt;：用户上传的目录。&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt; 
    </content:encoded>

    <pubDate>Wed, 27 Feb 2008 23:45:00 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/71-guid.html</guid>
    <category>symfony</category>
<category>technique</category>

</item>
<item>
    <title>用 .htaccess 文件来屏蔽指定的浏览器的访问</title>
    <link>http://blog.nulltao.net/archives/73-.htaccess.html</link>
            <category>TechniquE</category>
    
    <comments>http://blog.nulltao.net/archives/73-.htaccess.html#comments</comments>
    <wfw:comment>http://blog.nulltao.net/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.nulltao.net/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>nulltao@gmail.com (Wei Geng)</author>
    <content:encoded>
    &lt;p&gt;最近不知道找谁惹谁了，总是有一个 &lt;code&gt;HTTP_USER_AGENT&lt;/code&gt; 以 &lt;code&gt;larbin&lt;/code&gt; 开头的浏览器访问（估计是用了什么类库吧。不像是一个真正的浏览器），导致偶的访客记录表大量的冗余记录。今天决定用 &lt;code&gt;.httaccess&lt;/code&gt; 来彻底杜绝。&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;.htaccess&lt;/code&gt; 最后添加如下记录：&lt;/p&gt;
&lt;div class=&quot;apache geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;RewriteCond&lt;/span&gt; %{HTTP_USER_AGENT} larbin [NC,OR]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;RewriteRule&lt;/span&gt; .* - [F] &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;现在，世界清静了。&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 26 Feb 2008 20:24:52 +0800</pubDate>
    <guid isPermaLink="false">http://blog.nulltao.net/archives/73-guid.html</guid>
    <category>htaccess</category>
<category>technique</category>

</item>

</channel>
</rss>