Delete Cyrus-IMAP.sgml

This is 17 years out of date. The Cyrus IMAP project now has updated documentation we would prefer people to locate (such as  https://www.cyrusimap.org/quickstart.html), rather than coming across obsolete TLDP content.

The TLDP guide refers to Cyrus 1.6.24, we are now on Cyrus 3.0.4
This commit is contained in:
Nicola N 2017-10-16 12:41:39 +11:00 committed by GitHub
parent 671057fabb
commit 3b8326ccac
1 changed files with 0 additions and 279 deletions

View File

@ -1,279 +0,0 @@
<!doctype linuxdoc system>
<article>
<title> Cyrus IMAP HOWTO</title>
<author>Aurora Skarra-Gallagher (Community Vision)</author>
<date>v1.3, 11 October 2000</date>
<abstract>A comprehensive guide to installing, configuring, and running Cyrus Imap and Cyrus
Sasl
</abstract>
<toc>
<sect>About this HOWTO
<sect1>Copyrights and Trademarks
<p>(c) 2000 Aurora Skarra-Gallagher</p>
<p>This section was copied from the HOWTO-HOWTO:</p>
<p>This manual may be reproduced in whole or in part, without fee, subject to the following restrictions: </p>
<p><itemize>
<item>The copyright notice above and this permission notice must be preserved complete on all complete or partial copies
<item>Any translation or derived work must be approved by the author in writing before distribution.
<item>If you distribute this work in part, instructions for obtaining the complete version of this manual must be included, and a means for obtaining a complete version provided.
<item>Small portions may be reproduced as illustrations for reviews or quotes in other works without this permission notice if proper citation is given. Exceptions to these rules may be granted for academic purposes: Write to the author and ask. These restrictions are here to protect us as authors, not to restrict you as learners and educators. Any source code (aside from the SGML this document was written in) in this document is placed under the GNU General Public License, available via anonymous FTP from the GNU archive.
</itemize></p>
<sect1>Feedback
<p>Comments (especially corrections) can be sent to
<url url="mailto:asg@CommunityVision.com" name="asg@CommunityVision.com"></p>
<sect1>CHANGES
<p><itemize>
<item>v1.3: inetd.conf error fix, authentication information added, more troubleshooting info
<item>v1.2: SASL Config error fix, new postfix configuration, and database pruning (thanks, Jernej)
<item>v1.1: Fixed sendmail.mc configuration file error and added IMAP information to the introduction.
</itemize></p>
<sect1>Document Conventions
<p><itemize>
<item><em>Italics</em> signifies a directory
<item><tt>This font</tt> signifies instructions to be ran at the command line
</itemize></p>
<sect>Introduction to IMAP
<sect1>What is IMAP?
<p>This definition is from the <url url="http://www.computeruser.com/resources/dictionary/dictionary.html" name="ComputerUser.com High-Tech Dictionary">:</p>
<p>Internet Message Access Protocol. A protocol that allows a user to perform certain electronic mail functions on a remote server rather than on a local computer. Through IMAP the user can create, delete, or rename mailboxes; get new messages; delete messages; and perform search functions on mail. A separate protocol is required for sending mail. Also called Internet Mail Access Protocol.</p>
<sect1>IMAP vs. POP
<p>IMAP allows the user to read email from many different locations and accounts because email folders are stored on the server, locally, at the home or the office, for instance. Even saved and read messages are stored on the IMAP server. POP only stores new unread messages on the server, and the read and saved messages are stored locally. To force POP to not delete email once it has been read can create many copies of the same email, creating a waste of space and confusion. However, IMAP is usually more complicated to set up. If you only have one email account, POP is most likely your best choice. If you want to access more than one account, from different locations, IMAP will probably serve you most efficiently. </p>
<sect1>Cyrus IMAP vs. Washington IMAP
<p>Cyrus has its own mailbox database which is standalone and increases performance, whereas Washington uses the stanard UNIX mailbox format, which was designed for a smaller set of users. Washington is portable to more UNIX and non-UNIX systems than Cyrus. The main difference is that with Cyrus, you don't have to add new users to your linux box (i.e. in /etc/passwd) to add new mail users, and with Washington, you do.</p>
<sect>Obtaining the Files
<sect1>Cyrus Imap Homepage
<p>The homepage is currently located at: </p>
<p><url url="http://asg.web.cmu.edu/cyrus/imapd" name="http://asg.web.cmu.edu/cyrus/imapd"></p>
<sect1>Downloading the files
<p>You will need both IMAP and SASL. Download the latest files here: </p>
<p><url url="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail" name="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail"></p>
<p>Download cyrus-imapd-X.X.X.tar.gz and cyrus-sasl-X.X.X.tar.gz (where X.X.X is the latest release) into
your temporary directory. </p>
<p>I will use <em>/temp</em> as the directory I've uncompressed the files
under for the rest of the examples. </p>
<sect>Different SASL Authentication Methods
<sect1>sasldb
<p>This is the default method of authentication. It stores usernames and passwords in the SASL secrets file <em>sasldb</em>. In this HOWTO, I assume you are using the sasldb method of authentication.</p>
<sect1>LDAP
<p>The following definition came from the OpenLDAP website. Lightweight Directory Access Protocol (LDAP) is an open-standard protocol for accessing information services. The protocol runs over Internet transport protocols, such as TCP, and can be used to access stand-alone directory servers or X.500 directories. This method isn't discussed in this HOWTO, but here is a link to a page with patches and info:</p>
<p><url url="http://www.openldap.org/faq/data/cache/428.html" name="http://www.openldap.org/faq/data/cache/428.html"></p>
<sect1>PAM
<p>Not enough info to document. Email me if you have some.</p>
<sect1>kerberos_v4
<p>Not enough info to document. Email me if you have some.</p>
<sect>Cyrus SASL
<sect1>Uncompress
<p>Here we untar and gunzip the file in a single step. </p>
<p><enum>
<item><tt> cd /temp</tt>
<item><tt> tar -zxvf cyrus-sasl-X.X.X.tar.gz</tt>
<item><tt> cd cyrus-sasl-X.X.X</tt>
</enum></p>
<sect1>Building the files
<p>For most purposes, the following set of instructions works fine. If you would like to examine the
other configuration options, type <tt>./configure --help | more</tt></p>
<p><enum>
<item><tt> ./configure</tt>
<item><tt> make</tt>
<item><tt> make install</tt>
</enum></p>
<p>If you don't want your password check to be the default sasldb, you must specify
which one of PAM, kerberos_v4, passwd, shadow you wish to use. If PAM is the
authentication you desire for example, you would type: </p>
<p><tt>./configure --with-pwcheck_method=PAM</tt></p>
<p>instead of the ./configure line above</p>
<sect>Cyrus IMAP Installation
<sect1>Uncompress
<p>The following commands will tar and gunzip cyrus IMAP under <em>/temp</em>. </p>
<p><enum>
<item><tt>cd /temp</tt>
<item><tt>tar -zxvf tar/cyrus-imapd-1.6.24.tar.gz</tt>
<item><tt>cd cyrus-imapd-1.6.24</tt>
</enum></p>
<sect1>A note on com_err.h
<p>When I tried to install cyrus IMAP, I got errors regarding the file com_err.h. My com_err.h was
located in <em>/usr/include/et</em>. It needs to reside in <em>/usr/include</em>.
Run the following command to make sure it is in the correct location:</p>
<p><tt>locate com_err.h</tt></p>
<p>This will show you where the file is. If it is under <em>/usr/include</em>,
you can skip to the next section. If it is in another directory, just copy it to
<em>/usr/include</em>. If it doesn't exist, download it here:
<url url="http://www.ludd.luth.se/~jnilsson/cvsweb/cvsweb.cgi/src/contrib/com_err"
name="http://www.ludd.luth.se/~jnilsson/cvsweb/cvsweb.cgi/src/contrib/com_err">.</p>
<sect1>Configure
<p><tt> ./configure --with-auth=unix</tt></p>
<sect1>Adding the default user
<p>Cyrus requires a user to own its files. The default user is cyrus. The following command adds a user
cyrus with the group of "mail"</p>
<p><tt>useradd -g mail cyrus</tt></p>
<p>You'll want to set the password for user cyrus.</p>
<p><tt>passwd cyrus</tt></p>
<p>Type in the password you desire cyrus to have each time you are prompted</p>
<sect1>Building the files
<p><enum>
<item><tt> make depend </tt>
<item><tt> make all CFLAGS=-O</tt>
<item><tt> make install</tt>
</enum></p>
<p> That's it! You're ready to configure Cyrus IMAP. </p>
<sect> Cyrus IMAP Configuration
<sect1>Editing conf files
<p><enum>
<item>Edit /etc/syslog.conf and add the following lines at the bottom:
<verb> local6.debug /var/adm/imapd.log
auth.debug /var/adm/auth.log</verb>
<item>Edit a new file /etc/imapd.conf and place in it the following lines:
<verb> configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus root
srvtab: /var/imap/srvtab
allowanonymouslogin: no
sasl_passwd_check: shadow</verb>
</enum></p>
<p>If you don't want your password check to be the default sasldb, you must specify
which one of PAM, kerberos_v4, passwd, shadow you wish to use. If PAM is the
authentication you desire for example, you would type: </p>
<p><tt>sasl_passwd_check: pam</tt></p>
<p>instead of the line above</p>
<sect1>Creating the necessary directories
<p>This list of instructions will set up all the directories necessary for imap.</p>
<p><enum>
<item><tt>mkdir /var/adm</tt>
<item><tt>touch /var/adm/imapd.log /var/adm/auth.log</tt>
<item><tt>mkdir /var/imap /var/spool/imap /var/imap/srvtab</tt>
<item><tt>chown cyrus /var/imap /var/spool/imap /var/imap/srvtab</tt>
<item><tt>chgrp mail /var/imap /var/spool/imap /var/imap/srvtab</tt>
<item><tt>chmod 750 /var/imap /var/spool/imap /var/imap/srvtab</tt>
<item><tt>su cyrus</tt>
</enum></p>
<p>You are now the user cyrus. This is necessary for the files to have the correct owner and group.
Continue: </p>
<p><enum>
<item><tt>tools/mkimap</tt>
<item><tt>cd /var/imap</tt>
<item><tt>chattr +S . user quota user/* quota/*</tt>
<item><tt>chattr +S /var/spool/imap</tt>
<item><tt>exit</tt>
</enum></p>
<p>You are now root again. The last command: </p>
<p><tt>chattr +S /var/spool/mqueue</tt></p>
<sect1>More configuration file editing
<p><enum>
<item>Edit <em>/etc/services</em> and check for the following lines. If they do not exist, add them:
<verb> pop3 110/tcp
imap 143/tcp
imsp 406/tcp
kpop 1109/tcp
sieve 2000/tcp</verb>
<item>Edit <em>/etc/inetd.conf</em> and comment out any imap and pop3 lines and add the following:
<verb> imap stream tcp nowait cyrus /usr/cyrus/bin/imapd imapd
pop3 stream tcp nowait cyrus /usr/cyrus/bin/pop3d pop3d</verb>
<item>Edit <em>/etc/sendmail.mc</em> with care not to add extra spaces and add the following lines(do not copy and paste directly from this text as the tabs won't be added correctly):
<verb> MAILER(local)
MAILER(cyrus)
define(`confLOCAL_MAILER',`cyrus')
LOCAL_RULE_0
R$=N $: $#local $: $1
R$=N < @ $=w . > $: $#local $: $1
Rbb + $+ < @ $=w . > $#cyrusbb $: $1</verb>
Use tabs to separate the data (i.e. R$=N has three tabs between it and $: $#local $: $1)
Then run:
<tt>m4 sendmail.mc > sendmail.cf</tt>
<item>Edit <em>/etc/group</em> and add the user daemon to the mail group.
</enum></p>
<sect1>If you use postfix instead of sendmail
<p>Postfix is a mail-deliver alternative to sendmail. Most linux installations use sendmail by default. If you use postfix, ignore configuration #3 from the last section and uncomment or add the following line in <em>/etc/postfix/master.cf</em></p>
<p><verb>cyrus unix - n n - - pipe flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}</verb></p>
<p>Also add or uncomment this line in <em>/etc/postfix/main.cf</em></p>
<p><tt>local_transport = cyrus</tt></p>
<sect> Cyrus IMAP Implementation
<sect1>Add the cyrus administrator
<p>Run the following command to set up a user for cyrus</p>
<p><tt>/usr/local/sbin/saslpasswd cyrus</tt></p>
<sect1>Testing Cyrus IMAP
<p><enum>
<item><tt>killall -HUP inetd</tt>
<item><tt>su cyrus</tt>
<item><tt>imtest -m login -p imap localhost</tt>
</enum></p>
<p>Enter your password. If you see something like: </p>
<p><verb> (L01 OK User logged in means you're in)</verb></p>
<p>Then the setup has been successful. Type </p>
<p><verb> . logout</verb></p>
<p>to log out. </p>
<sect1>Setting up users
<p>Still as the user cyrus, type the following commands. They will set up the
mailbox(es) for each user. Fill in the username where you see the (username).</p>
<p><enum>
<item><tt>cyradm localhost</tt>
<item><tt>cm user.joebob</tt> (for all the user joebob)
<item><tt>quit</tt>
<item><tt>exit</tt> (back as root)
</enum></p>
<p>Now as root, enter a password for each username</p>
<p><tt>saslpasswd (username)</tt></p>
<sect1>Delivery database pruning
<p>If you don't periodically prune the database of deliveries, you can fill up your file system. Adding a cron job which will run once a day is one way to do this. That involves going to <em>/etc/cron.daily</em> and creating a file named cyrus-imapd. Inside that file, put the following two lines of code:</p>
<p><verb>#!/bin/bash
su cyrus -s /bin/bash -c '/usr/cyrus/bin/deliver -E 3'</verb></p>
<p>Make this script executable by running: <tt>chmod 755 cyrus-imapd</tt></p>
<p>You should also create the deliverdb directory to store database files in: </p>
<p><tt>mkdir /var/imap/deliverdb</tt></p>
<sect1> Finishing up
<p>Reboot the machine to make sure that everything has been restarted under the new
configuration</p>
<sect>Troubleshooting
<p>If you encounter any errors, you can do the following to view error messages:</p>
<p><enum>
<item><tt>tail /var/log/messages</tt>
<item><tt>tail /var/adm/imapd.log</tt>
<item><tt>killall sendmail && sendmail -bd -X /root/error.log</tt> (then read
/root/error.log)
</enum></p>
<p>If you are having "virtual memory exhausted errors" when compiling, running</p>
<p><tt>ulimit -d unlimited</tt></p>
<p> as root has been reported to work.</p>
</article>