Next the configuration of the authentication module, it will be used by everything the mail-server does. SMTP authentication, access to the IMAP mailbox and eventually access to the web based mail program. To enable the authentication module to use the Postfix database we created earlier configure it as follows:
Edit the file ‘
authmysqlrc‘ in the directory ‘
/usr/local/etc/authlib‘. This will configure the database access like where it is, how to connect, which user and password and which tables and fields to use.
# if you used the MySQL package from MySQL.com use the
# following settings otherwise check your MySQL installation.
# The name of the MySQL database we will use:
# the table in the database with the users
# which field in the table has the password
# the numerical userid of the _vmail account
#the numerical groupid of the postfix account
# the username as defined in the table mailbox
# the location of the mailboxes on the server
# Please change this is you are going to use a different location.
# The user’s name (optional)
# The location where the user mailbox is defined in the table.
Next is configuring the authentication module to use the MySQL based authentication module. Edit the file ‘
authdaemonrc‘ in the same directory ‘
/usr/local/etc/authlib‘. We only are going to use the MySQL database for authentication so we need to remove the others:
# This setting is used by Courier’s webadmin module,
# and should be left alone
authmodulelistorig=”authuserdb authpam authldap authmysql
# The number of daemons running concurrently on the server
# authdaemonvar is here, but is not used directly by authdaemond.
# It’s used by various configuration and build scripts.
# So don’t touch it !
# when testing set the level at 2
# when everything runs smoothly set it to 0.
# keeping the defaults for the rest for now.
Next step: Configuring Courier IMAP with your maildir