IMAP Trash emails deleted despite Retention Policy of Never Delete
Categories
(Thunderbird :: Untriaged, defect)
Tracking
(Not tracked)
People
(Reporter: tms2, Unassigned)
References
Details
Comment 1•11 years ago
|
||
Comment 3•9 years ago
|
||
Comment 5•7 years ago
|
||
Comment 7•6 years ago
|
||
(In reply to scrognoid from comment #6)
Yes, but...
I have three accounts. My most active account has Trash emails no more than a week old.
Is this account with a different mail provider than the other two accounts?
My two less active accounts have stuff going back a few months. I am currently at v52.6.0.
How is version 60?
Same. My oldest email in Trash is just a couple of weeks old. I still have Retention Policy set to Do Not Delete Any Messages.
Comment 9•6 years ago
•
|
||
Thanks for hanging in there.
As far as I can tell, the purge service pretty much hasn't changed since the feature was introduced in Bug 11055 - Message aging (empty trash/auto-delete messages after N days)
The purge service runs every 8 hours. If the purge service is deleting these messages there is a logging facility which will find the activity. Please create a log file with logmodule settting MsgPurge:5 as documented in https://wiki.mozilla.org/MailNews:Logging If messages have been deleted please check the logfile to see if you find the service has deleted messages that should not have been deleted. THen Zip and email me the logfile.
Some relevant code locations
https://hg.mozilla.org/comm-central/log/tip/mailnews/base/util/nsMsgDBFolder.cpp
https://hg.mozilla.org/comm-central/log/tip/mailnews/base/src/nsMsgPurgeService.cpp
https://hg.mozilla.org/comm-central/log/tip/mailnews/base/src/nsMsgPurgeService.h
Reporter | ||
Comment 10•6 years ago
|
||
I'll need some more help to do that. I'm not a developer; just a user. Can you give me the commands and tell me how the are invoked relative to launching TB. The link says the log files are overwritten each time I launch TB. Since we are talking about a phenomenon that manifests over a period of days or weeks I'm worried about doing it write. Would I need to rename the log files each time before I launch TB?
Comment 11•6 years ago
•
|
||
Scrognoid,
If you're on Linux you can add these lines to the bottom of your .profile file found in your home directory.
export MOZ_LOG=MsgPurge:5,timestamp
export MOZ_LOG_FILE=/tmp/purge.log
If your are worried about the file being deleted on reboot, you might consider changing the log file location 'MOZ_LOG_FILE' to something like /home/<yourname>/purge.log.
Reporter | ||
Comment 12•6 years ago
|
||
Did this for about a day's worth of normal activity. Let me know if you need more. purge.log is here:
Comment 13•6 years ago
|
||
Does you mail provider delete messages from the trash?
Gene, does this sound familiar?
Comment 14•6 years ago
|
||
Sounds like Bug 1547043 that I am currently working. The reporter is away for a week and will check when he gets back using webmail if his ISP is removing the Trash emails. If not, tb must be doing it. He also has the auto purge settings turned off. He thinks it might be related to use of maildir offline storage.
Yes, my charter ISP server (Openwave) removes Trash after a week or two based on the Date header I think. Older emails put in Trash are deleted the next night I have noticed.
I think the reporter for this bug is saying that the right-click properties | retention setting for Trash is "use my account settings" and account setting is never delete?
Reporter | ||
Comment 15•6 years ago
|
||
I asked my ISP in 2014 and they claim they do not delete or archive Trash.
Yes, I set right-click properties on Trash to Never Delete but stuff gets deleted anyway.
Comment 16•6 years ago
|
||
Reporter scrognoid: Just to be certain are you saying that the Account setting / Sync and Storage / "Don't delete any messages" AND "Keep starred messages" are set for each problem account? And for the Trash folder properties it is set to "User my account settings"? These are the default settings Do you have any folder set to non-default retention settings? (I am also asking this of reporter Zurd of the other Bug 1547043 who I have CC'd.)
Also, scrognoid, you mentioned in comment 2 above that using an alternate trash folder still caused deleted emails to vanish. But later you say you use a filter to move emails to Trash2 folder and that works OK? How did you set up the "alternate" trash folder?
Also, scrognoid, can I assume you are using the default imap mail storage and are not using maildir format?
Reporter | ||
Comment 17•6 years ago
|
||
are you saying that the Account setting / Sync and Storage / "Don't delete any messages" AND "Keep starred messages" are set for each problem account?
Yes
And for the Trash folder properties it is set to "User my account settings"?
Yes.
Do you have any folder set to non-default retention settings?
Yes. Other folders have other settings, like Delete Older Than 180 Days, which are respected.
Also, scrognoid, you mentioned in comment 2 above that using an alternate trash folder still caused deleted emails to vanish. How did you set up the "alternate" trash folder?
- Create New Subfolder: TrashX
- Account Settings>Server Settings>When I Delete Move To: TrashX
As commented, deleted emails did not go to TrashX or anywhere else that I could find.
But later you say you use a filter to move emails to Trash2 folder and that works OK?
Yes, message filters work.
Also, scrognoid, can I assume you are using the default imap mail storage and are not using maildir format?
I don't know. How do I tell?
Comment 18•6 years ago
|
||
(In reply to scrognoid from comment #17)
Also, scrognoid, you mentioned in comment 2 above that using an alternate trash folder still caused deleted emails to vanish. How did you set up the "alternate" trash folder?
- Create New Subfolder: TrashX
- Account Settings>Server Settings>When I Delete Move To: TrashX
As commented, deleted emails did not go to TrashX or anywhere else that I could find.
Just tried doing this and it worked for me. Deleted email goes into TrashX instead of Trash. (TrashX now has the trash icon.)
Also, scrognoid, can I assume you are using the default imap mail storage and are not using maildir format?
I don't know. How do I tell?
Look in server setting for the account. Near the bottom you will see "Message store type" with selection "File per folder (mbox)" gray. You can only enable maildir for new accounts using the advanced preferences. Anyhow, if you don't know what it is I'm 99% sure you aren't using maildir.
Reporter | ||
Comment 19•6 years ago
|
||
Yes, confirmed:
"File per folder (mbox)" gray
Comment 20•6 years ago
|
||
Crazy thought, but the trash folder you reference, and the new trash folder you are trying to create. Are those both folders that would be synchronized with your email service provider? If so, could you point the deleted messages to store in your local folders outside of the email account?
I have four IMAP accounts setup in Thunderbird two of which I maintain myself. None of which exhibit the issue. Given that you have tested and seen the issue on both Linux and Windows, on various versions of TB, and have had the issue for years now. It seems that the only common denominator is your ISP.
Other than that you don't have your email account connected to multiple computers do you? If so maybe one of those machines has a 3rd party application that would clean out your trash bin?
Comment 21•6 years ago
|
||
(In reply to gene smith from comment #14)
Sounds like Bug 1547043 that I am currently working. The reporter is away for a week and will check when he gets back using webmail if his ISP is removing the Trash emails.
The ISP of bug 1547043 fessed up and admitted that they indeed delete emails from Trash after denying it to the reporter several times, so that wasn't a TB problem. Maybe in the reporter's case the fact that the trash folder TrashX contains the sub-string "trash" so the ISP assumed it was trash and also deleted it. I have found that the support for large ISPs (e.g., charter/spectum) really have no idea how their 3rd party imap server works.
(In reply to Benjamin Flanagin from comment #20)
Other than that you don't have your email account connected to multiple computers do you? If so maybe one of those machines has a 3rd party application that would clean out your trash bin?
That's a possibility too.
Reporter, if not resolved, running an overnight IMAP:5 log may also show if emails are deleted better than the purge log of comment 11. Please run tb during a period when you notice emails in Trash or TrashX deleted. Edit out any personal info and attach using the "Attach file" link above or provide a dropbox link.
export MOZ_LOG=IMAP:5,timestamp
export MOZ_LOG_FILE=~/imap.log
thunderbird
Comment 22•6 years ago
|
||
Check bug 1547043.
Comment 23•6 years ago
|
||
It's hard to read thunderbird's log. For a very good and easy test, create a new email account, use it with webmail only, send a few emails to it, put them in the trash and wait. If they get deleted then it's the ISP deleting emails and not thunderbird.
Comment 24•6 years ago
|
||
(In reply to Zurd from comment #23)
It's hard to read thunderbird's log. For a very good and easy test, create a new email account, use it with webmail only, send a few emails to it, put them in the trash and wait. If they get deleted then it's the ISP deleting emails and not thunderbird.
Zurd, I was pretty sure looking at your log that tb wasn't marking anything in Trash as \deleted or expunging the folder. However, you're right, what you described would be a simpler and definitive test to try first. Thanks.
Reporter | ||
Comment 25•6 years ago
|
||
I have created a test email account and sent several emails to it. I accessed it only with webmail and deleted the messages, setting Preferences to delete by moving to trash and never purge. We'll wait and see what happens. Feel free to post a reminder in a month if you haven't heard from me. I'll probably forget about it.
Reporter | ||
Comment 26•6 years ago
|
||
Nothing deleted from Trash yet.
I have 4 emails accounts with same ISP in TB. The are all set to Use My Account Settings>Never Delete. The oldest emails in Trash vary in age a bit:
1 - 12/22/18 (second most active account)
2 - 7/6/19 (most active account)
3 - 5/21/19 (seldom used)
4 - 7/17/19 (seldom used)
Reporter | ||
Comment 27•6 years ago
|
||
No change.
Reporter | ||
Comment 28•6 years ago
|
||
No change 8/10/19
Comment 29•6 years ago
|
||
(In reply to scrognoid from comment #28)
No change 8/10/19
scrog,
Does this mean tb is behaving OK. (Sorry, don't remember exactly what you are testing.)
-gene
Reporter | ||
Comment 30•6 years ago
|
||
Zurd: "For a very good and easy test, create a new email account, use it with webmail only, send a few emails to it, put them in the trash and wait. If they get deleted then it's the ISP deleting emails and not thunderbird."
gene smith: " Does this mean tb is behaving OK. (Sorry, don't remember exactly what you are testing.)"
No. If anything, it points the finger at tb. I have done as Zurd suggested. We are in the "wait" part. Nothing has been deleted from Trash. When we are done waiting, I could try accessing that test account with tb and see if emails get deleted from Trash. So far I am only accessing the test account with web mail.
Reporter | ||
Comment 31•6 years ago
|
||
Trash is empty. The problem must be with my ISP, not TB.
To recap:
Zurd suggested I run a test to verify that TB is deleting emails from Trash is violation of my Retention Policy.
I created an IMAP email account and only ever accessed it with web mail. I sent several emails to it and deleted them. Upon delete they were transferred to the Trash folder. I checked them once a week and the deleted emails were in Trash, until today. Emails were deleted from Trash even though TB never touched that account.
So this bug can be closed as far as I am concerned.
Comment 32•6 years ago
|
||
Thank you for the test scorgnoid,
Closing ticket as "Invalid" sense the problem wasn't in TB.
Reporter | ||
Comment 34•3 years ago
|
||
So....
I just noticed that there is an Advanced setting on my iphone that is set to remove Trash messages after two weeks. I never noticed it and I never set it so that must be the default. I use my iphone for email only occasionally and delete messages even less often.
I don't know if this caused my decade long issue, but it seems plausible. I don't know what happens when different devices are imposing conflicting settings on an IMAP server. But I do know that my messages in Trash got deleted after ABOUT two weeks, but there were odd variations. I could believe this was related to how often I actually checked email on my phone.
Does anyone know: What happens when I access an IMAP account with two devices and they have different settings for something like Deleted Messages After N Days?
Comment 35•3 years ago
|
||
Does anyone know: What happens when I access an IMAP account with two devices and they have different settings for something like Deleted Messages After N Days?
I would say if, for example, device A says delete trash after 14 days and device B says delete trash after 7 days, then depending on how the devices determine there own "time zero", you will see your trash gone after at most 7 days.
The devices don't tell the imap server to schedule deleting of trash every 7 (or 14 days) but the device itself tells the server to delete trash with a command it sends to the server which is sent by the device every, per my example, 7 (or 14) days.
Description
•