1

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.

1 Answers1

2

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...

Chris T
  • 76
  • 1
  • /home/mail/ktos is owned by user ktos and group ktos and is writable for its owner - is that ok? I'll try tweaking with permissions. –  Dec 15 '10 at 08:32
  • I've set permissions for /home/mail/ktos to 777 and still get the same error. Is it possible to get procmail to do everything as root? –  Dec 15 '10 at 09:25
  • 2
    That would be bad. – adaptr Oct 01 '12 at 12:02