When an IMAP account is using the IMAP delete model (i.e. deleted messages are not removed from the mailbox right away, but instead just marked as deleted), messages marked as deleted don't get permanently removed ("expunged" in IMAP terminology) until a certain number of messages have been marked as deleted. Currently, that threshold is hard-coded at 20 messages. It should instead be a preference which the user can set.
Created attachment 284944 [details] [diff] [review] Pref added and used
Created attachment 284945 [details] [diff] [review] Pref added and used Here's an implementation of the pref, which is named "mail.imap.expunge_threshold_number".
Re-assigning to Dale Wiggins <firstname.lastname@example.org> since he's the one that wrote the code (I'm just submitting it for him).
+static PRBool gExpungeThreshold = 20; PRInt32 might work better;)
Created attachment 284951 [details] [diff] [review] Fix for pref type Argh! Had that change locally, but it didn't make it in to the first patch. Here it is now.
Comment on attachment 284951 [details] [diff] [review] Fix for pref type looks good, thx
Comment on attachment 284951 [details] [diff] [review] Fix for pref type looks good!
Checking in mailnews/mailnews.js; /cvsroot/mozilla/mailnews/mailnews.js,v <-- mailnews.js new revision: 3.308; previous revision: 3.307 done Checking in mailnews/imap/src/nsImapProtocol.cpp; /cvsroot/mozilla/mailnews/imap/src/nsImapProtocol.cpp,v <-- nsImapProtocol.cpp new revision: 1.672; previous revision: 1.671 done ->FIXED