Le 09/11/2010 18:15, Toomas Vendelin a écrit :
Hi there!

I run Postfix on CentOS 5.5 with virtual domains. Mail is supposed to
be delivered to maildirs. Everything worked with a sendmail/mbox setup
for the same domain, so MX issues can be eliminated immediately :)

I'm trying to set up a virtual mail hosting on a testing machine,
following the tutorial at:
http://howtoforge.net/linux_postfix_virtual_hosting

Here's the issue. Message file cannot be written to tmp folder because
of "Permission denied". Needless to say, both owherships and
permissions were checked by hand descending from base
(/var/spool/vmail) to the bottom. To check misspelled directory names,
I've copied the full path and run #cd
/var/spool/vmail/minu.biz/toomas/tmp/ - worked fine. I've even tried
to chmod -R 0777 /var/spool/vmail (it is a testing machine), but even
then I've got the very same "Permission denied". Disabling SELinux
didn't work either. Maildirs WERE created in advance, exactly as the
message suggests. It's late, and I'm running out of ideas. Please,
help.

Exerpt from maillog:

Nov  9 18:27:45 rh2 postfix/smtpd[5139]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled

This is unrelated to your problem, but you should remove NIS from your config. configure alias_maps explicitely:
$ postconf -d |grep nis
alias_maps = hash:/etc/aliases, nis:mail.aliases
$ postconf -e alias_maps=hash:/etc/aliases


Nov  9 18:27:45 rh2 postfix/smtpd[5139]: connect from
smtp-out.neti.ee[194.126.126.41]
Nov  9 18:27:46 rh2 postfix/smtpd[5139]: 0028C1F494:
client=smtp-out.neti.ee[194.126.126.41]
Nov  9 18:27:46 rh2 postfix/cleanup[5143]: 0028C1F494:
message-id=<1f1c29e7-c1cd-4eff-907a-42bd5f491...@vendelin.com>
Nov  9 18:27:46 rh2 postfix/smtpd[5139]: disconnect from
smtp-out.neti.ee[194.126.126.41]
Nov  9 18:27:46 rh2 postfix/qmgr[4738]: 0028C1F494:
from=<x...@yyy.com>, size=1507, nrcpt=1 (queue active)
Nov  9 18:27:46 rh2 postfix/virtual[5144]: warning: maildir access
problem for UID/GID=5000/5000: create maildir file
/var/spool/vmail/minu.biz/toomas/tmp/1289320066.P5144.rh2.tere.com:
Permission denied


try running

$ touch /var/spool/vmail/minu.biz/toomas/tmp/test.test

as a user with uid=gid=5000.



Nov  9 18:27:46 rh2 postfix/virtual[5144]: warning: perhaps you need
to create the maildirs in advance
Nov  9 18:27:46 rh2 postfix/virtual[5144]: 0028C1F494:
to=<too...@minu.biz>, relay=virtual, delay=0.07,
delays=0.05/0.01/0/0.01, dsn=4.2.0, status=deferred (maildir delivery
failed: create maildir file
/var/spool/vmail/minu.biz/toomas/tmp/1289320066.P5144.rh2.tere.com:
Permission denied)

Output of postconf -n:

command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
inet_interfaces = all
mail_owner = postfix
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = $myhostname
myhostname = rh2.tere.com
mynetworks = 192.168.50.0/24
myorigin = $mydomain
queue_directory = /var/spool/postfix
relay_domains = $mydestination
virtual_alias_maps = hash:/etc/postfix/valias
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/vmail
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_uid_maps = static:5000

Reply via email to