I'm using maildrop as a transport in postfix to handle virtual
mailboxes. When I inject a message to go to one of these virtual
mailboxes, I get the following error in the maillog:
(temporary failure. Command output: /usr/bin/maildrop: Invalid home directory
permissions - world writable. )
I haven't been able to find an answer to how to fix this error, just
more people asking the same question. I tried looking through the
maildrop source code and found this in main.C:
if ( stat(".", &buf) < 0 ||
!S_ISDIR(buf.st_mode) ||
buf.st_mode & S_IWOTH ||
buf.st_uid != getuid())
{
errexit=EX_TEMPFAIL;
throw "Invalid home directory permissions - world writable.";
}
I was going through some .h files trying to figure out what S_ISDIR
and S_IWOTH meant. But I figured asking here would be faster.
What permissions should the /home/vmail directory and the virtual
mailbox directories inside of that be? Right now I have the following:
/home/vmail vmail:vmail (dr-xr-xr-x)
/home/vmail/slugbug.org vmail:vmail (dr-xr-xr-x)
/home/vmail/slugbug.org/testing mark:mark (dr-xr-xr-x)
/home/vmail/slugbug.org/testing/.mailfilter mark:mark (-r--------)
/home/vmail/slugbug.org/testing/Maildir mark:mark (drwxr-xr-x)
I've also tried making the slugbug.org directory owned by mark:mark.
Mark