6

Had a server that was using postfix/dovecot w/ CentOS 6.5/6.6, Every thing has been running well for the past few months, until the raid controller failed. So I installed a new server using CentOS 7. I i created the users using adduser (only a handle full fortunately) and copied the home directory contents including mail and set the owners the user:user and 770 permissions.

In each user's home folder is a Maildir directory that is set as:

drwxrwx--- 9 enduser postfix 4096 Nov 19 22:34 Maildir

All sub directories are 770 and files are 660.

The problem I am having is that Postfix is unable to write to the Maildir:

Nov 21 07:47:16 host postfix/local[12504]: warning: maildir access problem for UID/GID=1002/1002: create maildir file /home/enduser/Maildir/tmp/1416584836.P12504.host.domain.com: Permission denied
Nov 21 07:47:16 host postfix/local[12504]: 59E944726D1: to=<enduser@domain.com>, relay=local, delay=185, delays=185/0.02/0/0.05, dsn=5.2.0, status=bounced (maildir delivery failed: create maildir file /home/enduser/Maildir/tmp/1416584836.P12504.host.domain.com: Permission denied)

I've tried everything permission combination I can think of short of 777.

Any direction or light would be appreciated,

~ Wran

/home/enduser tree:

   .
    +-- enduser
        +-- Maildir
            +-- cur
            +-- new
            +-- tmp
  • maybe this help: unix.stackexchange.com/questions/34233/… – Federico Sierra Nov 21 '14 at 18:33
  • Does the Maildir contain the appropriate subfolders (cur, tmp and new)? – Jenny D Nov 21 '14 at 19:26
  • 2
    Set ownership of the directory to the user. Eg chown enduser:enduser /home/enduser/Maildir and chmod -R 700 /home/enduser/Maildir – Federico Sierra Nov 21 '14 at 19:58
  • 1
    What are the permissions on /home? – Jenny D Nov 21 '14 at 20:18
  • 1
    @Wranorn I rephrased it into an answer - it will be easier for other users who may face the same problem to find the answer that way. It'd be nice if you could accept it. – Jenny D Nov 22 '14 at 10:14
9

In order for mail to be delivered, postfix must be able to enter the user's home directory, and that directory must contain a complete Maildir tree containing the subfolders tmp, cur and new, all with the correct permissions.

Since you've already checked that the Maildir exists, has the correct folders, and has the right permissions, what remains is checking whether postfix (and the users themselves) can enter the users' home directory.

In order for that to work, the permissions have to be right every step of the way. So, not only does /home/user need to have the right permissions - so does /home. It must be set either to 750, if it's owned by a group that the users are members of, or 755 if it's not.

You can verify this by simply su'ing to a user and try to enter their home directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.