Postfix issue - no local mail delivery on postfix server

Hi,

I configured my Postfix server first with Yast for the basic settings and then a bit of tweaking with Webmin.
Every works fine, the mail for the internet are forwarded by postfix to my ISP’s SMTP server and they are correctly delivered to the destination.
But mails sent to local users on the server are not delivered. Instead, a mail is sent to my ISP’s mailbox with the following content (I changed the server and mailboxname to a fake one fore this post):

**This is the mail system at host server.domain.com

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<someone@server.domain.com> (expanded from <someone@server>): cannot update
mailbox ~/mail/someone for user someone. unable to create lock file
~/mail/someone.lock: No such file or directory**

So it seems that postfix tries to create a lock file in the mailbox folder (which is in the user’s homefolder). I already changed the permissions on that folder, changed the ownership but nothing works.

Any ideas?

Thanks.

Naturally the first question is does the directory ~user/mail exist? A directory, not a plain file.

Delivery by postfix is as the target user’s account, therefor the directory where the lock file is created must be owned by the user, and probably should not be not world or group writable. So don’t make it mode 777 like every over-simplistic permission quick fix suggests.

Yes, the folder exists, has the right user and group permission, has the right name and in the correct location. I tried multiple setup situation possible in Dovecot, editing the config file directly and by using Webmin. But everyting works, except local mail delivery due to the above error (something with the lock of the file or folder not found). The only thing I don’t get is what the hell is missing now, a file, a folder ?? The error message is not clear and there is no usefull info in the log files either.

Perhaps posting your /etc/postfix/main.cf and /etc/postfix/master.cf would shed some light.

Be mindful of any passwords in your main.cf and try to omit the comments in the file.
This little one liner may help with removing the comments, but copy the files to another location before running it so you dont make any mistakes:
cat <config file> |sed ‘/#.*$/d’ | sed ‘/^$/d’ > newconfigfile

Joe

Thanks for your help so far but a couple of minutes ago, after 6 long hours of searching I found the solution.

I set the following parameters in place:

home_mailbox=/var/mail/%u
mail_spool_directory=/var/mail
mailbox_command=/usr/bin/procmail

Restarted the postfix server and did some tests. Email for domains out of my server domain is send to the ISP’s SMTP server for internet delivery, the addresses in my local domain are now delivered to the correct users.

Everything is fine now, I was focussing on the wrong service. The problem was in Postfix while I was constantly trying to make changes to Dovecot (which always broke my Atmail sql-database and login system).

All is fine now, thanks.