Installing the Washington IMAP and POP3 services
Previous  Top  Next

We download the latest version of the Washington IMAP from
ftp://ftp.cac.washington.edu/imap/imap-2000.tar.Z

to one of our computers that is connected to the internet. Then we create a directory on our linux box with

mkdir /usr/software

and copy the file imap-2000.tar.Z into this directory. You can do this with ftp, floppies and so on. You don't have to create the directory in the /usr folder – but I will reference to this folder in this chapter. Now "cd" into this directory and decompress the archive by typing

cd /usr/software
tar –xvzf imap-2000.tar.Z

The source should now have been extracted properly and we are ready to install. The decompression created a directory imap-2000 which we will use to install. Let's do that! Imap's root folder is the user's home folder by default. Some people like that, I however prefer the imap root to be in a subfolder of the home directory, imap in our scenario. We achive this by editing the file Makefile

vi /usr/software/imap-2000/Makefile

And changing the following line from

EXTRACFLAGS=

to

EXTRACFLAGS=-DMAILSUBDIR=\\\"imap\\\"

You can quickly find the line in the file by typing

/EXTRACFLAGS=

while in command mode of vi.

If you edit the file Makefile and modify the root directory of imap, you have to make sure that the subdirectory actually exists in every users homedirectory. Forgetting this will yield to unpredictable results according to the documentation.


To automate the procedure of creating an imap directory everytime we can create a user, we will modify the template directory /etc/skel/ by creating a directory there with:

mkdir /etc/skel/imap

Now, everytime you create a user make sure you will use the –m
option with the useradd program. However, for the user we created during installation the above procedure will not work so we create it manually one time with

mkdir /home/testuser/imap

So to finally start the installation we type

cd imap-2000
make slx

This means that we are installing on an up to date Linux box. This should go well without problems and will create the executables that we need (yes, there is nothing more to do except the make command):

ls /usr/software/imap-2000/imapd/imapd
ls /usr/software/imap-2000/ipopd/ipop3d

Those files of course would be better located in a directory that is designed for little daemons, so we copy them to the /etc/sbin directory with

cp /usr/software/imap-2000/imapd/imapd /usr/sbin
cp /usr/software/imap-2000/ipopd/ipop3d /usr/sbin