Next Previous Contents

4. Configuration

Ok, now you need to configure authpcre. First of all, you need to tell courier imapd and courier pop3 you want to use authpcre as an authentication module. To do this, just open imapd and pop3d configuration files (on my system, /etc/courier/imapd and /etc/courier/pop3d) with your preferred editor, look for a line like

  AUTHMODULES="authdaemon"
    or
  AUTHMODULES="any_fancy_authentication_module"
and change it in
  AUTHMODULES="authpcre authdaemon"
    or
  AUTHMODULES="authpcre any_fancy_authentication_module"
Beware! authpcre must be the first authentication module. Infact, any preceeding authentication module wouldn't see the modified username but the original one. Do it at your own risk.

There is one additional configuration parameter that may be specified (only if you want/wish/need to), ``PCRECONFIG''. It allows you to explicitly ask for a configuration file to be used. This is useful if you have different instances of imap servers that should use different configuration files (is there anybody out there with something like this? Why did you want to do something like that?) or if you want to specify two different configuration files for imapd or pop3d. Watch out that at time of writing the pop3d init script does not pass additional parameters over to the daemon when it starts it up, and thus the PCRECONFIG parameter would be lost. It is however trivial to modify the init script to pass PCRECONFIG over. Have fun!

Just to give you a hint, the standard ``/etc/whatever_init.d/pop3d'' should contain a line that looks like:

           /usr/bin/env - PATH="$PATH" SHELL="$SHELL" POP3AUTH="$POP3AUTH" \
                $TCPD -pid=$PIDFILE -stderrlogger=${sbindir}/courierlogger \
                                 -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
                                         $TCPDOPTS -address=$ADDRESS $PORT \
            ${prefix}/lib/courier/courier/courierpop3login $AUTHMODULELIST \
                          ${prefix}/lib/courier/courier/courierpop3d Maildir
that should be changed to look like:
    /usr/bin/env - MAILDIR_CREATOR="$PCRECONFIG" PATH="...


Next Previous Contents