Thunderbird expunges messages if I delete too fast

User Help for Mozilla Thunderbird
Post Reply
ManChicken
Posts: 7
Joined: November 7th, 2006, 8:45 pm

Thunderbird expunges messages if I delete too fast

Post by ManChicken »

I'm currently on 38.3.0 but this has actually been happening for a long time.
Using IMAP servers with 'Just mark it as deleted' for the delete options, and expunge on exit turned OFF.

If I am in a mailbox deleting messages, everything goes fine if I delete slowly. However, if am looking ahead and see the next bunch of messages I don't care about and I hit the delete key like 10+ times in a row rapidly, Thunderbird will for some reason send an expunge command to the server in the middle doing so! I'll see the little green progress bar pop up at the bottom like it's reconnecting to the server, and then the message total will click down, and then the UI catches up and shows the last few messages striking through.. but all the prior ones are now gone.

I turned on IMAP debugging on my server (running Dovecot) and indeed it seems to issue the command right after logging in, for no reason I can discern:

Code: Select all

2 ID ("name" "Thunderbird" "version" "38.3.0")
3 select "INBOX.Sent"
4 UID fetch 1:* (FLAGS)
5 expunge
6 UID fetch 818 (UID RFC822.SIZE BODY.PEEK[])
7 IDLE
Looking in the advanced editor, here's all the options with 'expunge' in them:

Code: Select all

mail.imap.check_deleted_before_expunge;false
mail.imap.expunge_after_delete;false
mail.imap.expunge_option;0
mail.imap.expunge_threshold_number;20
My understanding is expunge_option=0 means "never" for auto-expunge. I don't know if it's this particular mechanism doing it, but if so, there seems to be a bug? Or is there some other explanation for why this is happening?

I can capture a video of it happening if needed.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird expunges messages if I delete too fast

Post by tanstaafl »

Moved from Thunderbird Bugs to Thunderbird Support. The Bugs forum is meant to discuss triaged bugs (bug reports submitted to https://bugzilla.mozilla.org/ that have been confirmed), while the Support forum is meant to get help.

Can you duplicate this problem with somebody else's server, such as Gmail, Yahoo, Outlook etc?

Its easier to get help if you post excerpts from a log file created by Thunderbird. See http://kb.mozillazine.org/Session_logging_for_mail/news . Please enable timestamps if you do that. The excerpt you posted has a expunge command sent after selecting the sent folder. Does this problem occur if you never change the folder from the inbox?

I'm using mail.imap.expunge_option set to 2 and mail.imap.expunge_threshold_number set to 20. It works as expected. I don't see unexpected expunge commands. Try setting them to 2 and 9000 respectively. That should be equivalent to disabling expunging, and might workaround a bug.

http://kb.mozillazine.org/Deleting_mess ... P_accounts
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird expunges messages if I delete too fast

Post by tanstaafl »

The last email provider I had that used Dovecot was a ISP that eventually switched to Google Apps. Do you know of a free public email provider that uses the Dovecot IMAP server? http://www.ii.com/internet/messaging/imap/isps/ used to be useful to find information like that, but its been obsolete for about a decade.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird expunges messages if I delete too fast

Post by tanstaafl »

Did you solve your problem?
ManChicken
Posts: 7
Joined: November 7th, 2006, 8:45 pm

Re: Thunderbird expunges messages if I delete too fast

Post by ManChicken »

No, sorry just got a bit busy to mess with it last week.

I did turn on Thunderbird logging; gets out of control in a hurry. But here's a chunk of me deleting a bunch of things in rapid succession and Thunderbird seeming to send an 'expunge' right in the middle:

http://pastebin.com/j81JC3nh

but the log is a bit hard to follow, I might try doing a tcpdump and looking at it with Wireshark to see exactly what's going on.

I tried setting the expunge_option to 2 and the threshold to 9000, but it still did it - and the mailbox only has less than 4000 messages in it now, so I was nowhere near the limit for it to trigger.

I don't know of any public Dovecot-run mail sites, sorry. For fun maybe I'll set up Courier in a VM somewhere and see if it does the same thing.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird expunges messages if I delete too fast

Post by tanstaafl »

The problem with that excerpt is that I don't have any context other than it selecting the sent folder and fetching information about a number of messages in it. i.e. I don't have any idea what happened before that, so its tough to figure out what might trigger the problem.

Can you duplicate the problem using a different, nearly empty folder? In that case I might get a good idea of whats going on from a excerpt that starts with the first select command for that folder. I'd also need to know how many deleted messages there were in that folder, and overall, when this happens.
Post Reply