Quantcast
Channel: postfix – Debian Tutorials
Viewing all articles
Browse latest Browse all 20

Installing Courier POP3 and IMAP services with MySql backend

$
0
0

This tutorial assumes you already have Postfix installed with MySql backend as described in this tutorial: Installing Postfix with MySql backend and TLS

1. Install required packages

apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl

2. Make the auth daemon support MySql virtual users (pico /etc/courier/authdaemonrc)

authmodulelist="authmysql"

3. Configure courier to use MySql backend (pico /etc/courier/authmysqlrc)

MYSQL_SERVER {mysql_host}
MYSQL_USERNAME {mysql_username}
MYSQL_PASSWORD {mysql_password}
MYSQL_PORT 0
MYSQL_DATABASE {mysql_database}
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
MYSQL_QUOTA_FIELD quota

4. Restart affected daemons

/etc/init.d/courier-authdaemon restart
/etc/init.d/courier-imap restart
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop restart
/etc/init.d/courier-pop-ssl restart

You can now connect to your server on port 110 for pop3, 995 for pop3s, 143 for imap and 993 for imaps.


Viewing all articles
Browse latest Browse all 20

Trending Articles