procmail
[Top] [All Lists]

postfix+procmail mailbox corruption, locking issues & questions

2007-05-23 16:14:10
Hey guys, one of my users just got a corrupt /var/mail/user mailbox while
reading mail with mutt and deleting messages+exiting while a mail arrived.
I'm guessing this is probably due to a locking issue. 

Here's my setup:

mutt is configured with  -USE_DOTLOCK +USE_FCNTL -USE_FLOCK. 

postfix is configured to deliver mail with the following in main.cf:
mailbox_command = /usr/bin/procmail -f- -a "$USER"
mailbox_delivery_lock = fcntl
virtual_mailbox_lock = fcntl

However despite this, "postconf -l" still lists:
flock
fcntl
dotlock

and "postconf -d | grep _lock" lists:
mailbox_delivery_lock = fcntl, dotlock
virtual_mailbox_lock = fcntl

"procmail -v" lists:
Locking strategies:     dotlocking, fcntl()

My /var/mail directory is set up so that users cannot create dotlock files
in there via procmail. So the only locking that should be applied is
fcntl.

So my questions for the postfix guys are:

1. Does postfix continue to hold the lock on the mailbox while it calls
the mailbox_deliver_command? Or does it release the lock for procmail to
re-acquire it. (Can fcntl locks be recursively acquired?)

2. Why does "postconf -d" continue to say it is using dotlocks even though
I tell it to only do fcntl?


And my questions for the procmail folks are:

1. What happens if users cannot create dotlocks in /var/mail and procmail
is being used as the delivery agent? Does it fall back to fcntl, or just
abandon all locking?

2. How do I tell procmail to only do fcntl?

3. What does the extra colon at the end of the first line of each procmail
rule then mean with respect to multiple locking modes? Does it mean to
acquire an fnctl lock only, or does it additionally create a dotlock,
overriding any other settings? What if it is absent? Does it still do an
fcntl lock if compiled to do so?

My final question for everyone is:

Who is most likely to blame for the mailbox corruption: mutt, postfix,
procmail, or the mystery option that supposedly wasn't actively being used
at the time: dovecot/IMAP?

Versions (on CentOS 5):
postfix-2.3.3-2
procmail-3.22-17.1.el5.centos
mutt-1.4.2.2-3.el5
dovecot-1.0.0-11.CF.rhel5



       
____________________________________________________________________________________Pinpoint
 customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • postfix+procmail mailbox corruption, locking issues & questions, Dan Mensom <=