[CentOS] Fedora 9 -> Centos 7 upgrade Dovecot problem

Mon Aug 24 20:15:42 UTC 2015
Jonathan Billings <billings at negate.org>

On Mon, Aug 24, 2015 at 07:53:49PM +0100, Gary Stainburn wrote:
> I used the default locations on the old F9 server, i.e. mail delivered 
> to /var/spool/mail/%u by EXIM and Dovecot using that as the inbox.
> Dovecot then used ~/mail/ as it's folder dir.
> On the new server this works fine for any user where ~/mail/ already exists, 
> but for any user where ~/mail/ does not exist Dovecot fails.

It could be SELinux:

% matchpathcon /home/anyone/mail
/home/anyone/mail       unconfined_u:object_r:user_home_t:s0

You might need to make the mail directory be named Maildir:

% matchpathcon /home/anyone/Maildir
/home/anyone/Maildir    unconfined_u:object_r:mail_home_rw_t:s0

I suspect that Dovecot isn't allowed to create 'mail' but is allowed
to create Maildir by the default policy.

Jonathan Billings <billings at negate.org>