Mail locking problem


Hi all,

I wanted to run ASK ( on my mail. I’ve done it before and have setup everything ‘correctly’, but I get “fcntl” problems trying to ‘lock’ the mail. (ASK does, that is) Mutt will also get these problems if you run it inside a shell.

From what I can tell, it’s an NFS problem, though I’ve read that the Postfix mailer doesn’t need these locks.

I know that this is a rather obscure problem, but does anyone have any possible solutions for me? Would piping everything through procmail make a difference? Is there something that I’m doing wrong?


Hate replying to my own post, but here’s a quick dump of the error that I get…

Traceback (most recent call last):
File “/home/abg/bin/”, line 71, in ?
rc = ask.filter(sys.stdin)
File “/home/abg/bin/”, line 232, in filter
File “/home/abg/bin/”, line 504, in queue_mail
self.mail.deliver_mail(queueFileName, self.tmpfile, custom_header)
File “/home/abg/bin/”, line 141, in deliver_mail
fh_mbox =, “a”, lockf)
File “/home/abg/bin/”, line 64, in open
fcntl.lockf(self.fh_lock.fileno(), fcntl.LOCK_EX)
IOError: [Errno 37] No locks available

And moving to procmail doesn’t help either. shrug


So I finally get the gumption to post a message here and then solve it myself within five minutes. sigh

For those interested, it was an ASK problem - it was ignoring the command to not lock, even though it claimed that it wasn’t. The version in CVS solves it.




The fcntl() problems should be fixed these days; let me know what machine you’re seeing this on.

That said, you will not see locking problems if mutt isn’t trying to lock any mbox folders. If you put:

set mbox_type=Maildir
(this should be default on user machines)

The usual problem for this is mutt trying to lock an existing postponed or fcc folder, so you’ll need to remove, convert, or move an existing folder, even if it’s totally empty.

We do our best to make sure that locking works properly over NFS, but we only “officially support” Maildir (since it doesn’t have the same problems if file locking isn’t working).