Where does this trigger scanning of the mailbox? I had a look at
mbox.c and could not find where it scans the mailbox. But assuming
that it does, why does it do it? I suppose I am coming from a maildir
mindset, but I can't see why you would have to scan the entire mailbox
to add a message.
Possibly I didn't explain myself quite clearly. If you only call
mailbox_open+mailbox_append_message+mailbox_close, scanning should not
occure. However, almost any other call, such as mailbox_get_message,
mailbox_get_count, etc, will initiate the scanning if it has not been
done yet. So, care should be taken to avoid these calls.