/etc/postfix/main.cf.default: mailbox_delivery_lock = flock, dotlock
Is flock equivalent to dovecot's fnctl locking? For mbox what type of locking settings should I be using? (No NFS, only local filesystem.)
I'm using procmail to deliver mail to my mboxes. Does the above postfix setting effect procmail's locking method? I use rules like this:
:0
- ^X-BeenThere: dovecot@procontrol.fi DOVECOT
If I understand this correctly, :0: in procmailrc would explicitly use dotlocks instead of "kernel-locks" as procmail calls it. I'm not fully understanding all this locking stuff.
Warren Togami warren@togami.com
p.s. Timo, I received your test message after my prior posting attempt bounced. I had this error message:
Reporting-MTA: dns; danu.procontrol.fi Arrival-Date: Sat, 17 May 2003 12:52:08 +0300 (EEST)
Final-Recipient: rfc822; dovecot@procontrol.fi Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; mail forwarding loop for dovecot@procontrol.fi
On Sat, 2003-05-17 at 13:03, Warren Togami wrote:
/etc/postfix/main.cf.default: mailbox_delivery_lock = flock, dotlock
Is flock equivalent to dovecot's fnctl locking? For mbox what type of locking settings should I be using? (No NFS, only local filesystem.)
Well.. flock isn't the same as fcntl. Dovecot supports flock too, so you could set Dovecot to use that too.
Dotlock can do only exclusive mbox locking, ie. no-one else should read/write the mbox at the time. It's the oldest locking method and pretty much everyone uses at least that. If mail is only being appened to mbox, it's enough alone (if everyone else uses dotlocking too).
fcntl and flock can do both exclusive and shared locks. That provides read consistency when mails are being deleted from the middle of the mailbox. Whenever you want to read mbox, you get a shared lock so no-one can modify it while you're reading it, but that still allows others to read the mbox at the same time.
It doesn't really matter if you use flock or fcntl, as long as everyone uses the same. I think flock is more generally in client's defaults, but I used fcntl because it's more standard and might work over NFS.
If I understand this correctly, :0: in procmailrc would explicitly use dotlocks instead of "kernel-locks" as procmail calls it. I'm not fully understanding all this locking stuff.
I don't know much about procmail, but if it does dotlocking it's enough.
p.s. Timo, I received your test message after my prior posting attempt bounced. I had this error message:
Yeah, sorry. The mail got into archives and I tried to resend it, but it didn't seem to work :)
participants (2)
-
Timo Sirainen
-
Warren Togami