You simply want to use filesystem locks. Locking should be coordinated between all of the different mail subsystems, so you should find out what kind of file locking the mail delivery agent uses and use the same thing. Common locking protocols for mailboxes are just using flock or fcntl(LOCK_EX,...) to lock the mbox file, or create a mailbox.LOCK file. You would probably want to lock when the POP program started, so nothing changed underneath you.
In reply to Re: Locking a POP3 Mailbox
by sgifford
in thread Locking a POP3 Mailbox
by Happy-the-monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |