<snip>
When a client deletes a message in IMAP, it's always marked as \Deleted before it is "expunged". Mozilla's "compact folders" feature runs the command "expunge" to the IMAP server, in which case the messages are permanently removed from the mailbox.
The message count stays the same when a message is marked as deleted, but it changes when a mailbox is expunged. This is the way IMAP works.
Well, I sat down last night and actually read the RFC's like I should have in the first place, and yup, it's updating the flags, so nanananabooboo on me.
This, of course, makes doing a "new mail count" somewhat less intuitive. A simple STATUS (MESSAGES UNSEEN) won't do. So, after a mornings worth of hacking some purloined code from gbuffy, I've got a command line utility that does a FETCH 1:<end> (FLAGS), and actually counts up the non-deleted result set. This provides me with up-to-date accurate total and unseen counts.
Of course, the imap checking routine for IceWM will go from about 50 lines to about 400 lines (or so), but what the hey.
Thanks for hitting me over the head with the clue stick. I need it. :-)
And thanks for binc. In about two months then entire organization will be running on it. I really like it's simplicity (compared to other imap servers that "it's not") :-)
Scott
-- Scott Balneaves | The aim of a joke is not to degrade Systems Administrator | the human being but to remind him that Legal Aid Manitoba | he is already degraded. -- George Orwell
