Since you asked for comments, my comment is that the IMAP server is working correctly as-is, according to the IMAP specification. I understand the problem that you're trying to solve, but I don't think that you'll have much luck solving it by changing the IMAP server.
It's probably much too late now to change the IMAP specification to require that the UNSEEN count from STATUS disregard deleted messages. Had that idea been brought up 8 years ago when STATUS first appeared, it probably would have been accepted and made part of the specification. There are now many IMAP server implementations. I don't think that it is feasible to change STATUS now. By the way, I hope that Mozilla is not doing STATUS on a selected mailbox. It is alright (and intended) to use STATUS to probe a non-selected mailbox. If the mailbox is selected there are other ways that should be used by the client to check for new mail. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.