This article will show you how to configure Postfix and Dovecot to handle multiple domains stored in MySQL. Postfix Admin is used to manage the domains, mailboxes and aliases in MySQL. See How to Install Postfix Admin to setup the MySQL database that will be used by Postfix and Dovecot.
1. Postfixadmin is installed, created database talbes/etc.
2. Postfix installed > postmap check getting failed. (i am using mysql/apache/php lampp from apachefriends which gets run as "/opt/lampp/lampp start" )
[root@shamun postfix]# postmap -q marie.be mysql:/etc/postfix/mysql-domains.cf postmap: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@shamun postfix]# mysql Command not found. Install package 'mysql' to provide command 'mysql'? [N/y] [root@shamun postfix]#
[root@shamun postfix]# /opt/lampp/bin/mysql Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 106 Server version: 5.1.41 Source distribution
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show databases; +——————–+ | Database | +——————–+ | information_schema | | cdcol | | mysql | | phpmyadmin | | postfix | | test | +——————–+ 6 rows in set (0.28 sec)
After give up with XAMP according to your advice, finally postfix, postadmin works, test also works, many thanks for that.. But then i followed your guide for the Dovecot. I am getting this now:
A:
case /var/log/maillog
Jan 7 00:04:46 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Jan 7 00:04:46 localhost dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while.. Jan 7 00:04:46 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql' Jan 7 00:04:46 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down Jan 7 00:07:02 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Jan 7 00:07:02 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql' Jan 7 00:07:02 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down Jan 7 00:11:03 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Jan 7 00:11:03 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql' Jan 7 00:11:03 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down Jan 7 00:11:34 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Jan 7 00:11:34 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql' Jan 7 00:11:34 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down Jan 7 00:14:16 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Jan 7 00:14:16 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql' Jan 7 00:14:16 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down
[root@shamun log]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 5.1.41 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases; +——————–+ | Database | +——————–+ | information_schema | | mysql | | postfix | | test | +——————–+ 4 rows in set (0.31 sec)
mysql>
B:
[root@shamun log]# cat /etc/dovecot-mysql.conf driver = mysql connect = host = localhost dbname=postfix user=root password= default_pass_scheme = PLAIN password_query = SELECT password from mailbox where username = '%u'
[root@shamun log]#
C:
[root@shamun log]# service dovecot status dovecot dead but pid file exists [root@shamun log]#