procmail
[Top] [All Lists]

Re: do lockfiles prevent collisions with imapd?

2003-04-08 17:19:29
On Tue, Apr 08, 2003 at 01:51:18PM -0700, Jeff Orrok wrote:
Right now, the script greps the output of ps to see if imapd is currently
being run by this user, and exits without taking its actions if so.  I thought
it might be more elegant if I could use lockfiles on the folders, or some
other means to gracefully synchronize with imapd, or maybe have the script run
as the imap equivalent of .bash_logout.  Does anyone know where I could find
this out?

This probably isn't as big an issue as you think it is. IMAPd (or whatever
IMAP daemon you're using) should take care of locking the folder appropriatly
when accessing it, and procmail understands file locking. If the only thing
your user does with those folders is drop messages with addresses to be
white/black listed, but otherwise never looks at the contents of those
folders, and all your procmail script does is read the folder contents and add
those addresses to the white/black lists (and potentially clearing out the
processed messages), you shouldn't see any problems. The only time you'll see
any contention is if the script fires at the exact same moment your user drops
a message in the folders, in which case IMAPd will lock the folder in question
and procmail will patiently wait for the lock to clear.

-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>