I was trying to configure postfix, mysql with
dovecot. The postfix part is fine, but dovecot seems cannot cannot read the mail
directory
dovecot: Apr 09 16:22:37 Info: Dovecot starting
up
dovecot-auth: Apr 09 16:22:38 Info: MySQL: connected to
localhost
dovecot-auth: Apr 09 16:22:38 Info: Login process 7
connected
dovecot-auth: Apr 09 16:22:38 Info: Login process 8
connected
dovecot-auth: Apr 09 16:22:38 Info: Login process 7 sent handshake:
PID 13875
dovecot-auth: Apr 09 16:22:38 Info: Login process 8 sent handshake:
PID 13878
dovecot-auth: Apr 09 16:22:38 Info: Login process 9
connected
dovecot-auth: Apr 09 16:22:38 Info: Login process 9 sent handshake:
PID 13876
dovecot-auth: Apr 09 16:23:11 Info: MySQL: Performing query: SELECT
clear FROM postfix_users WHERE user='chris'
dovecot-auth: Apr 09 16:23:11
Info: MySQL: Performing query: SELECT concat('/var/spool/mail/', maildir) AS
mail, uid, gid FROM postfix_users WHERE user='chris'
imap(chris): Apr 09 16:23:11 Error: mbox: Can't create root
IMAP folder /mail: Permission denied
imap(chris): Apr 09 16:23:11 Fatal:
Failed to create storage with data:
/var/spool/mail/mydomain.com/chris/Maildir
imap-login: Apr 09
16:23:11 Info: Login: chris [::ffff:192.168.1.2]
dovecot-auth: Apr 09
16:23:11 Info: Login process 9 disconnected
dovecot: Apr 09 16:23:11 Error:
child 13879 (imap) returned error 89
dovecot-auth: Apr 09 16:23:11 Info:
Login process 9 connected
dovecot-auth: Apr 09 16:23:11 Info: Login process 9
sent handshake: PID 13880
The file status in the mail folder. The uid
and gid of vmail is 1004
[root@bluemountain chris]# ls
/var/spool/mail/mydomain.com/chris/ -l
total 16
-rwx------ 1 vmail
vmail 11382 Apr 9 00:51 Maildir
Here's my mysql
data
mysql> select * from
postfix_users;
+----+----------------------+-------+-------+------+------+------+--------------------------------+------------------------------+-------+--------+---------+-------+
|
id |
email
| clear | crypt | name | uid | gid |
homedir
|
maildir
| quota | access | postfix | user
|
+----+----------------------+-------+-------+------+------+------+--------------------------------+------------------------------+-------+--------+---------+-------+
|
1 | chris@mydomain.com | pass |
| | 1004 | 1004 | /var/spool/mail/mydomain.com |
mydomain.com/chris/Maildir | |
Y | Y | chris
|
+----+----------------------+-------+-------+------+------+------+--------------------------------+------------------------------+-------+--------+---------+-------+
1
row in set (0.00 sec)