Next Previous Contents

3. Installation

Before starting, keep in mind that if you don't want to patch your courier, you can use the authentication module courier-authmkhome on my home page to create users' home directories. However, if you don't patch courier, you need to do little tricks with the user home directory. Read the specific documentation.

3.1 From scratch

You'll need: patch, make, tar, gzip, gunzip, gcc, and all the files needed to compile courier.

  1. Get the source code of courier-imap and my patch from

    http://www.commedia.it/ccontavalli/

    http://www.courier-mta.org/

  2. Unpack the courier tarball somewhere (/usr/src is good - I assume the .tar.gz is in your home directory)

     
    $ cd /usr/src
    $ tar -xvzf ~/courier-imap.tar.gz
        
    

  3. Unpack the patch somewhere in your hard drive (/usr/src is good - Same assumption)

     
    $ tar -xvzf ~/courier_patch.tar.gz
        
    

  4. Apply the patch

    1. Get in the directory of the courier sources
      $ cd courier-0.x.x
          
      
    2. If provided, check the README for your specific courier version (README.courier_version). It should tell the exact diff file to use to patch your version of courier.
    3. Give the following command using instead of courier_0.x.x.diff the file found in the previous step:
       
      $ cat ../courier_patch/courier_0.x.x.diff | patch -p1
          
      

  5. Compile courier

    You should follow the steps indicated in courier documentation. It would be good to include support for authdaemon and for some kind of database :-).

3.2 With debian

  1. Make sure to have all the needed tools to compile courier
    # apt-get install dpkg-dev
    # apt-get install gcc make patch g++
    
  2. Get the source for courier with
    # apt-get source courier
    
  3. Get the packages needed to build couirer
    # apt-get build-dep courier
    
  4. Apply the patch
    # cd courier_0.x.x.orig
    # cat ../courier_patch/courier_0.x.x | patch -p1
    
    Remember to always apply the patch provided with debian before any other patch (in this case, apt-get source takes care of that).
  5. Build a brand new debian package
    # dpkg-buildpackage
    
  6. Install the needed packages
    # dpkg -i ./courier-imap_0.x.x.deb
    # dpkg -i ./courier-pop3_0.x.x.deb
    # dpkg -i ./courier-authdaemon_0.x.x.deb
    # dpkg -i ./courier-authmysql_0.x.x.deb
    
  7. Watch out! the next time you'll use apt-get update, this package will be overwritten! You may want to wait for the patch to be available as .deb on my own site or use the pin mechanism provided by apt-get (look at apt_preferences(5))... this is just a fast and easy method to compile courier without having to deal with configure scripts and stuff like that...


Next Previous Contents