In this tutorial we’ll install the Debian Linux 9 (squeeze), Apache 2 with mpm-itk (to run each web as a isolated user),...
Installing Courier POP3 and IMAP daemon with MySql backend
Ástþór IPThe Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. In this tutorial we’ll only use the Courier POP3 and IMAP services.
It’s assumed that you have already installed and configured Postfix according to this tutorial: Installing Postfix with MySql backend and SASL for SMTP authentication
1. Install required packages
apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
2. Make Courier use MySql backend (pico /etc/courier/authdaemonrc)
authmodulelist="authmysql"
3. Configure the MySql connector (pico /etc/courier/authmysqlrc)
MYSQL_SERVER 127.0.0.1
MYSQL_USERNAME {username}
MYSQL_PASSWORD {password}
MYSQL_PORT 0
MYSQL_DATABASE {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
{database} = MySql database name
MySql username
MySql password
4. Restart Courier 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
-
Hi,
i got this error log :
Feb 21 04:22:03 smtp postfix/virtual[18952]: warning: mysql query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(email,’@’,1),’/’) FROM users WHERE email=’[email protected]” at line 1need a help