Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

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

share|improve this answer
    
/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
    
That would be bad. –  adaptr Oct 1 '12 at 12:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.