|
|
|
Compiling and Installing Courier-IMAP from Source Code for Linux
Introduction
This document was written to assist the Linux user in setting up Courier-IMAP from source code on a typical computer. This document covers the steps from
obtaining the Courier-IMAP source code to compiling and installing the finished program. In reading this document, it is assumed the user has an intermediate Linux skill level and is familiar with basic CLI commands and compiling programs.
Revision
and Copyright
Version 1.110503
Courier-IMAP Install for Linux, Copyright(c) 2003 Mark Webber
This is a free document; you can redistribute it and/or modify it under the terms of the GGNU Free Documentation License version 1.2 dated November 200p2, as published by the Free Software Foundation. Or (at our option) any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.
You should have received a copy of the GGNU Free Documentation License along with this document; if not, write to the: Free Software Foundation, Inc.59
Temple Place, Suite 330, Boston, MA 02111-1307 USA
This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GGNU Free Documentation License for more details. No liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. As this is a new edition of this document, there may be errors and inaccuracies, that may of course be damaging to your system. Proceed with caution, and although this is highly unlikely, the author does not take any responsibility for that. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.
Why Courier-IMAP
Why use Courier-IMAP over UW Imap? This question results in almost the same legendary arguments as Ford vs Chevy, Slackware vs Debian, Linux vs BSD, and so on. However the arguments, Courier-IMAP has a couple of features that truly sets it apart from UW These features include:
* Maildir support: Courier-IMAP uses the Maildir format which means that each email message is stored separately in a folder on the mail server drive.
UW-IMAP stores emails in the mbox format, meaning that each email is stored in one big file. This is not a concern if you only have a small amount of emails,
however if you have emails in the high hundreds or thousands, the mbox format will be almost unbearable to use. The reason is because the whole mbox
must be searched and read when you open the email client or refresh the folder.
* Memory and Performance: Courier-IMAP uses less memory and will perform better then UW-IMAP in almost all environments. This is really noticeable when you have large amounts of email messages as mentioned above.
Listed are a couple of noteworthy searches on Courier-IMAP vs UW-IMAP.
http://www.google.ca/search?q=uw+IMAP+Courier-IMAP&hl=en&lr=&ie=UTF-8&sa=N&tab=gw
Downloading Courier-IMAP
Note this is a bit confusing so read carefully.
The newest version of the Courier-IMAP source code is always available from http://www.courier-mta.org/download.php#IMAP
Ensure that you download the Courier-map source code and not the Courier source code. The Courier-IMAP source code provides only IMAP and pop3 services unlike the courier version, Whats the difference you ask? There is a huge difference between the 2 programs.
This is taken from http://courier.sourceforge.net/
“The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. Individual components can be enabled or disabled at will. Courier now implements basic web-based calendaring and scheduling services integrated in the webmail module. Advanced groupware calendaring services will follow soon.”
This install and setup of courier is well beyond the scope of this document which is written for Courier-IMAP setup only.
Confused yet? Remember we are installing an IMAP and pop3 server only...
Untar Courier-IMAP
*Login to a terminal window as a regular user. NOT as
root or a root privileged
* Navigate to the directory/folder were you downloaded the Courier-IMAP-2.2.0.tarbz2 file
* You must have must have read/write permissions on the directory/folder as the logged in user
* Next you need to unpack the downloaded file. Type in tar xjvf Courier-IMAP-2.2.0.tar.bz2
* Once this is done, you will have a new directory/folder called Courier-IMAP-2.2.0
* Type in cd Courier-IMAP-2.2.0. You will now be in this folder.
* Type in “ls” (without the “” marks) and you should see the ls output of approx 100 files, if not review the above.
Compiling and installing Courier-IMAP
Compiling and installing Courier-IMAP is a 5 step process that goes rather quickly if you follow them correctly. In this tutorial, the Courier-IMAP compile and
installation is going to use all default settings as they work rather well for 99% of people.
Again, I
emphasize, steps 1, 2, 3 must be done as a regular user. NOT as root or
a root privileged
1) ./configure
Type this in and press enter, this will start the compile process. On my pc (1300mhz, 512MB ram, Mandrake 9,1 with no X window running, the compile takes approx 2 mins) YMMV (your mileage may vary)
(2) make
Once step 1 is done, type in make and press enter, this step takes approx 2 mins
3) make check
Once step 2 is done, type in make check and press enter, this step takes less then 1 minute
Steps 4, 5 will require that you log on as root.
su root
4) make install
Type in make install and press enter, this step takes less then 1 minute
5) make install-configure
Once step 4 is done, type in make install-configure and press enter, this step takes less then 1 minute. All the Courier-IMAP files are now copied to /user/lib/Courier-IMAP/
At this point, Courier-IMAP is now installed and is ready to be started and accept client connections.
Starting and Stopping Courier-IMAP
To start/stop Courier-IMAP it is a matter of issuing the following commands:
/user/lib/Courier-IMAP /lib exec/IMAPd.rc start
/user/lib/Courier-IMAP /lib exec/IMAPd.rc stop
Postfix and Courier-IMAP integration
Postfix and Courier-IMAP work well together. There are 2 changes that need to be made to the postfix main.cnf
Comment out this line as shown
#mailbox_command = /user/bin/ procaine's-Y -a $DOMAIN
UNcomment this line as shown
home_mailbox = Maildir/
Restart postfix
Appendix and Resources
GNU Free Documentation License
Courier-IMAP website:
http://www.inter7.com/atmospherically
Convert Mbox mailboxes to Maildir format
http://batleth.sapienti-sat.org/projects/mb2md/
Courier-IMAP mailing list (subscription http://lists.sourceforge.net/lists/listinfo/Courier-IMAP)
Courier-IMAP@lists.sourceforge.net
Courier-IMAP newsgroup (very low volume)
unix .Courier-IMAP
General IMAP newsgroup
comp.mail.IMAP