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

📄 0520openwebmail.htm

📁 鸟哥LINUX 学习课本
💻 HTM
📖 第 1 页 / 共 4 页
字号:
root]# </font><b><font color="#ffff00">yum update</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 这个动作仅只是要升级刚刚的套件而已;</font><br><font size="-1" color="#ff6666" face="SimSun"> </font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">rpm -ivh openwebmail-2.40-1.i386.rpm</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 注意:在预设的情况下,openwebmail 会将档案资料安装至与 apache 有关的路径</font><br><font size="-1" color="#ff6666" face="SimSun"># 也就是 /var/www/data与 /var/www/cgi-bin 底下,所以,如果您已经将 apache</font><br><font size="-1" color="#ff6666" face="SimSun"># 以 tarball方式安装,导致拥有不同的 WWW Root 路径时,最好使用 tarball</font><br><font size="-1" color="#ff6666" face="SimSun"># 来安装您的openwebmail 啊!</font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" color="#cccccc" face="SimSun">2. 初始化设定:</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">cd /var/www/cgi-bin/openwebmail</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testopenwebmail]# </font><b><font color="#ffff00">./openwebmail-tool.pl --init</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 因为 openwebmail支持相当多种认证机制,因此,我们必须在使用 opewebmail&#160;</font><br><font size="-1" color="#ff6666" face="SimSun"># 之前,先将openwebmail 的相关设定做好!上面 openwebmail-tool.pl --init</font><br><font size="-1" color="#ff6666" face="SimSun"># 就是在达成这样的目标。此外,这个步骤会进行蛮长的一段时间喔!请耐心等候!</font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testopenwebmail]# </font><b><font color="#ffff00">cd etc</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testetc]# </font><b><font color="#ffff00">vi dbm.conf</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 找到并修改成底下几行:</font><br><font size="-1" color="#ffff00" face="SimSun">dbm_ext&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;.db</font><br><font size="-1" color="#ffff00" face="SimSun">dbmopen_ext&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;.db</font><br><font size="-1" color="#ffff00" face="SimSun">dbmopen_haslock&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;yes</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testetc]# </font><b><font color="#ffff00">cd ..</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testopenwebmail]# </font><b><font color="#ffff00">./openwebmail-tool.pl --init</font></b></font><br><font size="-1" color="#ffffff" face="SimSun">Welcome tothe Open WebMail!</font><p><font size="-1" color="#ffffff" face="SimSun">This programis going to send a short message back to the developer,</font><br><font size="-1" color="#ffffff" face="SimSun">so we couldhave the idea that who is installing and how many sites are</font><br><font size="-1" color="#ffffff" face="SimSun">using thissoftware, the content to be sent is:</font></p><p><font size="-1" color="#ffffff" face="SimSun">OS: Linux 2.4.22-1.2199.nptli686</font><br><font size="-1" color="#ffffff" face="SimSun">Perl: 5.008003</font><br><font size="-1" color="#ffffff" face="SimSun">WebMail: OpenWebMail 2.40 20040816</font></p><p><font size="-1" color="#ffffff" face="SimSun">Send the sitereport?(Y/n)</font><br><font size="-1" color="#ffffff" face="SimSun">sending report...</font></p><p><font size="-1" color="#ffffff" face="SimSun">Thank you.</font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" color="#cccccc" face="SimSun">3. 进一步设定:</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testopenwebmail]# </font><b><font color="#ffff00">cd etc</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root#testetc]# </font><b><font color="#ffff00">vi openwebmail.conf</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 找到这一行:</font><br><font size="-1" color="#ffffff" face="SimSun">default_language&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;en</font><br><font size="-1" color="#ff6666" face="SimSun"># 改成这样子:</font><br><font size="-1" color="#ffff00" face="SimSun">default_language&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;zh_TW.Big5</font></p></td></tr></tbody></table> <br>一般来说,设定成这样就足够您运作 openwebmail 了,不过,您的 WWW 主机必须要能提供perl 的执行环境,因为 openwebmail 就是以 perl 写成的啊!以 apache 为例,您必须要知道如何启动perl 的 CGI 执行环境:<br> <table bgcolor="#000000" border="1" cols="1" width="550"><tbody><tr><td><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]#</font><b><font color="#ffff00"> vi /etc/httpd/conf/httpd.conf</font></b></font><br><font size="-1" color="#ffffff" face="SimSun">ScriptAlias/cgi-bin/ "/var/www/cgi-bin/"</font><br><font size="-1" color="#ffffff" face="SimSun">&lt;Directory"/var/www/cgi-bin"&gt;</font><br><font size="-1" color="#ffffff" face="SimSun">&#160;&#160;&#160;AllowOverride None</font><br><font size="-1" color="#ffffff" face="SimSun">&#160;&#160;&#160;Options None</font><br><font size="-1" color="#ffffff" face="SimSun">&#160;&#160;&#160;Order allow,deny</font><br><font size="-1" color="#ffffff" face="SimSun">&#160;&#160;&#160;Allow from all</font><br><font size="-1" color="#ffffff" face="SimSun">&lt;/Directory&gt;</font><br><font size="-1" color="#ffffff" face="SimSun">AddHandlercgi-script .cgi .pl</font></td></tr></tbody></table> <br>至少上面的设定要设定妥当才行啊!好了,那么如何使用 openwebmail 呢?直接在您的浏览器上面输入:<br> <ul><font color="#000066">http://your.linux.server/cgi-bin/openwebmail/openwebmail.pl</font></ul> <br>就可以使用 openwebmail 啰!很简单吧!不过,如果万一您的认证一直无法成功的话,可以指定一下认证机制看看:<br> <table bgcolor="#000000" border="1" cols="1" width="600"><tbody><tr><td><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]#</font><b><font color="#ffff00"> cd /var/www/cgi-bin/openwebmail/auth</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testauth]# </font><b><font color="#ffff00">vi auth_unix.pl</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 找到底下:</font><br><font size="-1" color="#ffffff" face="SimSun">my $passwdfile_plaintext= $conf{'passwdfile_plaintext'} || '/etc/passwd';</font><br><font size="-1" color="#ffffff" face="SimSun">my $passwdfile_encrypted= $conf{'passwdfile_encrypted'} || '/etc/master.passwd';</font><br><font size="-1" color="#ff6666" face="SimSun"># 改成这样:</font><br><font size="-1" color="#ffff00" face="SimSun">my $unix_passwdfile_plaintext="/etc/passwd";</font><br><font size="-1" color="#ffff00" face="SimSun">my $unix_passwdfile_encrypted="/etc/shadow";</font></td></tr></tbody></table>&nbsp;</ul><hr width="100%"><a name="install_mdk10"></a><img src="0520openwebmail_files/penguin-s.gif" nosave="" align="middle" height="23" width="17"><font color="#000099">MDK10.0的 Tarball 安装</font><br> <ul>如果您是使用 MDK 作为您的 Linux 系统时,由于 OpenWebMail 并没有针对这个操作系统来设计RPM 档案,所以,这里我们以 Tarball 来进行安装。首先,请先确认一下您的 Postfix与 Apache 已经安装妥当。底下我们就完整的来谈一谈啰!(同样的,更详细的 Postfix+ SASL 的 SMTP 身分认证信息请查阅:<a href="http://linux.vbird.org/linux_server/0390postfix.php">http://linux.vbird.org/linux_server/0390postfix.php</a>)<br> <table bgcolor="#000000" border="1" cols="1" width="550"><tbody><tr><td><font size="-1" color="#ffffff" face="SimSun"># 0. 先确定一下底下这些套件都已经安装了(使用rpm 的方式来安装的)</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]#</font><b><font color="#ffff00"> rpm -qa | egrep '(sasl|postfix|imap)'|sort</font></b></font><br><font size="-1" color="#ffffff" face="SimSun">cyrus-sasl-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">imap-2002d-8mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libpostfix1-2.1.1-0.1.100mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libsasl2-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libsasl2-devel-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libsasl2-plug-anonymous-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libsasl2-plug-login-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">libsasl2-plug-plain-2.1.15-10mdk</font><br><font size="-1" color="#ffffff" face="SimSun">postfix-2.1.1-0.1.100mdk</font><br><font size="-1" color="#ff6666" face="SimSun"># 若没有安装任何一个套件,请使用urpmi 来安装喔!</font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" color="#ffccff" face="SimSun"># 1. 建立 saslauthd认证机制与 smtp 认证档案:</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">vi /etc/sysconfig/saslauthd</font></b></font><br><font size="-1" color="#ffff00" face="SimSun">#SASL_AUTHMECH=pam</font><br><font size="-1" color="#ffff00" face="SimSun">SASL_AUTHMECH=shadow</font><br><font size="-1" color="#ff6666" face="SimSun"># 事实上,就是将认证机制修订成为shadow 就是了。</font><br><font size="-1" color="#ffffff" face="SimSun"> </font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">mkdir /etc/postfix/sasl</font></b></font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">vi /etc/postfix/sasl/smtpd.conf</font></b></font><br><font size="-1" color="#ffff00" face="SimSun">pwcheck_method:saslauthd</font><br><font size="-1" color="#ffff00" face="SimSun">mech_list:plain login</font><br><font size="-1" color="#ff6666" face="SimSun"># 这一版的postfix 比较奇怪,他的认证档案预设就是放置在这里喔!</font><p><font size="-1" color="#ffccff" face="SimSun"># 2. 修订 postfix的设定档 master.cf:</font><br><font size="-1" face="SimSun"><font color="#ffffff">[root@testroot]# </font><b><font color="#ffff00">vi /etc/postfix/master.cf</font></b></font><br><font size="-1" color="#ff6666" face="SimSun"># 找到这个:</font><br><font size="-1" color="#ffffff" face="SimSun">smtp&#160;&#160;&#160;inet&#160;&#160;&#160; n&#160;&#160;&#160;&#160;&#160;&#160; -&#160;&#160;&#160;&#160;&#160;&#160;y&#160;&#160;&#160;&#160;&#160;&#160; -&#160;&#160;&#160;&#160;&#160;&#160;-&#160;&#160;&#160;&#160;&#160;&#160; smtpd</font><br><font size="-1" color="#ff6666" face="SimSun"># 改为这个:</font><br><font size="-1" color="#ffff00" face="SimSun">smtp&#160;&#160;&#160;inet&#160;&#160;&#160; n&#160;&#160;&#160;&#160;&#160;&#160; -&#160;&#160;&#160;&#160;&#160;&#160;n&#160;&#160;&#160;&#160;&#160;&#160; -&#160;&#160;&#160;&#160;&#160;&#160;-&#160;&#160;&#160;&#160;&#160;&#160; smtpd</font><font size="-1" color="#ffff00" face="SimSun"></font></p><p><font size="-1" color="#ffccff" face="SimSun"># 3. 修订 postfix的设定档 main.cf:</font><br><font size="-1" color="#ff6666" face="SimSun"># 基本上,内容就有点类似底下这样:</font><br><font size="-1" color="#ff6666" face="SimSun"># Postfix 在MDK 10.0 底下的预设设定数据:</font><br><font size="-1" color="#ffff00" face="SimSun">readme_directory= /usr/share/doc/postfix-2.1.1/README_FILES</font><br><font size="-1" color="#ffff00" face="SimSun">sample_directory= /usr/share/doc/postfix-2.1.1/samples</font><br><font size="-1" color="#ffff00" face="SimSun">html_directory= /usr/share/doc/postfix-2.1.1/html</font><br><font size="-1" color="#ffff00" face="SimSun">sendmail_path= /usr/sbin/sendmail.postfix</font><br><font size="-1" color="#ffff00" face="SimSun">setgid_group= postdrop</font><br><font size="-1" color="#ffff00" face="SimSun">command_directory= /usr/sbin</font><br><font size="-1" color="#ffff00" face="SimSun">manpage_directory= /usr/share/man</font><br><font size="-1" color="#ffff00" face="SimSun">daemon_directory= /usr/lib/postfix</font><br><font size="-1" color="#ffff00" face="SimSun">newaliases_path= /usr/bin/newaliases.postfix</font><br><font size="-1" color="#ffff00" face="SimSun">mailq_path= /usr/bin/mailq.postfix</font><br><font size="-1" color="#ffff00" face="SimSun">queue_directory= /var/spool/postfix</font><br><font size="-1" color="#ffff00" face="SimSun">mail_owner= postfix</font>

⌨️ 快捷键说明

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