The Internet Message Access Protocol (IMAP) is an Internet standards-track protocol for accessing messages (mail, news, etc). The IMAP server stores and provides access to messages.
A list of answers to common installation problems is maintained in http://andrew2.andrew.cmu.edu/cyrus/imapd/install-FAQ.
Feedback on the software or on the document may be sent to "cyrus-bugs@andrew.cmu.edu". The info-cyrus@andrew.cmu.edu mailing list exists for the discussion of this server and other Cyrus software. Send mail to info-cyrus-request@andrew.cmu.edu to subscribe.
IMPORTANT: Upgrading from the Cyrus IMAP server version 1.3 or earlier requires running "reconstruct -m" after installing this version of the software. See the file doc/changes in the distribution for more information.
The following programs and/or packages are required:
The "configure" shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a "Makefile" in each directory of the package. Finally, it creates a shell script "config.status" that you can run in the future to recreate the current configuration, a file "config.cache" that saves the results of its tests to speed up reconfiguring, and a file "config.log" containing compiler output (useful mainly for debugging "configure").
Running "configure" takes awhile. While running, it prints some messages telling which features it is checking for.
You can compile the package in a different directory from the one containing the source code. Doing so allows you to compile it on more than one kind of computer at the same time. To do this, you must use a version of "make" that supports the "VPATH" variable, such as GNU "make". "cd" to the directory where you want the object files and executables to go and run the "configure" script. "configure" automatically checks for the source code in the directory that "configure" is in and in "..".
By default, "make install" will install files (other than server-specific programs) in "/usr/local/bin", "/usr/local/man", etc. You can specify an installation prefix other than "/usr/local" by giving "configure" the option "--prefix=PATH".
You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give "configure" the option "--exec-prefix=PATH", the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix.
By default, "make install" will install the server-specific programs in "/usr/cyrus/bin". You can specify a server-specific installation prefix other than "/usr/cyrus" by giving "configure" the option "--with-cyrus-prefix=PATH".
Here are a list of switches that can be used with "configure".
IMPORTANT: The Kerberos v4 support requires the DES library, even if the "--disable-privacy" configure option is given. Some vendor distributions of Kerberos, including the one with Solaris, do not have this support and cannot be used.
Either "--without-krb" or "--with-krb=no" prevents Kerberos v4 support from being compiled in.
Some systems require unusual options for compilation or linking that the "configure" script does not know about. You can give "configure" initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configureOr on systems that have the "env" program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configureThe "make" variables that you might want to override with environment variables when running "configure" are:
The file "configure.in" is used as a template to create "configure" by a program called "autoconf". You will only need it if you want to regenerate "configure" using a newer version of "autoconf".
Once you have successfully run "configure", execute the following commands:
make depend make all CFLAGS=-OIf you want, you can override the "make" variables CFLAGS and LDFLAGS by entering the following:
make all CFLAGS=-O2 LDFLAGS=-s
make install
mv syslogd /etc/syslogd mv syslog.conf /etc/syslog.confIf you do not copy the "syslog.conf" file in "imapd-1.4/syslog" to the "/etc" directory, be sure to add support for "local6.debug". The file should include a line like:
local6.debug /var/adm/imapd.logCreate the imapd.log file:
touch /var/adm/imapd.log
configdirectory: /var/imap partition-default: /var/spool/imap admins: curtj abell srvtab: /var/imap/srvtabFor a description of all the fields in this file, see the imapd.conf(5) man page.
This document uses the configuration directory "/var/imap" in its examples. This directory should be owned by the cyrus user and group and should not permit access to other users.
cd /var mkdir imap chown cyrus imap chgrp mail imap chmod 750 imap
cd imap true >> mailboxes mkdir user quota proc log chown cyrus * chgrp mail *
This document uses a default partition directory of "/var/spool/imap" in the following example:
cd /var/spool mkdir imap chown cyrus imap chgrp mail imap chmod 750 imapThe partition directory is similar in concept to /var/spool/news. It is where the mailboxes are stored. Unlike most netnews systems, Cyrus allows you to have more than one partition. Do not use the string "news" as a partition name, as it is reserved for netnews.
cd /var/imap /sbin/chattr +S . user quota /sbin/chattr +S /var/spool/imapAlso set the queue directory of the mail daemon to update synchronously. The following example is for sendmail:
/sbin/chattr +S /var/spool/mqueue
Here is a sample session, creating a srvtab file for the host named "foobar":
ksrvutil -f /var/imap/srvtab addHere is the information "ksrvutil" requests. Respond by filling in values or by pressing RETURN. In this example, the host name is "foobar" and the realm is "ANDREW.CMU.EDU".
Name: imap Instance: foobar Realm: ANDREW.CMU.EDU Version number: New principal: imap.foobar@ANDREW.CMU.EDU; version 0 Is this correct? (y,n) [y] Password: Verifying, please re-enter Password: Key successfully added. Would you like to add another key? (y,n) [y] nIf you plan to install Kerberized POP, create the Kerberos identity "pop.HOST@REALM" and add the key to the "srvtab" file.
Make the "srvtab" file owned by the cyrus user:
chown cyrus /var/imap/srvtab
pop3 110/tcp imap 143/tcp imsp 406/tcp kpop 1109/tcp
imap stream tcp nowait cyrus /usr/cyrus/bin/imapd imapdIf you want to run the POP3 protocol, add the following line.
pop3 stream tcp nowait cyrus /usr/cyrus/bin/pop3d pop3dIf you want to run MIT's KPOP (Kerberized POP) protocol, add the following line
kpop stream tcp nowait cyrus /usr/cyrus/bin/pop3d pop3d -k"cyrus" is the Cyrus user and "/usr/cyrus/bin/" is the path name to the executable.
telnet foobar imapIf your server is running, you'll get the following message:
Trying 128.2.44.20... Connected to foobar.andrew.cmu.edu. Escape character is '^]'. * OK foobar.andrew.cmu.edu Cyrus IMAP4 v1.4 server readyAny message other than one starting with "* OK" means there is a problem. To terminate the connection, type ". logout".
/usr/local/bin/imtest -p foobar imapIf your server is running, you'll get the following message:
* OK foobar.andrew.cmu.edu Cyrus IMAP4 v1.4 server ready Password: <enter your password, imtest does not echo it> . LOGIN smith X . OK User logged inAny message other than one starting with a ". OK" means there is a problem. If the test fails, a more specific error message is written through syslog to the server log. To terminate the connection, type ". logout".
/usr/local/bin/imtest -k foobar imap * OK foobar.andrew.cmu.edu Cyrus IMAP4 v1.4 server ready . AUTHENTICATE KERBEROS_V4 + Ln8h6Q== BAcBQU5EUkVXLkNNVS5FRFUAOCA+0y5YnrqIVikng46sam7RSObZXCVSA9xCx BZSGgOy9ehHRj8NQjLjxDpib0D9uT0fo7QaXhLM6zCp9dQ1pX4FfNO2V39vBp Q19QIK4S1410prvM2c45qeizecI7zAvA= 2cRhIC+aH70WHqYaW18YnQ== . OK User logged in __No integrity protection__Any message other than one starting with a ". OK" means there is a problem. If the test fails, a more specific error message is written through syslog to the server log. To terminate the connection, type ". logout".
createmailbox, cm create a mailbox deleteaclmailbox, dam delete an ACL on a mailbox deletemailbox, dm delete a mailbox help get help on commands listaclmailbox, lam list the ACL on a mailbox listmailbox, lm list mailboxes listquota, lq list quota on root listquotaroot, lqr, lqm list quota roots on mailbox quit exit program renamemailbox, renm rename a mailbox setaclmailbox, sam set an ACL on a mailbox setquota, sq set quota limitsNote:If you run "cyradm" on a system where Kerberos v4 is not running, you are prompted for your user name an password before you can issue any "cyradm" commands.
The mailbox naming convention requires that the primary mailbox (inbox) for anyone must be named "user.<userid>". To create a mailbox, type:
createmailbox user.<userid>For example, to create a mailbox for the userid "smith", type:
createmailbox user.smithTo limit "smith" to 10,000 kilobytes of mail, type:
setquota user.smith 10000Once the inbox is created, users can create their own additional mailboxes from a mail program. If Smith created a work mailbox and a play mailbox, the full names of the mailboxes would be:
user.smith.work user.smith.play
Access rights are discussed in detail in the cyradm(1) man pages. Note that the administrator must grant herself delete access explicitly before she can delete a mailbox:
setaclmailbox <mail_box> <admin_userid> d deletemailbox <mail_box>Once you have created mailboxes, your IMAP server installation is done. You must then configure a mail interface, such as Pine, to work with the IMAP server.
Return to the Cyrus IMAP Server Home Page