home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / mini / Cyrus-IMAP < prev    next >
Text File  |  1998-10-14  |  8KB  |  238 lines

  1.  
  2.   mini-HOWTO install Cyrus IMAP Server
  3.   Kevin Mitchell (kevin@iserv.net)
  4.   v0.9 21.01.98
  5.  
  6.   This documentation is to offer some help in installing the Cyrus
  7.   IMAP Server on a Linux machine.
  8.  
  9.   1.  Introduction
  10.  
  11.   I would like to thank Bob Anderson (boba@iserv.net) and Jorge
  12.   Paramo (jorge@iserv.net) for helping me in my various Linux
  13.   adventures.
  14.  
  15.   What is IMAP and why should I use it?
  16.  
  17.   IMAP (Internet Message Access Protocol) is a method of accessing
  18.   electronic mail or bulletin board messages that are kept on a mail
  19.   server.  IMAP is seen by many as a replacement for POP (Post Office
  20.   Protocol) mail.  IMAP allows users to access their e-mail from
  21.   different computers without having to download it.  This method of
  22.   mail access is more secure and offers many benefits to the end user.
  23.  
  24.   A more indepth answer can be found at:
  25.   http://www.imap.org/whatisIMAP.html
  26.  
  27.   A comparision of IMAP & POP can be found here:
  28.   http://www.imap.org/imap.vs.pop.brief.html
  29.  
  30.   Why use the Cyrus server?
  31.  
  32.   Cyrus is designed to be run on a server where normal users are not
  33.   permitted to log in.  Cyrus also seems to be among the two most
  34.   popular IMAP servers for Unix.  The University of Washington IMAP
  35.   Server is the other.
  36.   ftp://ftp.cac.washington.edu/imap/imap.tar.Z
  37.  
  38.   2.  My System Details
  39.  
  40.   I have successfully installed Cyrus on both 486DX66 and Pentium
  41.   machines running Linux Kernel 2.1.79 and 2.0.33 respectively.  These
  42.   machines were originally based upon Slackware 3.4.
  43.  
  44.   3.  Tcl Installation
  45.  
  46.   Make sure that you have Tcl installed on your machine before
  47.   attempting to install Cyrus - otherwise you will not be able to use
  48.   the Cyrus Admin Tool (cyradm).
  49.  
  50.   You can find the latest tcl source at
  51.   ftp://ftp.sunlabs.com/pub/tcl/
  52.  
  53.   After installation, make sure that the file libtcl.a is found in the
  54.   /usr/local/lib/ directory.  Tcl 8.0 makes a file called libtcl8.0.a
  55.   to which you should create a soft link using the following command:
  56.  
  57.         # ln -s libtcl8.0.a libtcl.a
  58.  
  59.   4.  makedepend Installation
  60.  
  61.   Check your system for the makedepend command.  If you don't have it,
  62.   don't worry - it comes with the Cyrus source.  (I didn't have it on
  63.   my installations of Slackware 3.4)
  64.  
  65.   To install makedepend, extract the Cyrus distribution, change to the
  66.   makedepend directory, and enter the following sequence of commands:
  67.  
  68.         ./configure
  69.         make
  70.         cp ./makedepend /usr/local/bin/makedepend
  71.  
  72.   5.  Cyrus Installation
  73.  
  74.   Follow the instructions that come with the Cyrus distribution
  75.   carefully.  You can find a copy of them online at:
  76.   http://andrew2.andrew.cmu.edu/cyrus/imapd/install.html
  77.  
  78.   Some tips for some of the steps:
  79.  
  80.   If you are running Slackware 3.4 (with Shadow Passwords), make sure
  81.   that you configure in this way:
  82.  
  83.         ./configure --with-login=unix_pwcheck
  84.  
  85.   make is pretty straight forward:
  86.  
  87.         make depend
  88.         make all CFLAGS=-O
  89.  
  90.   Step 1:  When adding the user cyrus, I locked down the account to
  91.   help minimize any security holes.
  92.  
  93.   Step 3:  I edited the /etc/syslog.conf file rather than copy theirs.
  94.  
  95.   Step 9:  With Linux, make sure to start up pwcheck in this way
  96.   otherwise the server will not work right:
  97.  
  98.         umask 0;/usr/cyrus/bin/pwcheck &
  99.         umask 022
  100.  
  101.   Then add it to a startup script like this:
  102.  
  103.         if [ -f /usr/cyrus/bin/pwcheck ]; then
  104.         echo -n "Starting pwcheck for imap"
  105.         umask 0;/usr/cyrus/bin/pwcheck &
  106.         umask 022
  107.         fi
  108.  
  109.   I put mine in /etc/rc.d/rc.local and it works well.
  110.  
  111.   Step 12:  When editing the /etc/inetd.conf, make sure to include
  112.   the TCP Wrappers in your line like this:
  113.  
  114.   imap    stream  tcp     nowait  cyrus   /usr/sbin/tcpd  /usr/cyrus/bin/imapd
  115. imap
  116.  
  117.   And don't forget to kill -HUP inetd after you are done making your
  118.   addition:
  119.  
  120.         # ps ax | grep inetd
  121.            61  ?  S    0:00 /usr/sbin/inetd
  122.         # kill -HUP 61
  123.  
  124.   6.  Sendmail Configuration
  125.  
  126.   Download the sendmail source if you don't already have it.  Besides
  127.   running IMAP, you can do fun things like setting up anti-spam measures.
  128.  
  129.   Here is my mc file.  It will deliver mail to the IMAP location unless
  130.   there is an entry of that username in the /etc/sendmail.cN file.  This
  131.   allows system accounts like root to keep their mail in a spool;
  132.   however, user accounts use IMAP by default.  Do not simply copy & paste
  133.   this code because sendmail will compain about spaces being used rather
  134.   than tabs:
  135.  
  136.   divert(-1)
  137.   #
  138.   #       (C) Copyright 1995 by Carnegie Mellon University
  139.   #
  140.   #                      All Rights Reserved
  141.   #
  142.   # Permission to use, copy, modify, and distribute this software and its
  143.   # documentation for any purpose and without fee is hereby granted,
  144.   # provided that the above copyright notice appear in all copies and that
  145.   # both that copyright notice and this permission notice appear in
  146.   # supporting documentation, and that the name of CMU not be
  147.   # used in advertising or publicity pertaining to distribution of the
  148.   # software without specific, written prior permission.
  149.   #
  150.   # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  151.   # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  152.   # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  153.   # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  154.   # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  155.   # ARISING OUT OF OR IN CONNECTION WITH THE USE OR P ERFORMANCE OF THIS
  156.   # SOFTWARE.
  157.   #
  158.   #       Contributed to Berkeley by John Gardiner Myers .
  159.   #
  160.   #       This sample mc file is for a site that uses the Cyrus IMAP server
  161.   #       exclusively for local mail.
  162.   #
  163.  
  164.   divert(0)dnl
  165.   VERSIONID(`@(#)cyrusproto.mc    8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3')
  166.   OSTYPE(linux)
  167.   define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
  168.   FEATURE(nouucp)
  169.   FEATURE(nocanonify)
  170.   FEATURE(always_add_domain)
  171.   MAILER(smtp)
  172.   MAILER(local)
  173.   MAILER(cyrus)
  174.  
  175.   define(`confLOCAL_MAILER',`cyrus')
  176.  
  177.   LOCAL_RULE_0
  178.   R$=N                            $: $#local $: $1
  179.   R$=N                 $: $#local $: $1
  180.   Rbb + $+             $#cyrusbb $: $1
  181.  
  182.   LOCAL_CONFIG
  183.   FN /etc/sendmail.cN
  184.  
  185.   # end of mc file
  186.  
  187.   After making the /etc/sendmail.cf file, create a file called
  188.   /etc/sendmail.cN and put in the username of accounts that do not
  189.   wish to use the IMAP delivery method:
  190.  
  191.         root
  192.         majordom
  193.         stan
  194.         mothra
  195.  
  196.   After installing Sendmail 8.8.8 I also installed mail.local as
  197.   my local delivery program for these other accounts.  There is
  198.   a trick to making mail.local.  Change to the mail.local directory
  199.   in the sendmail source and do the following:
  200.  
  201.         cp Makefile Makefile.orig
  202.         cp Makefile.dist Makefile
  203.         make
  204.         cp mail.local /bin/mail.local
  205.         chmod 4555 /bin/mail.local
  206.  
  207.   After all of this is done, go ahead and restart sendmail.
  208.  
  209.   Don't forget to finish the Cyrus installation instructions.
  210.  
  211.   7.  Setting up mailboxes
  212.  
  213.   Make sure to follow the tests for the IMAP server. If everything
  214.   looks acceptable, go ahead and set up some mailboxes.
  215.  
  216.   8.  Disclaimers
  217.  
  218.   No guarantees, no money back, use at your own risk.
  219.  
  220.   9.  Sources
  221.  
  222.   Required Packages
  223.  
  224.   ╖  The Cyrus home page is http://andrew2.andrew.cmu.edu/cyrus/imapd/
  225.  
  226.   ╖  You can download the latest version from
  227.      ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
  228.  
  229.   ╖  The Tcl home page is http://sunscript.sun.com/
  230.  
  231.   ╖  You can download the latest tcl source from
  232.      ftp://ftp.sunlabs.com/pub/tcl/
  233.  
  234.   ╖  The Sendmail home page is http://www.sendmail.org/
  235.  
  236.   ╖  You can download the latest version from
  237.      ftp://ftp.sendmail.org/ucb/src/sendmail/
  238.