Building Courier-IMAP 
     
      The Courier-imap source code is available in a tarball -a package of all the 
      files, similar to a zip file. This should be downloaded from www.courier-mta.org/, 
      but be careful to download the source for courier-imap and not for the Courier 
      MTA. 
     
 
     To install Courier-IMAP, a few commands must be entered. As with much free software, 
      a configuration script is run first. The configuration script checks the 
      software installed on our machine and configures the software so that it 
      will build correctly. 
     When Courier-IMAP is used as an IMAP server, it assumes that its clients are 
      going to follow the IMAP standard exactly. Unfortunately, this is not the 
      case, and if Courier-IMAP expects the clients to conform to the IMPA standard 
      exactly, then the clients would not function correctly. The Courier-IMAP 
      developers recognize this, and have built the capability to work with non-standard clients, by passing the –enable-workarounds-for-imap-client-bugs flag 
      to the configure script. 
     Courier-IMAP also includes a check functionality when building it. Unfortunately, 
      using --enable-workarounds-for-imap-client-bugs prevents the check from working successfully. 
      As the check functionality is useful, we will build the software twice, 
      firstly without the --enable-workarounds-for-imap-client-bugs, and then run the check, and then build again with the flag, 
      and install the software. 
     
      To build Courierr-IMAP, enter the following commands. Choose a suitable directory 
      to build the software, in this example we choose /tmp, and the software 
      unpacked itself into the courier-imap
     3.0.8 directory. 
      
 
    
      
 
    
      
 
    
      
 
    
     checking for gcc... gcc 
     checking for C compiler default output file name... a.out 
     checking whether the C compiler works... yes 
     .... (a lot more output follows) 
     config.status: creating config.h 
     config.status: executing depfiles commands 
      
 
    
     Making check in numlib 
     make[1]: Entering directory `/tmp/courier-imap-3.0.8/numlib' 
     Compiling atotimet.c 
     ... (a lot more output appears) 
     rm -f '/tmp/courier-imap-3.0.8/=install-check/usr/lib/courier
     imap/etc/pop3d.cnf' 
     rm -f '/tmp/courier-imap-3.0.8/=install-check/usr/lib/courier
     imap/etc/quotawarnmsg.example' 
     make[2]: Leaving directory `/tmp/courier-imap-3.0.8' 
     make[1]: Leaving directory `/tmp/courier-imap-3.0.8' 
      
 
    
     checking for gcc... gcc 
     checking for C compiler default output file name... a.out 
     checking whether the C compiler works... yes 
     checking whether we are cross compiling... no 
     .... (a lot more output follows) 
     config.status: creating config.h 
     config.status: executing depfiles commands 
      
 
    
     make all-gmake-check FOO=BAR 
     make[1]: Entering directory `/tmp/courier-imap-3.0.8' 
     make[1]: Leaving directory `/tmp/courier-imap-3.0.8' 
     NOTE 
     All questions regarding ANY vpopmail-related problems,such as compiling/building failures, or login errorsshould be referred to the vpopmail mailing list.
     Vpopmail questions sent to the sqwebmail or Couriermailing lists will be IGNORED.
     (lots more output appears)cp imap/pop3d-ssl.dist .cp imap/imapd.cnf .cp imap/pop3d.cnf .make[1]: Leaving directory `/tmp/courier-imap-3.0.8' 
 
       Making install in numlibmake[1]: Entering directory `/tmp/courier-imap-3.0.8/numlib'make[2]: Entering directory `/tmp/courier-imap-3.0.8/numlib'(lots more output appears)
 
      Making install in numlibmake[1]: Entering directory `/tmp/courier-imap-3.0.8/numlib'make[2]: Entering directory `/tmp/courier-imap-3.0.8/numlib'(lots more output appears)
     /bin/install -c 'makeuserdb' '/usr/lib/courier-imap/share/makeuserdb' 
     
      /bin/install -c 'pw2userdb' '/usr/lib/courier-imap/share/pw2userdb'make[2]: Leaving directory `/tmp/courier-imap-3.0.8'make[1]: Leaving directory `/tmp/courier-imap-3.0.8' 
 
       make[1]: Entering directory `/tmp/courier-imap-3.0.8/numlib'make[1]: Leaving directory `/tmp/courier-imap-3.0.8/numlib'make[1]: Entering directory `/tmp/courier-imap-3.0.8/gdbmobj'(lots more output appears)authdaemonrc:
 
      make[1]: Entering directory `/tmp/courier-imap-3.0.8/numlib'make[1]: Leaving directory `/tmp/courier-imap-3.0.8/numlib'make[1]: Entering directory `/tmp/courier-imap-3.0.8/gdbmobj'(lots more output appears)authdaemonrc:
     authmodulelist: newauthmodulelistorig: newdaemons: newversion: newauthdaemonvar: new
     make[1]: Leaving directory `/tmp/courier-imap-3.0.8'
      $
      
     
      If the output appears similar to above, then Courier-IMAP will have been successfully 
      installed. You may continue at the section "Configuring Courier-IMAP". 
      
     
       Handling errors 
       It is possible that the configure command will fail. Configuration attempts to 
        detect existing software, and ensure that Courier-IMAP works with it, 
        but it occasionally makes an error. 
       checking for getspent... yes configure: error: /var/vpopmail/etc/lib_deps does 
        not exist -upgrade vpopmail to the current version or fix the permissions 
        on this file configure: error: /bin/sh './configure' failed for authlib 
        
       In this example, the configure command assumed that vpopmail was installed, and 
        failed when it couldn't find parts of vpopmail. In reality, vpopmail was 
        not installed, and should not have been detected, By consulting the INSTALL 
        file, we read: 
       configure should automatically detect if you use vpopmail, and compile and install 
        the authvchkpw authentication module. 
       This suggests that the authvchkpw is used for vpopmail. Further up the INSTALL 
        file, we read: 
       
        * authvchkpw -this module is compiled by default only if the vpopmail account is 
        defined. 
       Upon checking the /etc/passwd file, we find that there is an account for vpopmail, 
        which explains the detection. The lack of vpopmail files explains the 
        failure of the configure script. In the INSTALL file, the parameters to 
        the configure script are described: 
       Options to configure: ... 
       * --without-module -explicitly specify that the authentication module 
       named "module" should not be installed. See below for more details. 
        
       Example: --without-authdaemon. 
       The solution is therefor to use the --without-authvchkpw option: 
       $ ./configure –without-authvchkpw 
       Most problems can be solved in a similar way. It is best not to be put off by 
        terms and names that aren't understood -just by searching for the term 
        vpopmail(which was mentioned in the original error message), but without understanding 
        anything about vpopmail, it is possible to resolve the error by reading 
        the documentation. 
       
        If an answer can't be found, there is a courier mailing list which can be approached 
        for help. Details are given in the section on the Courier Authentication 
        Library.