mini-HOWTO install Cyrus IMAP Server <author>Kevin Mitchell, <tt>kevin@iserv.net</tt> <date>v0.9, 21 Jan 1998 <trans>高橋 聡 <tt>hisai@din.or.jp</tt> <tdate> xx Jul 1999 <abstract> <!-- This documentation is to offer some help in installing the Cyrus IMAP Server on a Linux machine. --> このドキュメントは Cyrus IMAP サーバを Linux にインストールする 際の手助けをする目的で書かれました。 </abstract> <toc> <!-- 1. Introduction --> <sect>序論 <p> <!-- I would like to thank Bob Anderson (boba@iserv.net) and Jorge Paramo (jorge@iserv.net) for helping me in my various Linux adventures. --> Bob Anderson (boba@iserv.net) と Jorge Paramo 両氏に感謝します。 Linux で色々なことに挑戦する時に、助けてくださいました。 <!-- What is IMAP and why should I use it? --> <sect1>IMAP とは何物で、どうして使うべきなのか? <p> <!-- IMAP (Internet Message Access Protocol) is a method of accessing electronic mail or bulletin board messages that are kept on a mail server. IMAP is seen by many as a replacement for POP (Post Office Protocol) mail. IMAP allows users to access their e-mail from different computers without having to download it. This method of mail access is more secure and offers many benefits to the end user. --> IMAP (Internet Message Access Protocol) はメール・サーバ上にある 電子メールや掲示板のメッセージを取得するための手段です。IMAP は 一般に POP (Post Office Protocol) に置き換わるものと考えられています。 これを使うと、複数のコンピュータから、サーバ上の電子メールをダウンロード しなくとも、購読することができるようになります。またセキュリティも 高まりますし、エンド・ユーザにとっても多くのメリットがあります。 <p> <!-- A more indepth answer can be found at: --> 詳細はここを見てください:<newline> <htmlurl url="http://www.imap.org/whatisIMAP.html"> <p> <!-- A comparision of IMAP & POP can be found here: --> IMAP と POP の比較はここを見てください:<newline> <htmlurl url="http://www.imap.org/imap.vs.pop.brief.html"> <!-- Why use the Cyrus server? --> <sect1>なぜ Cyrus サーバを使うのか? <p> <!-- Cyrus is designed to be run on a server where normal users are not permitted to log in. Cyrus also seems to be among the two most popular IMAP servers for Unix. The University of Washington IMAP Server is the other. --> Cyrus は 一般ユーザの login を許可していないサーバ上で動くように 設計されています。また Unix 上で動くポピュラーな IMAP サーバとして 知られている 2 つの内の 1 つです。もう 1 つのサーバは The University of Washington IMAP Server です。このサーバはここから 取ってこられます。<newline> <htmlurl url="ftp://ftp.cac.washington.edu/imap/imap.tar.Z"> <!-- 2. My System Details --> <sect>システム環境について <p> <!-- I have successfully installed Cyrus on both 486DX66 and Pentium machines running Linux Kernel 2.1.79 and 2.0.33 respectively. These machines were originally based upon Slackware 3.4. --> 私が Cyrus のインストールに成功したマシンには、486DX66 と Pentium が 搭載されていて、そこではカーネル 2.1.79 と 2.0.33 がそれぞれ稼働しています。 これらのマシンは Slackware 3.4 をベースに構築されています。 <!-- 3. Tcl Installation --> <sect>Tcl のインストール <p> <!-- Make sure that you have Tcl installed on your machine before attempting to install Cyrus - otherwise you will not be able to use the Cyrus Admin Tool (cyradm). --> Cyrus をインストールしようとする前に、すでに Tcl がインストールされて いる必要があります。Tcl がインストールされていないと、Cyrus の管理 ツール(cyadm)が利用できません。 <p> <!-- You can find the latest tcl source at --> 最新の Tcl のソースはここにあります。<newline> <url url="ftp://ftp.sunlabs.com/pub/tcl/"> <p> <!-- After installation, make sure that the file libtcl.a is found in the /usr/local/lib/ directory. Tcl 8.0 makes a file called libtcl8.0.a to which you should create a soft link using the following command: --> インストールが終ったら、libtcl.a が /usr/local/lib ディレクトリにある ことを確認してください。Tcl 8.0 は、libtcl8.0.a という名前のライブラリ・ ファイルをつくりますので、次のコマンドを使ってシンボリック・リンクをはって ください。 <p><tscreen><verb> # ln -s libtcl8.0.a libtcl.a </verb></tscreen> <!-- 4. makedepend Installation --> <sect>makedepend を使ったインストール <p> <!-- Check your system for the makedepend command. If you don't have it, don't worry - it comes with the Cyrus source. (I didn't have it on my installations of Slackware 3.4) --> あなたのシステムに makedepend コマンドがあるかを確認してください。 もしなくても、気にすることはありません。Cyrus のソースについてきます。 (Slackware 3.4 にはついてきませんでした。) <!-- To install makedepend, extract the Cyrus distribution, change to the makedepend directory, and enter the following sequence of commands: --> makedepend をインストールしたら、Cyrus を展開して makedepend のある ディレクトリに移ってください。移ったら次のコマンドを実行してください。 <p><tscreen><verb> ./configure make cp ./makedepend /usr/local/bin/makedepend </verb></tscreen> <!-- 5. Cyrus Installation --> <sect>Cyrus のインストール <p> <!-- Follow the instructions that come with the Cyrus distribution carefully. You can find a copy of them online at: --> Cyrus 付属のドキュメントをしっかり読んでインストールしてください。 ドキュメントはオンラインで読むことができます:<newline> <url url="http://andrew2.andrew.cmu.edu/cyrus/imapd/install.html"> <p> <!-- Some tips for some of the steps: --> インストールする時に参考になる tips をあげておきます: <p> <!-- If you are running Slackware 3.4 (with Shadow Passwords), make sure that you configure in this way: --> もし Slackware 3.4 (シャドウ・パスワード使用)を使っているなら、この ように設定してください。 <p><tscreen><verb> ./configure --with-login=unix_pwcheck </verb></tscreen> <p> <!-- make is pretty straight forward: --> make は 簡単にできます。 <p><tscreen><verb> make depend make all CFLAGS=-O </verb></tscreen> <p> <!-- Step 1: When adding the user cyrus, I locked down the account to help minimize any security holes. --> ステップ 1 : cyrus というユーザ・アカウントは、セキュリティ・ホールを できるだけ減らすために使用禁止にしました。 <p> <!-- Step 3: I edited the /etc/syslog.conf file rather than copy theirs. --> ステップ 3: cyrus 付属の syslog.conf をコピーせずに、既存のファイルを修正 しました。 <p> <!-- Step 9: With Linux, make sure to start up pwcheck in this way otherwise the server will not work right: --> ステップ 9: Linux では pwcheck を起動しておくことを忘れないでください。 さもないとサーバが動きません。 <p><code> umask 0;/usr/cyrus/bin/pwcheck & umask 022 </code> <p> <!-- Then add it to a startup script like this: --> 起動時に実行するスクリプトに、こんな感じで追加してください。 <p><code> if [ -f /usr/cyrus/bin/pwcheck ]; then echo -n "Starting pwcheck for imap" umask 0;/usr/cyrus/bin/pwcheck & umask 022 fi </code> <p> <!-- I put mine in /etc/rc.d/rc.local and it works well. --> 私は /etc/rc.d/rc.local に記述して、うまく動作しています。 <!-- Step 12: When editing the /etc/inetd.conf, make sure to include the TCP Wrappers in your line like this: --> ステップ 12:/etc/inetd.conf を修正する時に、下記のように TCP Wrappers から起動するようにしてください。 <p><code> imap stream tcp nowait cyrus /usr/sbin/tcpd /usr/cyrus/bin/imapd imap </code> <p> <!-- And don't forget to kill -HUP inetd after you are done making your addition: --> 修正が済んだら忘れずに 'kill -HUP' を実行して,inetd に HUP シグナルを 送ってください。 <p><tscreen><verb> # ps ax | grep inetd 61 ? S 0:00 /usr/sbin/inetd # kill -HUP 61 </verb></tscreen> <!-- 6. Sendmail Configuration --> <sect>Sendmail の設定 <p> <!-- Download the sendmail source if you don't already have it. Besides running IMAP, you can do fun things like setting up anti-spam measures. --> もし sendmail を持っていないなら、ソースをダウンロードしてください。 IMAP を動かす他にも、スパム対策の設定を行う、というような楽しい作業が 待っています。 <p> <!-- Here is my mc file. It will deliver mail to the IMAP location unless there is an entry of that username in the /etc/sendmail.cN file. This allows system accounts like root to keep their mail in a spool; however, user accounts use IMAP by default. Do not simply copy & paste this code because sendmail will compain about spaces being used rather than tabs: --> 下記が私の mc ファイルです。/etc/sendmail.cN ファイルにユーザ名がなくても IMAP にメイルを配送できます。この設定で root のようなシステム用のアカウ ントに対してのメールをスプールに入れることができます。<newline> IMAP はデフォルトで、アカウントがあるユーザは IMAPを利用するように設定され ています。下記のコードを Copy & Paste しないでください。sendmail はスペース ではなく、タブを使用することになっていますから。 <p><code> 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 P ERFORMANCE 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. # divert(0)dnl VERSIONID(`@(#)cyrusproto.mc 8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3') OSTYPE(linux) define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') FEATURE(nouucp) FEATURE(nocanonify) FEATURE(always_add_domain) MAILER(smtp) MAILER(local) MAILER(cyrus) define(`confLOCAL_MAILER',`cyrus') LOCAL_RULE_0 R$=N $: $#local $: $1 R$=N $: $#local $: $1 Rbb + $+ $#cyrusbb $: $1 LOCAL_CONFIG FN /etc/sendmail.cN # end of mc file </code> <p> <!-- After making the /etc/sendmail.cf file, create a file called /etc/sendmail.cN and put in the username of accounts that do not wish to use the IMAP delivery method: --> /etc/sendmail.cf ファイルを作ったら、 /etc/sendmail.cN ファイルを 作って、IMAP を使用しない方がよいユーザのアカウントを加えましょう。 <itemize> <item>root <item>majordom <item>stan <item>mothra </itemize> <!-- After installing Sendmail 8.8.8 I also installed mail.local as my local delivery program for these other accounts. There is a trick to making mail.local. Change to the mail.local directory in the sendmail source and do the following: --> 私は Sendmail 8.8.8 をインストールしたら、ローカルなメール配送をするために mail.local もインストールしました。mail.local を作るにはちょっとしたコツが 必要です。sendmail のソースの中の mail.local のディレクトリに移り、次のよう にしてください。 <p><tscreen><verb> cp Makefile Makefile.orig cp Makefile.dist Makefile make cp mail.local /bin/mail.local chmod 4555 /bin/mail.local </verb></tscreen> <p> <!-- After all of this is done, go ahead and restart sendmail. Don't forget to finish the Cyrus installation instructions. --> 全てやり終えたら、sendmail を再起動してください。Cyrus のインストール を終えているかを忘れずに確認してください。 <!-- 7. Setting up mailboxes --> <sect>メールボックスの設定 <p> <!-- Make sure to follow the tests for the IMAP server. If everything looks acceptable, go ahead and set up some mailboxes. --> IMAP サーバ の動作確認をしてください。OK ならメールボックスの設定を 行ってください。 <!-- 8. Disclaimers --> <sect>おことわり <p> <!-- No guarantees, no money back, use at your own risk. --> このドキュメントは、無保証かつ無償です。ご自分の責任においてご利用 ください。 <!-- 9. Sources --> <sect>ソース <p> <!-- Required Packages --> <bf>必要なソフトウエア</bf> <p> <!-- キ The Cyrus home page is http://andrew2.andrew.cmu.edu/cyrus/imapd/ キ You can download the latest version from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ キ The Tcl home page is http://sunscript.sun.com/ キ You can download the latest tcl source from ftp://ftp.sunlabs.com/pub/tcl/ キ The Sendmail home page is http://www.sendmail.org/ キ You can download the latest version from ftp://ftp.sendmail.org/ucb/src/sendmail/ --> <itemize> <item>Cyrus のホーム・ページは、<url url="http://andrew2.andrew.cmu.edu/cyrus/imapd/"> です。 <item>最新版のダウンロードは下記から落してください。<newline> <url url="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/"> <item>Tcl のホーム・ページは、<url url="http://sunscript.sun.com/"> です。 <item>最新版のダウンロードは下記から落してください。<newline> <url url="ftp://ftp.sunlabs.com/pub/tcl/"> <item>sendmail のホーム・ページは、<url url="http://www.sendmail.org/"> です。 <item>最新版のダウンロードは下記から落してください。<newline> <url url="ftp://ftp.sendmail.org/ucb/src/sendmail/"> </itemize> <sect>日本版謝辞 <p> 翻訳に当たって、下記の方にお世話になりました。ありがとうございました。 <itemize> <item>藤原輝嘉さん </itemize> </article>