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:


What could be the problem? I'm still pretty green with all the sendmail and procmail stuff as I'm primarily a developer.


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

  • /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. – user58292 Dec 15 '10 at 8: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? – user58292 Dec 15 '10 at 9:25
  • 1
    That would be bad. – adaptr Oct 1 '12 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy