Copy between IMAP skips messages



9 years ago
9 years ago


(Reporter: thunderbird, Unassigned)


Firefox Tracking Flags

(Not tracked)




9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9 GTB7.0
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9 GTB7.0

When copying a folder containing subfolders from one IMAP account to another IMAP account, Thunderbird will always skip messages contained in the subfolders.

Compact Folders doesn't help
Rebuild Index doesn't help
Removing and rebuilding all local indices doesn't help.
Expanding the entire source folder tree doesn't help.

When copying folders between IMAP accounts, the folder is copied, its subfolders are copied but not the messages in the subfolder. Sometimes only the folder which was copied is copied and no subfolders are copied. Whatever is tried, messages found in subfolders sometimes are and sometimes aren't copied but never ever are all messagse copied to the destination IMAP server.

There doesn't seem to be any logic involved with the copying, i.e. it's a completely non-deterministic, stochastic process.

Reproducible: Always

Steps to Reproduce:
1. Compact Folders
2. Rebuild Index
3. Start copying
4. Subscribe to all source folders
Actual Results:  
Some subfolders are copied, others are not. Most messages in subfolders are not copied.

Expected Results:  
All the (sub)folders and corresponding messages should be copied or some kind of error or failure message should be generated.

Considering the code, one hits a folder, checks whether it contains subfolders and/or messages, copies the messages and if there were subfolders, recurse the copy-process into the subfolder or add the subfolder to a list of to-be-copied folders (if recursion isn't an option).

How can Thunderbird consistently fail to perform this trivial process or; Why doesn't Thunderbird report on what it's doing or at least report on why it stops copying with no apparent feedback.

Comment 1

9 years ago
Bug 346687 seems to describe the reason behind the failure to copy certain messages.

When messages headers haven't been downloaded, the copy fails to carry the corresponding messages over to the destination server.

There should be some kind of option or even an add-on to actually visit or open each sub-folder.
What version of thunderbird are you using ?
Component: Folder and Message Lists → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: folders-message-lists → networking.imap

Comment 3

9 years ago
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

Source IMAP server: Cyrus IMAP4 v2.3.8-Fedora-RPM-2.3.8-3.fc7
Destination IMAP server: Cyrus IMAP v2.3.16-Fedora-RPM-2.3.16-2.fc12
Tor(bug opener), can you provide IMAP log data with timestamp to developers?
> set NSPR_LOG_MODULES=timestamp,imap:5
> export NSPR_LOG_MODULES=timestamp,imap:5
> setenv NSPR_LOG_MODULES timestamp,imap:5
(By other bug reports for similar phenomenon, timeout while append, upload of mail data, is suspected) 
As IMAP log contains mail data, please replase sensitive data before open log data to public via "Add an attachment" link of this bug. As mail data itself is irrevant to problem in this case, remove log lines for irrelevant mail data by yourself, please. As log data is usually very large, never paste long log data to bug, please.

Comment 5

9 years ago
We don't need a log - this is a known problem; Tor is correct; we don't update the folder before doing the copy, so we don't know about the new messages. This is a dup of bug 346687
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 346687

Comment 6

9 years ago
(In reply to comment #1)
> There should be some kind of option or even an add-on to actually visit or 
> open each sub-folder.

Copying folders in their entirety should be normal behaviour.  Nobody should have to find an option or install an add-on to trigger it.

Comment 7

9 years ago
The required functionality seems to be present, it's just not ordered or aggregated in the desired fashion.

"Compact Folders" traverses all subfolders but doesn't necessarily download headers.

"Rebuild Index" downloads all headers but not for subfolders.

If one could opt for "Rebuild Indices" when "Compact[ing] Folders" then we'd have a workaround. Or "Traverse Subfolders" when "Rebuild[ing] Index".

Granted, copying folders should just copy all messages and folders.
You need to log in before you can comment on or make changes to this bug.