Hi, been trying to install exim-spamassassin-courier imap on a redhat 9.0 (large distribution). Having real trouble with getting courier imap to authenticate users from a databse, the process of installation is below, its kinda long i know, but if anyone has any feedback it would be much appreciated
I have tried a lot of things and I'm a newbie

......
Exim works with spamassassin as a transport in the configuration file. The config file ahs been altered to use a database I set up, it creates the mailboxes correctly in a /var/spool/virtual-mail/ folder and sends email there correctly in the mail_dir format.
Only trouble is retrieving the mail once it is in there. Trying to authenticate using PAM to connect to databse and get the appropriate password/username etc.
Installed Courier-authlib version:
Courier-authlib-0.57-2tr.i586.rpm
Tar –xjvf courier-imap….
Cd courier-imap…
./configure –with-redhat
gmake
gmake install-strip
gmake install-configure
cp courier-authlib.sysvinit /etc/init.d/courier-authlib
chmod 755 /etc/init.d/courier-authlib
changed /usr/local/etc/authlib/authdaemonrc
authmodulelist=”authpam”
(first tried authmysql but this did not work at all, thought I would have to recompile with –DWITH_MYSQL or something, so tried to use PAM to use the databse for authentication)
(Also read somewhere that this file should have the lines
version="authdaemond.mysql"
AUTHDAEMOND="authdaemond.mysql"
But didn’t add these in until later and they are currently commented)
Started authlib
/etc/init.d/courier-authlib start
Installed Courier-Imap version:
Courier-imap-4.0.4.20050820.tar.bz2
Unpacked and configured as a regular user (not root).
Tar –xvjf courier-imap…
Cd courier-imap…
./configure –with-redhat
gmake
Logged in as root to install:
Gmake install-strip
Gmake install-configure
cp courier-imap.sysvinit /etc/init.d/courier-imap
chmod 755 /etc/init.d/courier-imap
started it with:
/etc/init.d/courier-imap start
Edited /usr/local/etc/authlib/authmysqlrc with the relevant details below:
# The server name, userid, and password used to log in.
MYSQL_SERVER localhost
MYSQL_USERNAME [private]
MYSQL_PASSWORD [private]
MYSQL_SOCKET /var/lib/mysql/mysql.sock
Several examples had: /var/run/mysqld/mysqld.sock but I did not have this file – apparently mysql.sock will do
MYSQL_PORT 0 apparently don’t need this, taken care of by mysql.sock file
# Leave MYSQL_OPT as 0, unless you know what you're doing.
MYSQL_OPT 0
MYSQL_DATABASE [private]
MYSQL_USER_TABLE boxauth
MYSQL_CRYPT_PWFIELD boxpwd
# DEFAULT_DOMAIN example.com
MYSQL_UID_FIELD 27
MYSQL_GID_FIELD 27
MYSQL_LOGIN_FIELD boxname
MYSQL_HOME_FIELD '/var/spool/virtual_mail/'
Telnetting into ports 110 and 143 (only configuring IMAP anyways, POP3 is not getting changed, it works at the moment but we will disable later).
Disabled imap service in /etc/xinetd.d/imap to free the port for courier-imap to use.
Configured PAM file:
/etc/pam.d/imap
so that it used the database I had created earlier for authentication:
#%PAM-1.0
auth required pam_mysql.so user= [private] passwd= [private] db= [private] table=boxauth usercolumn=boxname passwdcolumn=boxpwd crypt=1
account required pam_mysql.so user= [private] passwd= [private] db= [private] table=boxauth usercolumn=boxname passwdcolumn=boxpwd crypt=1\
(there seemed to be some blank lines at the end of the file would this matter?)
Had to get the file /lib/security/pam_mysql.so for this to work so:
Installed pam_mysql-0.50-6.i386.rpm:
But this needed the /usr/lib/libmysqlclient.so.14 file or something so:
Installed mysql-shared-4.1.13-3.i586.rpm:
But this had further annoying dependencies and by this stage I was a bit over it so I cut the corner and installed using –nodeps
The whole thing does not seem to work, any help would be sooo much appreciated, thanks.
