Menu

#1 use standard file locking instead of fuser

open-postponed
None
6
2004-09-19
2003-10-12
Anonymous
No

As I understand it, archmbox uses fuser(1) to check whether a
mailbox is currently opened by any other process, then just goes
ahead in the hope that nobody will access the file for the time
being.

This has two problems: (1) fuser(1) may not be available
everywhere, especially in shared hosting environments. (2)
Cursory checking revealed no safeguard in place against
intermittent access, inviting loss of data in situations where
archmbox is used on an active mailbox. (E.g. 17:11:02 archmbox
called on a 30 MB box to archive messages older than 30 days.
17:11:03 incoming message, mailbox appended to by the MDA.
17:11:04 archmbox finishes its work, deleting the latest message
in the process.)

I would suggest moving to a standard file locking mechanism.
Otherwise, people should be advised that archmbox must not be
used on active mailboxes. If I am wrong about the whole thing, I'd
be very happy to stand corrected.

Discussion

  • Alessandro Dotti Contra

    Logged In: YES
    user_id=197334

    Yes, you understand it correctly.
    Anyway, it's not true that archmbox deletes any message in
    the archiving process, since it uses fuser(1) to check if
    the mailbox is in use, and checks also for mtime of the
    mailbox itself. If message got appended during the achiving
    process, archmbox recognizes a change in the mailbox and
    refuses to operate.
    I do agree with you that a standar locking mechanism must be
    implemented, and I'll do it a as soon as possible.
    Thank you very much for your comment... I'll also put a note
    in the documentation about the issue.

    ciao
    alex

     
  • Alessandro Dotti Contra

    • priority: 5 --> 6
    • assigned_to: nobody --> adotti
     
  • Alessandro Dotti Contra

    • status: open --> open-postponed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.