5. Cyrus 的安装 请小心地按照 Cyrus 分发版中的注意事项进行安装. 你可以在下面的网址中找到这些注意事项的一个拷贝: [5]http://andrew2.andrew.cmu.edu/cyrus/imapd/install.html 关于某些安装步骤的一些提示: 如果你用的是 Slackware 3.4 ( 使用 影子口令 ), 你应当这样配置 : ./configure --with-login=unix_pwcheck 并直接这样 make 就可以: make depend make all CFLAGS=-O 第一步: 当加入 cyrus 用户时, 我将用户信息加锁, 以最小化可能的安全漏洞. 第三步: 我不单单是拷贝一个 /etc/syslog.conf , 而且编辑它们. 第九步: 在 linux 下, 确认象下面那样激活 pwcheck , 否则服务器便不会正确地工作: umask 0;/usr/cyrus/bin/pwcheck & umask 022 然后把下面的代码加到激活脚本中: if [ -f /usr/cyrus/bin/pwcheck ]; then echo -n "Starting pwcheck for imap" umask 0;/usr/cyrus/bin/pwcheck & umask 022 fi 我将这些代码加入到我的 /etc/rc.d/rc.local 中, 它们运行正常. 第十二步: 当编辑 /etc/inetd.conf 的时候, 记得将 TCP 包 包含进去,如下: imap stream tcp nowait cyrus /usr/sbin/tcpd /usr/cyrus/bin/imapd 还有当你编辑完成后, 不要忘了给 inetd 发送-HUP信号: # ps ax | grep inetd 61 ? S 0:00 /usr/sbin/inetd # kill -HUP 61
6. Sendmail 的设定 如果你没有 sendmail 的源码, 现在就下载吧. 除了运行 IMAP 外, 你还可以用它来做许多有趣的事, 比如设置反垃圾邮件的特性等等. 下面是我的 mc 文件. 除非在 /etc/sendmail.cN 文件中有用户名的入口, 否则它将把邮件转移给 IMAP. 它允许像 root 那样的系统用户把他们的邮件保存在缓冲池里; 然而, 一般的用户账号缺省地将使用 IMAP. 不要简单的拷贝下面的代码, 因为 sendmail 会因为用的是空格而不是制表符而出错: divert(-1) # # (C) Copyright 1995 by Carnegie Mellon University # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permission notice appear in # supporting documentation, and that the name of CMU not be # used in advertising or publicity pertaining to distribution of the # software without specific, written prior permission. # # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # # Contributed to Berkeley by John Gardiner Myers . # # This sample mc file is for a site that uses the Cyrus IMAP server # exclusively for local mail. #