I have setup a local user called postman and logged into it using Thunderbird (IMAP). Following is being shown in the mail error log.
Dec 14 23:45:18 ams1 dovecot: lda(root): Fatal: Invalid user settings. Refer to server log for more information.
Dec 14 23:45:18 ams1 dovecot: lda(root): Error: chdir(/root/) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup) missing +x perm: /root, dir owned by 0:0 mode=0700)
Dec 14 23:45:18 ams1 dovecot: lda(root): Error: chdir(/root) failed: Permission denied
Dec 14 23:45:18 ams1 dovecot: lda(root): Error: user root: Initialization failed: Initializing mail storage from mail_location setting failed: stat(/root/Maildir) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup) missing +x perm: /root, dir owned by 0:0 mode=0700)
How to solve it and how to exclude root from using mail?
/etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
/etc/postfix/main.cf
home_mailbox = Maildir/
Is there a better way of storing emails rather than in /home?
Best Answer
Delivery of email for root (MTA alias)
Standard security recommendation states that email to
root
should be redirected to non privileged user -> In postfix configuration create alias forroot
.http://www.postfix.org/aliases.5.html
BTW AFAIR some file system (NFS?) map user
root
to usernobody
.