PDA

View Full Version : auto maildir cration


jag7720
15th September 2008, 22:58
I installed postfix with this howto

http://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-centos5.1

How do I get the system to create the user's maildirs or do i have to do this manually?

I am getting this error

maildir delivery failed: create maildir file /home/vmail/hammersoup.com/jason/tmp/1221508725.P20611.www: Permission denied)


Thanks

falko
16th September 2008, 19:32
The directories are created automatically when the first email arrives.
What's the output of ls -la /home/vmail?
Did you disable SELinux?

jag7720
16th September 2008, 19:42
I got it to work by doing a chmod 777 /home/vmail

Not sure if that is the best solution.... is it? Is there a better way?

SELinux is not installed

[root@www init.d]# ls -la /home/vmail
total 52
drwxrwxrwx 5 vmail vmail 4096 Sep 15 13:51 .
drwxr-xr-x 25 root root 4096 Sep 4 06:38 ..
-rw------- 1 vmail vmail 1086 Jul 24 10:23 .bash_history
-rw-r--r-- 1 vmail vmail 33 Jul 24 10:10 .bash_logout
-rw-r--r-- 1 vmail vmail 176 Jul 24 10:10 .bash_profile
-rw-r--r-- 1 vmail vmail 124 Jul 24 10:10 .bashrc
-rw-r--r-- 1 vmail vmail 515 Jul 24 10:10 .emacs
drwx------ 3 5000 5000 4096 Sep 15 13:51 hammersoup.com
drwxr-xr-x 3 vmail vmail 4096 Jul 24 10:10 .kde
drwxr-xr-x 4 vmail vmail 4096 Jul 24 10:10 .mozilla
-rw-rw-r-- 1 vmail vmail 25 Jul 24 10:13 .rpmmacros
-rw-r--r-- 1 vmail vmail 658 Jul 24 10:10 .zshrc


[root@www init.d]# ls -la /home/
drwxrwxrwx 5 vmail vmail 4096 Sep 15 13:51 vmail

falko
17th September 2008, 18:51
drwx------ 3 5000 5000 4096 Sep 15 13:51 hammersoup.com

The hammersoup.com directory is owned by a user and group that don't exist anymore (otherwise it would display the names insted of the IDs). Did you delete them?

jag7720
20th September 2008, 00:20
i did not delete them. I ran this

postconf -e 'virtual_uid_maps = static:1001'
postconf -e 'virtual_gid_maps = static:1001'

those are the UID and GID of vmail. I think that will fix it.