Installation:Gentoo:Courier

From PMWH2 - PHPMyWebHosting's official wiki
Revision as of 16:59, 13 February 2006 by Chris (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
up

On Debian GNU/Linux you need to install the following packages:

  • courier-authdaemon
  • courier-authmysql
  • courier-base
  • courier-maildrop
  • courier-pop (for unencrypted POP3 access)
  • courier-pop-ssl (for SSL-encrypted POP3 access)
  • courier-imap (for unencrypted IMAP access)
  • courier-imap-ssl (for SSL-encrypted IMAP access)

On Debian GNU/Linux use this command to install all at once:

apt-get install courier-authdaemon courier-authmysql courier-base courier-maildrop \
    courier-pop courier-pop-ssl courier-imap courier-imap-ssl

Now we must configure the Courier POP3/IMAP daemon for use with MySQL.

The final step is now to tell the Courier POP3 daemon to use MySQL to access the username and password for authentication. First edit the file /etc/courier/authdaemonrc and change the directive authmodulelist to "authmysql" like this:

/etc/courier/authdaemonrc

authmodulelist="authmysql"

Then you need to define the fields of the MySQL database table in /etc/courier/authmysqlrc like this:

/etc/courier/authmysqlrc

MYSQL_SERVER [database server hostname]
MYSQL_USERNAME [database admin user]
MYSQL_PASSWORD [database admin password]
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE [database name]
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD homedir
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota

Do not forget to restart the authdaemon and imap process using

bash #> /etc/init.d/courier-authdaemon restart && /etc/init.d/courier-imap restart

Courier is now configured and ready to use.