IMAP folders deleted after profile copy and browsing with Work Offline mode(unable to see auto-synch'ed offline-store content after profile copy to offline PC)

NEW
Unassigned

Status

7 years ago
3 years ago

People

(Reporter: b0o.supermario, Unassigned)

Tracking

(Depends on: 2 bugs, Blocks: 1 bug, {reproducible})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2

Steps to reproduce:

After copying the Thunderbird folder to another machine, When Thunderbird was opened and the server connection fails (i.e. trying to browse offline / no internet access), folders and mails were lost in IMAP folders (when opening Thunderbird for second time). POP accounts seem to be fine. Tried multiple times. IIRC, this didn't reduce the size of MBOX files.


Actual results:

All folders except INBOX were deleted and messages in folder INBOX too was deleted after trying to browse a certain profile on a computer with new Thunderbird installation on IMAP accounts (i.e. ALL MAILS were lost). IIRC, this didn't reduce the size of MBOX files.


Expected results:

Thunderbird shouldn't have deleted the mails after copying the profile folder. Thunderbird should have supported temporary offline browsing.
(Reporter)

Comment 1

7 years ago
Restarting Thunderbird causes this

Comment 2

7 years ago
(In reply to b0o.supermario from comment #1)
> Restarting Thunderbird causes this

All I can suggest you do is read: http://kb.mozillazine.org/Moving_your_profile_folder
Did you copy all data correctly?

> When Thunderbird was opened and the server connection fails
> (i.e. trying to browse offline / no internet access), (snip)

If "Work Online" mode, connection with IMAP server is mandatory because IMAP.
To use IMAP mail data locally, "Work Offline" mode is mandatory.
If "Work Offline" mode, server connection failure won't occur, because Tb never requests server connection if "Work Offline" mode.

Did you correctly access local IMAP mail(mail data cached in offline-store file) in "Work Offline" mode since initial, if no internet access is available at the new PC?

> Actual results:
> All folders except INBOX were deleted and messages in folder INBOX too was deleted
> after trying to browse a certain profile on a computer with new Thunderbird installation on IMAP accounts

Because IMAP, Tb retains mail data of mbox which is actually exists on IMAP server only. So, any data for non-existent mbox is deleted. 
Startup process of IMAP tries to know existent mbox at server. If it fails, Tb may consider as "no known mbox on server".
In this case, mbox named Inbox always remains, because Inbox is defined as mandatory mbox by protocol named IMAP.

Did you correctly set up Tb at new PC to which data is copied?
As new PC is in different environment, same setup of Tb as previous PC is inappropriate in your case. e.g. automatic new mail check should be disabled before first use of copied profile.

> IIRC, this didn't reduce the size of MBOX files.

size of Tb's MBOX files is reduced by "Compact" only.
Did you do Compact operation correctly?

> Thunderbird should have supported temporary offline browsing.

IIRC, "per account work offline mode" for both IMAP(like your case) and POP3(no try of server access, even when Get Msgs is requested).
If IMAP, "per folder work offline mode" may be needed. But I don't know bug for such request, although I saw request like "offline data held by Tb should be kept in case of accidental mobox deletion at server" in a bug.
(Reporter)

Comment 4

7 years ago
(In reply to WADA from comment #3)
> Did you copy all data correctly?
> 
> > When Thunderbird was opened and the server connection fails
> > (i.e. trying to browse offline / no internet access), (snip)
> 
> If "Work Online" mode, connection with IMAP server is mandatory because IMAP.
> To use IMAP mail data locally, "Work Offline" mode is mandatory.
> If "Work Offline" mode, server connection failure won't occur, because Tb
> never requests server connection if "Work Offline" mode.
> 
IIRC this happens when work offline mode is enabled.

> Did you correctly access local IMAP mail(mail data cached in offline-store
> file) in "Work Offline" mode since initial, if no internet access is
> available at the new PC?
No IIRC

> 
> > Actual results:
> > All folders except INBOX were deleted and messages in folder INBOX too was deleted
> > after trying to browse a certain profile on a computer with new Thunderbird installation on IMAP accounts
> 
> Because IMAP, Tb retains mail data of mbox which is actually exists on IMAP
> server only. So, any data for non-existent mbox is deleted. 
> Startup process of IMAP tries to know existent mbox at server. If it fails,
> Tb may consider as "no known mbox on server".
> In this case, mbox named Inbox always remains, because Inbox is defined as
> mandatory mbox by protocol named IMAP.
Why? Messages should be "Marked as deleted" instead.

> 
> Did you correctly set up Tb at new PC to which data is copied?
> As new PC is in different environment, same setup of Tb as previous PC is
> inappropriate in your case. e.g. automatic new mail check should be disabled
> before first use of copied profile.
Ok, anyway this seems to be a bug.

> 
> > IIRC, this didn't reduce the size of MBOX files.
> 
> size of Tb's MBOX files is reduced by "Compact" only.
> Did you do Compact operation correctly?
> 
> > Thunderbird should have supported temporary offline browsing.
> 
> IIRC, "per account work offline mode" for both IMAP(like your case) and
> POP3(no try of server access, even when Get Msgs is requested).
> If IMAP, "per folder work offline mode" may be needed. But I don't know bug
> for such request, although I saw request like "offline data held by Tb
> should be kept in case of accidental mobox deletion at server" in a bug.
Hmm... Where's it?
Sorry for wrong statement.
IIRC, "per account work offline mode" for IMAP(like your case) and option like it for POP3(no try of server access, even when Get Msgs is requested) are already requested. i.e. There is no such features yet.

So, you need to use current "Work Offline" mode correctly since initial after copy of data to other PC or other location in same PC, if you need to access locally held IMAP data without IMAP server access.
And, you need to keep backup before copy data to other location, because Work Offline mode is probably not kept when Tb is restarted even if Tb is terminate while Work Offline mode.

You need to do at least next before keep backup, in order to avoid automatic accees to IMAP server upon first use of copied profile at new PC.
  - Disable automatic new mail check
  - Disable automatic message purge(retention policy etc.)
  - Click IMAP account or POP3 or Local Folders or local mail folder.
    (No IMAP folder is selected status when Tb is terminated)
And, upon termination, never keep IMAP folder "opened status"  
And, upon restart of Tb, go Work Offline manually just after restart.

Because of above requirement, if size of "offline-store file of IMAP folder after Compact" is less than 4GB(win)/2GB(Linux/Mac), accessing the offline-store file as "local mail folder" may be better way.
- Copy(or move) offline-store file under ...\ABC.sbd directory of a POP3 account
  (any of real POP3 account or dummy POP3 account) or Local Folders.
  You can see the offline-store file as subfolder of ABC folder.
If larger than file size limit, splitting of mail data is needed before backup.

> Why? Messages should be "Marked as deleted" instead.

Why? For Tb, Mbox doesn't exists on server any more. Why file(s) for non-existent Mbox for Tb should be kept?
"Forcing repeated unexpected server connection errors" was done by you.

Problem like next may happen.
(1) Due to forced repeated unexpected server connection errors, Tb may invoke unsubscribe internally, because Tb fails to obtain subscription list correctly due to connection error and Tb may consider "not subscribed".

"Unexpected/unwanted deletion of files" may be a result of bug 520437.
(2) Before back up, file with suffix is used by internal or manual unsubscribe/subscribe due to bug 520437. For example, file-1 for folder=file(by unsubscribe/subscribe, 520437), garbage of file may remain. In this situation, Tb may try to access file for folder=file because initial/default/normal file name for folder=file is file, if relation between folder=file and file-1 is somehow lost(It may be caused by forced repeated unexpected server connection errors.)

(3) If problem like (1) or (2) happens, subscribed status is lost or relation with needed file is lost. If such unexpected status happens, file for unknown Mbox is removed, because Mbox doesn't exist at server for Tb.

Even though these can be called Tb's bug, I believe there is no need to reproduce such bugs all the way and for fun :-)
(Reporter)

Comment 6

7 years ago
(In reply to WADA from comment #5)
> Sorry for wrong statement.
> IIRC, "per account work offline mode" for IMAP(like your case) and option
> like it for POP3(no try of server access, even when Get Msgs is requested)
> are already requested. i.e. There is no such features yet.
> 
> So, you need to use current "Work Offline" mode correctly since initial
> after copy of data to other PC or other location in same PC, if you need to
> access locally held IMAP data without IMAP server access.
> And, you need to keep backup before copy data to other location, because
> Work Offline mode is probably not kept when Tb is restarted even if Tb is
> terminate while Work Offline mode.
> 
> You need to do at least next before keep backup, in order to avoid automatic
> accees to IMAP server upon first use of copied profile at new PC.
>   - Disable automatic new mail check
>   - Disable automatic message purge(retention policy etc.)
>   - Click IMAP account or POP3 or Local Folders or local mail folder.
>     (No IMAP folder is selected status when Tb is terminated)
> And, upon termination, never keep IMAP folder "opened status"  
> And, upon restart of Tb, go Work Offline manually just after restart.
It's not a feature, is it? Do other clients annoy on the same way?
Thunderbird -profilemanager can set work offline mode, can't it?
> 
> Because of above requirement, if size of "offline-store file of IMAP folder
> after Compact" is less than 4GB(win)/2GB(Linux/Mac), accessing the
> offline-store file as "local mail folder" may be better way.
> - Copy(or move) offline-store file under ...\ABC.sbd directory of a POP3
> account
>   (any of real POP3 account or dummy POP3 account) or Local Folders.
>   You can see the offline-store file as subfolder of ABC folder.
> If larger than file size limit, splitting of mail data is needed before
> backup.
> 
> > Why? Messages should be "Marked as deleted" instead.
> 
> Why? For Tb, Mbox doesn't exists on server any more. Why file(s) for
> non-existent Mbox for Tb should be kept?
> "Forcing repeated unexpected server connection errors" was done by you.
> 
> Problem like next may happen.
> (1) Due to forced repeated unexpected server connection errors, Tb may
> invoke unsubscribe internally, because Tb fails to obtain subscription list
> correctly due to connection error and Tb may consider "not subscribed".
> 
> "Unexpected/unwanted deletion of files" may be a result of bug 520437.
> (2) Before back up, file with suffix is used by internal or manual
> unsubscribe/subscribe due to bug 520437. For example, file-1 for
> folder=file(by unsubscribe/subscribe, 520437), garbage of file may remain.
> In this situation, Tb may try to access file for folder=file because
> initial/default/normal file name for folder=file is file, if relation
> between folder=file and file-1 is somehow lost(It may be caused by forced
> repeated unexpected server connection errors.)
> 
> (3) If problem like (1) or (2) happens, subscribed status is lost or
> relation with needed file is lost. If such unexpected status happens, file
> for unknown Mbox is removed, because Mbox doesn't exist at server for Tb.
> 
> Even though these can be called Tb's bug, I believe there is no need to
> reproduce such bugs all the way and for fun :-)
This is a BUG... Isn't this? Is this funny?
This is a bugzilla, isn't this? Do you think that this bug is a feature and are you trying to make this bug "positive" on others' views?
Do you consider buggy things "standards"?
(In reply to b0o.supermario from comment #6)
> Thunderbird -profilemanager can set work offline mode, can't it?

Oh, you are right. Profile Manager panel had check box for "Work offline". You can start Tb with offline mode any time.

> This is a BUG... Isn't this?

I never say they are not bug.
Phenomenon of bug 520437 is reported in some bug reports even though bug reporters didn't execute unsubscribe/subscribe. The phenomenon of bug 520437 indicates that unsubscribe/re-subscribe was executed internally. We can't imagine other cause of such internal unsubscribe/re-subscribe than connection errors, and such unexpected internal unsubscribe/unsubscribe may cause "delete of files for IMAP mbox". When phenomenon of bug 520437 is seen, at least "re-download of all mail data" occurs, because different file is used as offline-store file, and after restart of Tb, previously used file is deleted.
Even when phenomenon of bug 520437 is not seen, internal unsubscribe may occur upon connection errors. In this case, file for IMAP mbox may be deleted after restart before re-establishment of connections, because subscribed status is internally lost.
I merely said that you don't need to reproduce known or unknown bugs many times and to see phenomenon of "locally held data is deleted" many times when you want to access your IMAP local data at the new PC.

If you can reproduce problem(s) consistently, get data for problem analysis, such as IMAP log, trace of file access(Process Monitor log etc.), and attach log data to this bug, please, because here is B.M.O as you say.
(Reporter)

Comment 8

7 years ago
IIRC the "work offline" mode didn't work well either in preserving mbox contents...

Comment 9

7 years ago
(In reply to b0o.supermario from comment #8)
> IIRC the "work offline" mode didn't work well either in preserving mbox
> contents...

In what way to do you think "work offline" should preserve mbox in imap case?
(Reporter)

Comment 10

7 years ago
In what way do you think deleting mbox files, unable to check whether there's no internet connection, etc features?? Looks like no one is interested in correcting the bug but you are interested in convincing a bug a feature... Is there any better place for reporting bugs?
(Reporter)

Comment 11

7 years ago
How does Thunderbird detect whether the IMAP account didn't exist in the new computer before if copying the profile done without mistakes? Registry entries? or a file that records information in the program files directory? What files except those in prog. files folder and appdata Thunderbird folder does Thunderbird make changes?
(In reply to b0o.supermario from comment #8)
> IIRC the "work offline" mode didn't work well (snip)

Are you talking about problem of Bug 434523?
Or File/Offline/Work Offline never worked or didn't work well as you expect?

Workaround of Bug 434523 in Firefox is written by Bug 434523 comment #1. 
> start Firefox\firefox.exe -offline -profile ...
And following is seen in a document.
> https://developer.mozilla.org/en/Command_Line_Options
> -offline
> Start with the offline mode. Thunderbird and SeaMonkey only.

Can "thunderbird.exe -offline ..." be a work around of Bug 434523 in Thunderbird?
(Reporter)

Comment 13

7 years ago
It seems like it's not like that. This is a bug related to deletion of all folders and mail messages.
It sounded that your problem occurred even if you used "Work Offline mode". So, I tested some cases.  

[Test-A]
I couldn't see any problem with Tb 8, with unreachable IMAP server, with Work Online mode, with emulation of your "PC of no internet access" by next steps.
Note: "Profile copy" is not emulated nor executed in this test.
      Currently used profile is continuously used.

(1) Define an IMAP account (owned by Yahoo!. ordinal IMAP, never Gmaik IMAP)
    Set offline-use=on of all folder of the added IMAP account.
    Wait for auto-sync ("account is up to date" in Activity manager panel).
(2) Go Work Offline. (Don't request download at dialog)
(3) Change server name to non-existent one at Server Settings.
      from imap.mail.yahoo.com, to imap.mail.yahoo.com.ZZZ
    Change account name(label) to ...ZZZ, because this is used in error message.
(4) Go back Work Online
(5) Try to access folders of the IMAP account.
    Upon each folder click(folder open), following error message is shown
    as pop up message, and is shown a\in Activity manager panel.
       Failed to connect to server xxx@rocketmail.com.ZZZ
(6) Message content can be viewed, and message source can be viewed,
    because all mail data is downloaded by auto-sync.
(7) No subscription list is shown by Subscribe.
    This is due to no existent cached connection, and is known phenomenon.
(8) Mail can be accessed after restart of Tb in Work Online mode,
    even though"connection error" message is shown upon each folder click.
(9) I couldn't see any problem or funny phenomena other then next;
    (a) connecton error message is shown upon each folder click,
        when server name is changed to non-existent one.
    (b) Suffix in file name for Tb's special folders of the new IMAP account
        is seen after account creation and ordinal server accesses.
          Archives.msf/Archives.msf, Drafts.msf/Drafts-1.msf,
          Junk.msf/Junk-1.msf, Sent.msf/Sent-1.msf
        It may occur on Templates and Trash, if they are created by Tb
        upon save as template and upon setting delete model of "Move to Trash".
        This may be a result of known issue.     
    (c) Suffix in file name for many IMAP folders of existent Gmail IMAP account
        is seen. I did unsubscribe/subscribe sometimes, and I did connection
        error test many times with this Gmail account, so it is not surprizing.
Above was same in next tests.
- user id change to wrong one at Server Settings while Work Offline mode,
  and go to Work Online mode. Password is prompted, and login always fails. 
- server name change to non-existent one and/or user id change to wrong one
  at Server Settings while Work Online mode, and continue running Tb in Work
  Online mode.

A suspected phenomenon which may cause unexpected unsubscribe in other bug is one like next;
 1. Connection loss occurs while receiving LSUB comand response.
 2. Folder names which was not received before connection loss is considered
    "not subscribed", then such folder is removed automatically.
    If this case, folders are used again afer next normal server connection,
    then suffix of file name happens.
However, such case can't happen if "no internet access" environment, because such case can happen after normal login only.

What is your definition of "new PC of no internet access"?
"PC of no LAN cable connected" or "PC of no netwark card/modem" like one?
(if so, copy of Tb's profile is hard. Big memory card is used?)

[Test-B]
Another concern: panace.dat (used for caching of folder related data)
If panacea.dat is manually deleted, phenomenon of "all folders except Inbox" is observed.
(1) Normal IMAP server access, and auto-sync'ed status.
(2) Change server name to non-existent one while Work Online mode.
(3) Continue Work Online mode, access folders, then connection error occurs.
(4) Terminate Tb.
(5) Delete panacea.dat.
(6) Restart Tb.
    => Any .msf files including file with suffix such as abc-1.msf, abc-2.msf
       was shown at folder pane.
(7) Terminate Tb.
(8) Restart Tb.
    => Any folder except Inbox disappeared from folder pane.  

[Test-C]
With copied profile.
(1) With Prof1: Normal IMAP server access, and auto-sync'ed status.
    Terminate Tb.
(2) Copy profile directory fully to Prof2 (under same Profiles directory).
    Add entry in profiles.ini. Prof2, Is_relative=1
(3) Edit prefs.js of Prof2, to force server connection failure, if connection is
    requested by Tb.
    mail.server.serverN.realhostname : imap.mail.yahoo.com
                                    => imap.mail.yahoo.com.ZZZ
    No other change.
(4) Start Tb with Prof2, in offline mode (first start of Tb after profile copy)
    thunderbird.exe -offline -p: "Prof2"
    Tb started in offline mode as expected. No connection request to server.
    (Work Offline of File/Offline is checked status) 
    Any .msf including file with suffix such as abc-1.msf, abc-2.msf was shown
    at folder pane.
    This is seen on existent Gmail IMAP account too.
(5) Terminate Tb, retart Tb with Prof2, in offline mode
    thunderbird.exe -offline -p: "Prof2"
    Tb started in offline mode as expected. No connection request to server.
    (Work Offline of File/Offline is checked status) 
    Folder other than Inbox disappered from folder pane.
    This is seen on existent Gmail IMAP account too.
(6) At this step, any root level offline-store file was deleted(Inbox, if folder
    of Inbox, instead of Inbox.msf).
    Offline-store file under ...sbd was not deleted.
    (e.g. Archives.sbd/2011, Archives-1.sbd/2011, Archives-2.sbd/2011

It seems that some data in panacea.dat file can't be used after profile copy.
Line like next is seen in panacea.dat. (ueihzgrp.Test is for Prof1 I called. I copied ueihzgrp.Test to ueihzgrp.Test-2 for Prof2 I called)
>     =C:\\Documents and Settings\\wada\\Application Data\\Thunderbird\\Profiles\
> \\ueihzgrp.Test\\ImapMail\\imap.mail.yahoo.com\\Archives.msf)(448
"File path of mail folder file in panacea.dat" looks written in absolute format.

If your "new PC of no internet access" is "PC of no network card" like one, and if you fully copied profile directory, you probably looked phenomenon of above Test-C.
Available workarounds:
(1) Copy profile to absolutely same location at new PC.
      If different MS Win version, there is no problem to use same location.
      If same Win versin, same windows user is needed at new PC,
      if standard location of Tb's profile is used. 
    To make it easy, non standard location such as C:\Tb-ProfX\IMAP-Account-N
    can be used as local directory for an IMAP account.
    "Non-standard location as profile directory" may also be used.
(2) Copy IMAP offline-store files under folder of dummy POP3 account at new PC.
    If each offline-store file is less than 4GB(Win) or 2GB(Linux,Mac),
    offline-store file can be used as local mail folder file,
    because format of offline-store file is same(unix mbox format).
    This is simpler/easiear than (1).
Another workaeound.
(3) Change IMAP account's server type in copied profile from IMAP to POP3,
    before first use of copied profile.
      mail.server.serverN.type : imap => pop3
    This is simpler/easier than (2).
Note on workaround (2) and (3).
If folder such as archive folder, next can occur because of IMAP folder.
  Archives doesn't exists, Archives.msf exists, Archives.sbd exists.
  Archives.msf only(no file named Archives)==No need of auto-sync/Not auto-sync'ed
To show subfolders under Archives after server type change to POP3, file named "Archives" should be created manually.
"backup/restore" frequently implies "restore to same location". Changing it in bug summary to "copy" to avoid misleading.
Summary: IMAP folders deleted after backup restore (browsing offline) → IMAP folders deleted after profile copy and browsing with Work Offline mode(unable to see auto-sych'ed offline-store content after profile copy to offline PC)
Summary: IMAP folders deleted after profile copy and browsing with Work Offline mode(unable to see auto-sych'ed offline-store content after profile copy to offline PC) → IMAP folders deleted after profile copy and browsing with Work Offline mode(unable to see auto-synch'ed offline-store content after profile copy to offline PC)
(Reporter)

Comment 19

7 years ago
Thanks for your concern, WADA. Hope this bug is fixed soon. It does not seem like a subscribe/unsubscribe problem because If Remembered Correctly mails in inbox too disappeared.
(In reply to b0o.supermario from comment #19)
> Hope this bug is fixed soon.

I can't think fixed soon. I seems to have over expected on "Work Offline mode" for IMAP.
I think this bug can be called "current design/restriction of .msf/offline-store and panacea.dat", because all of them are merely local cache of IMAP folder data on IMAP server or local cache of locally used file names and meta data for it.
I don't think any consistency of any data in profile directry can be kept by profile copy. Main purpse of "profile copy" is to transfer definitions and local only data.
IMAP always relies on IMAP server.

This bug's case can be relieved by improvements in panacea.dat and Work Offline mode, e.g. relative path of .msf file and offline-store file instead of absolute path in panacea.dat. However, this is similar to Bug 344671 which was already closed as WONTFIX. If profile is copied, extention is re-installed inernally, then extensions.ini is re-initialized and re-written.
> Bug 344671 : extensions.ini should use relative paths

Possible improvements for this bug's case:
If Tb is explicitly restarted with Work Offline mode, and if panacea.dat is deleted or .msf file pointed by panacea.dat is not found, search local directory and re-construct IMAP folders from existent xxx.msf file, and use associated/existent offline-store file named xxx, and use/search associated/existent xxx.sbd directry.
But I prefer impovement like next for manual server type change from IMAP to POP3;
(a) If ...msf only(no offline-store file while IMAP), create file named xxx, access it as xxx folder, and access xxx.sbd as directory for sub folders. This is useful when user deleted xxx instead of xxx.msf by mistake and subfolders under xxx.sbd is lost. Note: This can easily be done by user created simple script(or batch) followed by restart of Tb. 
(b) "Mail folder file splitter" in case of larger file size than current limitation(2GB if Linux/Mac, 4GB if Win.) This can be done by external utility only currently. This is very useful if problem like bug 387502, bug 598104, bug 537498 will happen again.
Confirming per your test result/report and my test results in comment #14.

b0o.supermario(bug opener), can you check workaround (1) in my comment #15? 
> (1) Copy profile to absolutely same location at new PC.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: reproducible
(Reporter)

Comment 22

7 years ago
Sorry, it was xp-to-seven transfer...
(In reply to b0o.supermario from comment #22)
> Sorry, it was xp-to-seven transfer...

If so, "absolutely same location" is very easy.
On Win 7, standard location of Tb's profile looks next,
  C:/Users/[user name]/AppData/Roaming/Thunderbird/
and standard location of local data looks next.
  C:/Users/[user name]/AppData/Local/Thunderbird/
These are different from XP, so you can always create C:\Documents and Settings\[user_on_XP]\Application Data\Thunderbird which was used on Win XP, and you can access it on Win 7 with no restriction.

(1) Copy Tb's profile directory on XP to same path at Win7.
    (C:\Document...\Thunderbird\Profiles\xyz.profname)
(2) If needed, add access privilege for the path and sub directories to currently used Win user on Win 7.
(3) Add profile with the copied directory via profile manager of Tb on Win 7.
      Create profile, Choose Folder, and select copied profile directory on Win 7
    Profile is defined in next file on Win 7. 
      C:/Users/[user name]/AppData/Roaming/Thunderbird/profiles.ini
    It is perhaps created with Is_Relative=0.
(Reporter)

Comment 24

7 years ago
Copying to a dummy POP account appears to work fine except it marks some messages as unread
(Reporter)

Comment 25

7 years ago
As suspected, thunderbird stores location somewhere, panacea.dat.
(In reply to b0o.supermario from comment #24)
> Copying to a dummy POP account appears to work fine except it marks some messages as unread

Did you copy profile after copy of folders/mails to the dummy POP3 account at current PC?
Or manually copied offline-store files of IMAP account to local directory for the dumy POP3 account after profile copy?

If former, following, an variant of "copy to absolute same location", is perhaps simpler workaround. 
- At old PC, change local directory of the IMAP account at Server Settings.
  (call C:\Imap)
- At old PC, restart Tb(mandatory. see Bug 2654), and access IMAP server,
  then wait for auto-sync completion. Mails are downloaded to C:\Imap.
- At old PC, terminate Tb.
- Copy profile of old PC to new PC as you usually do.
  Perhaps copy to C:/Users/[user name]/AppData/Roaming/Thunderbird/... on Win 7.
- Copy C:\Imap of old PC to C:\Imap of new PC.
  - Local directory setting of the IMAP account of copied profile is C:\Imap too.
  - Absolute path data in panacea.dat of copied profile is C:\Imap\... too.
- At new PC of "no internet access", always start Tb with Work Offline mode.
  thunderbird.exe -offline -p "profile_name_in_new_PC"
Forgot to write important step.
If above workaround, next change of prefs.js is mandatory before first use of copied profile at new PC.
> Keep as-is : user_pref("mail.server.serverN.directory", "C:\\Imap");
> Delete     : user_pref("mail.server.serverN.directory-rel", "[ProfD]../ ... ../Imap");

If serverN.directory-rel exists, absolute path obtained from relative path representation in serverN.directory-rel, and serverN.directory entry is written.
Because profile location is changed at new PC, "relative path representation of C:\Imap from profile directory at new PC" is different from one in old PC.
If serverN.directory-rel doesn't exist, Tb uses serverN.directory and generates serverN.directory-rel entry.
User can manually modify serverN.directory-rel, but it tends to produces user's mistake. So, I recommend "delete of serverN.directory-rel".
(Reporter)

Comment 28

7 years ago
Sorry, copying from old PC seems a difficult task now. A new profile was created, a new dummy pop account was created and the files were replaced for the account. It seems to display mail properly.
BTW any way to get folder icons in pop account?
(In reply to b0o.supermario from comment #28)
> BTW any way to get folder icons in pop account?

Fire icon for Junk, Paper icon for Drafts like one?
If so, explicitly use folder as draft, sent(need to enable sent mail copy), templates, or archive(need to enable archive feature) folder at Copies&Folders of any identity, and explicitly use as junk(need to enable Junk move) at Junk Setting of an account.
(In reply to b0o.supermario from comment #28)
> Sorry, copying from old PC seems a difficult task now.
> A new profile was created, a new dummy pop account was created
> and the files were replaced for the account. (snnip)

You looks to use Gmail account. If so, why you don't check first with new/small/free Gmail IMAP account of minimum mails?
1. Get new/free Gmail account, enable IMAP, send a mail to myself to generate mail data.
2. Create Tb's new profile at old PC, define the new Gmail IMAP account only, create some IMAP folders/subfolders for test, copy some mails in to them.
3. Get copy of Tb's profile at old PC.
   Because very small file, this step ends at a glance.
4. Copy the copied profile to the new PC.
   Because very small file, this is very easy step.
And, as very small account, definition changes etc. between step 2 and step 3 are very easy, so check of possible workarounds is very easy.
If most appropriate workaround for you is found, you can do copy of actual mail data to new PC of no internet access with no problem.
(Reporter)

Comment 31

7 years ago
Copying from old PC seems to be same as creating a new profile and replacing files... IRC it created same problems... Should a new gmail account be created?
(Reporter)

Comment 32

7 years ago
Copying from old PC seems to be same as creating a new profile and replacing files... IRC it created same problems... IRC it was tried many times...
(In reply to b0o.supermario from comment #32)
> Copying from old PC seems to be same as creating a new profile and replacing
> files... IRC it created same problems... IRC it was tried many times...

There two kinds of way to copy IMAP mail data to new PC of no internet access.
(A) Access IMAP offline-store file as POP3 account's local mail folder file.
    (A-1) Dummy POP3 account, copy files for mail data only.
    (A-2) Server type change from imap to pop3 in copied profile.
(B) Access IMAP offline-store file in copied profile as IMAP offline-store file
    at new PC too, with Work Offline mode always.
    (B-1) Copy profile to absolutely same profile location at new PC.
    (B-2) Absolutely same path is local directory of the IMAP account only.
Why you failed (B) is that you didn't do (B1) nor (B2).

When (A), there are two problems.
(i) If offline-store file for folder X doesn't exist(mail folder container, no mail in it), subfolders under X.sbd can't be accessed at dummy POP3 account unless file of X is manually created.
(ii) If offline-store file size is larger than file size limitation, splitting it at new PC is very hard. Splitting at old PC while IMAP access is posible, or copying to dummy POP3 account's folder at old PC is needed.
If above (i) and (ii) is not problem in your case, there is no problem. However problem like (ii) exists, a way of (B) will be needed, and (B-1) is simplest/easiest way.

No problem with (A-1) in your case?
(Reporter)

Comment 34

7 years ago
Hmm... Thunderbird doesn't need to be set to work offline mode when there isn't internet, does it? Browsing IMAP folders apparently work fine even when "work offline" isn't set. Server type may be needed to be changed. It SHOULD work fine except the "All Mail", "Junk", etc., isn't it?
(Reporter)

Comment 35

7 years ago
Hmm... Any ideas about when will Thunderbird support backup and restore officially? What is the status of SQLite storage DB / plug-gable mail stores?

Comment 36

6 years ago
does this problem also occur when *moving* folder?

Updated

5 years ago
Depends on: 881966
Depends on: 883645

Comment 37

5 years ago
I think, you never should *silently* delete offline Mbox and .msf files. Instead you should rename them to *-n* - like for other reasons - if online sync is not possible for what ever reason, because:
- Mbox and/or .msf files hold some data, which could not be retrieved from the server.
- Even if bug 883645 would be solved, panacea.dat could become deleted manually as it is suggested in many articles.

Clean-up of old/invalid *-n* files could be established by ThunderPlunger addon.
(In reply to Ulf Zibis from comment #37)
> I think, you never should ...
Ulf Zibis, who is the "you"?
I, who wrote majority of comments in this bug and bugs opened by you, is not who desined/wrote relevant Tb code.
FYI.
Bug 881966 and Bug 883645 are already opened by Ulf Zibis, and are put in "Depends on:" field of this bug because they are relevant to issuess discovered by this bug.
> Bug 881966 TB should never delete IMAP Offline store without warning / should provide solution to save offline store
> Bug 883645 Use relative paths in panacea.dat
(In reply to b0o.supermario from comment #35)
> What is the status of SQLite storage DB / plug-gable mail stores?
See bug 845952 and bug 859011 for status of new "Pluggable MaildirStore support".
About "SQLite based Mall Data Base".
Developers already tried SQLite based Mall Data Base. Because of performance reason, MorkDB is still used in current/official Tb releases. Please search B.M.O for "trying to use SQLite based Mall Data Base by developers" by yourself, by your hand, please.

Comment 41

5 years ago
(In reply to WADA from comment #38)
> Ulf Zibis, who is the "you"?
Sorry, is the in-polite in your opinion, please excuse? I meant the developers.

(In reply to WADA from comment #39)
> Bug 881966 and Bug 883645 are already opened by Ulf Zibis, and are put in
> "Depends on:" field of this bug ...
Sometimes Germans too are inconsistent about redundancy ;-)
Yes, this comment better refers to bug 881966.

Updated

4 years ago
Blocks: 859115
Duplicate of this bug: 859115
+1. it is simply wrong to wipe local copy of email data in offline mode. there is no good reason to do so bc ok you detect that its out of sync (cache missing or corrupted or otherwise) but since you are offline there is no way to sync it anyway. it also defies the purpose of offline mode if for whatever reason your local cache goes out of whack ie instead of rebuilding the cache based on the local copy of the data the later is simply wiped clean and if you cant go online and sync you are screwed until you can.

another workaround i have found for this is after you quit TB simply remove panacea.dat file before you start TB next time. the presence of that file (or its data when re-created, dunno) is what triggers the local copy wipe.
You need to log in before you can comment on or make changes to this bug.