I use the Maildir format so each message is its own file making it atomic.
Reply on news.ycombinator.com