Cyrus IMAP Server: Notes

  • appending: it's important that the index records for individual messages make it to disk before the index header indicating that they're there. so something like:

    1. sync messages to disk (or depend on link() being atomic)

    2. create new index records, flush to disk

    3. create new header if necessary (adding new user flag), flush to disk

    4. flush cache file

    5. update index header, flush to disk