⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1406.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
courier-imap-1.7.1.tar.bz2<br>
cyrus-sasl-1.5.28.tar.gz<br>
pam_mysql-0.5.tar.gz<br>
postfix-2.0.6.tar.gz<br>
<br>
安装MySQL,这个网上资料很多,如果有不清楚的,请去查文档。<br>
#/usr/sbin/useradd mysql<br>
#tar zvxf mysql-4.0.12.tar.gz<br>
#cd mysql*<br>
#./configure --prefix=/usr/local/mysql<br>
#make<br>
#make install<br>
#scripts/mysql_install_db<br>
#chown -R mysql.root /usr/local/mysql/var<br>
#/usr/local/mysql/bin/mysqld_safe -u mysql &<br>
#cd ..<br>
好了,MySQL已经搞定了。<br>
<br>
安装pam_mysql<br>
#tar zvxf pam_mysql*gz<br>
#cd pam_mysql*<br>
将pam_mysql.c中第54行注释掉,/* #define DEBUG */<br>
#make<br>
#cp pam_mysql.so /lib/security<br>
#cd ..<br>
<br>
安装Cyrus-SASL<br>
#tar zvxf cyrus-sasl*gz<br>
#cd cyrus-sasl*<br>
#./configure --disable-sample --disable-pwcheck --disable-cram --disable-digest --disable-krb4<br>
--disable-gssapi --disable-anon --enable-plain --enable-login<br>
#make<br>
#make install<br>
#ln -s /usr/local/lib/sasl /usr/lib/sasl<br>
#echo /usr/local/lib &gt;&gt; /etc/ld.so.conf<br>
#echo /usr/local/lib/sasl &gt;&gt; /etc/ld.so.conf<br>
#echo /usr/local/mysql/lib/mysql &gt;&gt; /etc/ld.so.conf<br>
#/sbin/ldconfig<br>
#echo pwcheck_method: pam &gt; /usr/lib/sasl/smtpd.conf<br>
#cd ..<br>
<br>
安装Postfix<br>
如果系统上有sendmail,请先将其停止,并备份sendmail的二进制文件和配置文件。<br>
#tar zvxf postfix*gz<br>
#cd postfix*<br>
#/usr/sbin/groupadd postfix<br>
#/usr/sbin/groupadd postdrop<br>
#/usr/sbin/useradd -g postfix -d /dev/null -s /bin/false postfix<br>
#make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/local/mysql/include/mysql -I/usr/local/include'<br>
'AUXLIBS=-L/usr/local/mysql/lib/mysql -L/usr/local/lib/sasl -lmysqlclient -lsasl -lz -lm'<br>
#make install<br>
#cd ..<br>
<br>
安装courier-imap<br>
#tar jvxf courier-imap*bz2<br>
#cd courier-imap*<br>
#./configure --without-authpwd --without-authpam --without-authuserdb --without-authshadow<br>
--without-cram --without-chkpw --without-ldap --without-pgsql --without-authdaemon<br>
--without-authcustom --with-authmysql<br>
#make<br>
#make check<br>
#make install<br>
#make install-configure<br>
#cd ..<br>
<br>
创建数据库,表。表结构见下:<br>
#/usr/local/mysql/bin/mysql<br>
mysql&gt;create database postfix;<br>
mysql&gt;exit;<br>
#/usr/local/mysql/bin/mysql &lt; /tmp/postfix.sql<br>
<br>
#####cut from here#####(postfix.sql)<br>
CREATE TABLE postfix_mailauth (<br>
userid char(20) binary NOT NULL default '',<br>
username char(60) NOT NULL default '',<br>
domain char(50) NOT NULL default '',<br>
uid smallint(5) unsigned NOT NULL default '12345',<br>
gid smallint(5) unsigned NOT NULL default '12345',<br>
clearpw char(20) binary NOT NULL default '',<br>
home char(100) NOT NULL default '',<br>
maildir char(150) NOT NULL default '',<br>
quota char(100) NOT NULL default '',<br>
last_access int(10) unsigned NOT NULL default '0',<br>
status tinyint(3) unsigned NOT NULL default '1',<br>
passwd_lastchanged int(10) unsigned NOT NULL default '0',<br>
PRIMARY KEY (username),<br>
KEY status (status)<br>
) TYPE=MyISAM;<br>
<br>
CREATE TABLE postfix_forward (<br>
username varchar(50) NOT NULL default '',<br>
domain varchar(40) NOT NULL default '',<br>
forward_addr text NOT NULL,<br>
PRIMARY KEY (username)<br>
) TYPE=MyISAM;<br>
<br>
CREATE TABLE postfix_transport (<br>
domain varchar(50) NOT NULL default '',<br>
transport varchar(8) NOT NULL default 'virtual:',<br>
PRIMARY KEY (domain)<br>
) TYPE=MyISAM;<br>
#####cut end#####<br>
其中的uid和gid的default值请设置为系统用户postfix的uid和gid<br>
<br>
配置pam<br>
在/etc/pam.d/下创建文件smtp,内容如下:<br>
#####<br>
auth sufficient pam_mysql.so user=your_userid passwd=your_password host=localhost db=postfix table=postfix_mailauth usercolumn=username passwdcolumn=clearpw crypt=0<br>
account required pam_mysql.so user=your_userid passwd=your_password host=localhost db=postfix table=postfix_mailauth usercolumn=username passwdcolumn=clearpw crypt=0<br>
auth sufficient pam_unix_auth.so<br>
account sufficient pam_unix_acct.so<br>
#####<br>
<br>
编辑courier-imap配置文件/usr/lib/courier-imap/etc/authmysqlrc,设置访问mysql的一些参数,比较简单,参见注释就行。<br>
<br>
编辑/etc/postfix/main.cf<br>
一般的配置请参见文件内的注释,需要注意的是以下几处:<br>
#####所有的帐号,别名均在数据库中<br>
virtual_mailbox_domains = $mydomain, esphere.info, capitaltech.net, netruth.com, netruth.biz<br>
transport_maps = mysql:/etc/postfix/transport.cf<br>
virtual_mailbox_base = /<br>
virtual_uid_maps = mysql:/etc/postfix/uid.cf<br>
virtual_gid_maps = mysql:/etc/postfix/gid.cf<br>
virtual_mailbox_maps = mysql:/etc/postfix/users.cf<br>
virtual_maps = mysql:/etc/postfix/forward.cf<br>
#####注意这里的最后的/不能丢<br>
home_mailbox = Maildir/<br>
#####SASL<br>
smtpd_sasl_auth_enable = yes<br>
smtpd_sasl_local_domain = $myhostname<br>
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated permit_auth_destination reject<br>
smtpd_sasl_security_options = noanonymous<br>
smtpd_client_restrictions = permit_sasl_authenticated<br>
broken_sasl_auth_clients = yes<br>
<br>
#####uid.cf<br>
user = your_userid<br>
password = your_password<br>
dbname = postfix<br>
table = postfix_mailauth<br>
select_field = uid<br>
where_field = username<br>
hosts = localhost<br>
<br>
#####gid.cf<br>
user = your_userid<br>
password = your_password<br>
dbname = postfix<br>
table = postfix_mailauth<br>
select_field = gid<br>
where_field = username<br>
hosts = localhost<br>
<br>
#####transport.cf<br>
user = your_userid<br>
password = your_password<br>
dbname = postfix<br>
table = postfix_transport<br>
select_field = transport<br>
where_field = domain<br>
hosts = localhost<br>
<br>
#####forward.cf<br>
user = your_userid<br>
password = your_password<br>
dbname = postfix<br>
table = postfix_forward<br>
select_field = forward_addr<br>
where_field = username<br>
hosts = localhost<br>
<br>
#####users.cf<br>
user = your_userid<br>
password = your_password<br>
dbname = postfix<br>
table = postfix_mailauth<br>
select_field = maildir<br>
where_field = username<br>
hosts = localhost<br>
<br>
到此基本成功,剩下的写些php脚本,所有的事情(添加、删除、修改用户、别名、域名)都可以通过web来做。<br>
<br>
注:上文中的your_userid和your_password是指访问mysql的用户名和密码。<br>
<br>
#####boot pop3 service<br>
/usr/lib/courier-imap/libexec/pop3d.rc start<br>
#####boot postfix<br>
/usr/sbin/postfix start
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -