I'm setting up a mail server on an embedded linux system.
When sending mail to a local user I get the following error from procmail:
procmail: Lock failure on "/home/mail/ktos/.mailspool.lock"
procmail: Error while writing to "/home/mail/ktos/.mailspool"
procmail: Error while writing to "/var/spool/mail/ktos"
From root@waben Wed Dec 15 10:00:40 2010
Folder: **Bounced** 0
procmail: Lock failure on "/root/.mailspool.lock"
procmail: Error while writing to "/root/.mailspool"
From MAILER-DAEMON Wed Dec 15 10:00:41 2010
Subject: Returned mail: see transcript for details
Folder: /var/spool/mail/root 1732
And the mail goes to /var/spool/mail/root.
This is my /etc/procmailrc:
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/.mailspool
DEFAULT=$HOME/.mailspool
LOGFILE=/dev/pts/0
SHELL=/bin/sh
What could be the problem? I'm still pretty green with all the sendmail and procmail stuff as I'm primarily a developer.
Best Answer
Looks like procmail doesnt have write permission to /home/mail/ktos directory to create the lock. Usually you have to set the directory to have specific group ownership and group write permission for procmail to be able to write. Or you can change the config to write the locks to a different directory that is writeable. I hope this helps...