Closed Bug 1399793 Opened 7 years ago Closed 3 years ago

Change default Imap Local Directory to Local user profile folder instead of Roaming

Categories

(Thunderbird :: General, enhancement)

53 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 517425

People

(Reporter: richard.leger, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Linux; Android 7.0; SM-G935F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36

Steps to reproduce:

On a Windows computer, create a new Imap account in Thunderbird.


Actual results:

Imap Default Local Directory (Tools -> Account Settings -> [account name] -> Server Settings -> Local directory)   cache local copy of msg is set to a location in the Roaming user profile:

C:\Users\<username>\AppData\Roaming\Thunderbird\Profiles\<profileName>\ImapMail\<imapServer>

e.g 
C:\Users\richard\AppData\Roaming\Thunderbird\Profiles\lw99g3mh.default\ImapMail\mail.myserver.co.uk



Expected results:

It should be set to a location in the Local user profile with other local cache folder of Thunderbird (as local imap copy of msg is a local cache of data it does not belong in roaming location) so data would not roam/sync at each logon/logoff for users with Roaming profiles.

C:\Users\<username>\AppData\Local\Thunderbird\Profiles\<profileName>\ImapMail\<imapServer>

e.g 
C:\Users\richard\AppData\Local\Thunderbird\Profiles\lw99g3mh.default\ImapMail\mail.myserver.co.uk

This way if user has 20GB of emails it would not affect Roaming/sync during login/logoff on windows machine (long delay, errors, timeout...).
The default imap directory location setting itself should be part of other account settings and saved in the roaming profile so setting itself would roam/sync within user profile. So if user connect on another windows machine, the settig will be transfferred over but not cache data that first time will be resynched with imap server... to recreate local cache on new computer...
 Hope that make sense ;-)
With a bit of manual intervention, you can change the profile directory to anywhere you want:
http://kb.mozillazine.org/Profile_folder_-_Thunderbird
http://kb.mozillazine.org/Moving_your_profile_folder

Would that not satisfy your requirement?
(In reply to Richard Leger from comment #1)
> Hope that make sense ;-)
So you want some of the profile in "roaming", but the IMAP message store somewhere else? Hmm.
Severity: normal → enhancement
(In reply to Jorg K (GMT+2) from comment #3)
> (In reply to Richard Leger from comment #1)
> > Hope that make sense ;-)
> So you want some of the profile in "roaming", but the IMAP message store
> somewhere else? Hmm.

Yes.

Imap accounts settings shall be saved in TB profile folder located in Roaming user profile folder...along with other settings...

Imap accounts cached data (local msg cached copy, indexes, etc...) which I believed is stored in the ImapMail directory... shall be saved in TB profile folder located in Local user profile folder... along with other existing cache (e.g browsing)...

Hope that clarify enough...
(In reply to Jorg K (GMT+2) from comment #2)
> With a bit of manual intervention, you can change the profile directory to
> anywhere you want:
> http://kb.mozillazine.org/Profile_folder_-_Thunderbird
> http://kb.mozillazine.org/Moving_your_profile_folder
> 
> Would that not satisfy your requirement?

Nope, I am not talking about moving the Thunderbird profile... I am talking about the default location of the ImapMail (Imap Local Directory) folder and its content which is stored within Thunderbird profile in any case...

Please note that on Windows computer one Thunderbird profile (e.g lw99g3mh.default) is truncated into two parts...each being stored in different location...

One part is stored here:

C:\Users\richard\AppData\Roaming\Thunderbird\Profiles\lw99g3mh.default

Mostly used for settings and information that needs to roam/sync/copied between computer at logon/logoff via a windows server (or similar e.g samba) for user set with a windows roaming user profile.

A second part is stored here:

C:\Users\richard\AppData\Local\Thunderbird\Profiles\lw99g3mh.default

Which is a different path location. This location is used for local caching of data that do not need to roam/sync/copied between computers... local cache copies... like for example browsing cache among others...

Thunderbird should use that second location BY DEFAULT for the Local Directory setting of any Imap account during first setup... for the location of the ImapMail folder... and its subfolders... this should only contains cache copy of emails and indexes but no settings...

Hope that clarify.
Difference between Roaming and Local folders within a Windows user profile...
 
Source: https://superuser.com/questions/21458/why-are-there-directories-called-local-locallow-and-roaming-under-users-user

Roaming. This folder (%appdata%) contains data that can move with your user profile from PC to PC—like when you’re on a domain—because this data has the ability to sync with a server. For example, if you sign in to a different PC on a domain, your web browser favorites or bookmarks will be available.

=> by default Thunderbird shall keep Imap account settings within this Roaming location...(should be the case already).

Local. This folder (%localappdata%) contains data that can't move with your user profile. This data is typically specific to a PC or too large to sync with a server. For example, web browsers usually store their temporary files here.

=> by default Thunderbird shall keep Imap local cache (msg copy, msg indexes, etc...) within this Local location... That is not the case currently so that is what I suggest to change TB default setting via this bug/feature enhancement...

I don't know enough about the ImapMail folder structure and content to confirm what it contains exactly... I suspect it only contains locally cached data... but if it contains both settings and cache data then those should be split into two part the same way a Thunderbird profile is... if required... settings going into Roaming Thinderbird profile ... cache data into Local Thunderbird profile... 

Changing the default Imap Local Directory in Thunderbird shall be quite easy to do and would tremendously improve agility of this application by avoiding great anoyance by default to all raoming users out there!!!

;-)
No, not likely "easy".  And it may also break global search - the global search discussion was decided long ago
Wayn(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #8)
> No, not likely "easy".  And it may also break global search - I discussion
> that was decided long ago

Not sure to understand your comment ... there is already a TB setting to change Imap Local Directory that can be used to change location already... and it does not break global search...or please explain how it does...

See in Tools -> Account Settings -> [account name] -> Server Settings -> Local directory (at the complete bottom you need to scroll down to find/see it)

That path shall be set to a location within Local folder by default...not the Roaming one...

Easy because already possible to my opinion... but you better know inner functioning of TB surely...

:-)
The fact that you can actually change the location doesn't mean it will work as intended. And as you hint, the fact that you think it will be easy isn't a good measure of whether it will be easy. 

One of the most recent discussions of this area, written by the author of global search, indicates this is a very hard, perhaps intractable problem. https://mail.mozilla.org/pipermail/tb-planning/2010-December/000622.html
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #10)
> The fact that you can actually change the location doesn't mean it will work
> as intended.

Well it should... because developers gave the ability to end-users to change the location via a setting in the first place... at least for the ImapMail folder content... so in theory that should work as expected. If that does not, this should be raised as a bug and it should be fixed :-)

> And as you hint, the fact that you think it will be easy isn't
> a good measure of whether it will be easy. 

I agree... but it should be considering the above... also TB already handles cache file located in the Location directory and roaming data in the Roaming directory...

Changing a default directory/files location should not be so complicated in theory and must certainly be available by design (though I understanding this may require testing and confirmation it would not break code)... those path may be already been set via variable or constant within TB code for safety and re-use at various place in the code... though I may just being presumptuous here probably... I must admit I don't know enough about how exactly TB is programmed... but as TB is open source, I would expect it would follow such simple paradigm... so relocating file in a different folder shall not break things...

> One of the most recent discussions of this area, written by the author of
> global search, indicates this is a very hard, perhaps intractable problem.
> https://mail.mozilla.org/pipermail/tb-planning/2010-December/000622.html

I think there may be a confusion here as they are two different distinct issues raised in the post:

- Directory Location of files on disk (Imap cached files, global search files, etc...) <-- should be easy to solve as this is a simple relocation of default directory/files location within directories on computer...

- Performance of Global search indexing at first connection (requiring multi-processing, db truncated, etc...) <-- difficult issue, I agree...

The second one is the one mostly addressed and discussed in the post you linked above. The first one much less...

Those are two separate issues that I believe should be dealt separately and can be resolved separately. Personally I don't mind the indexing taking 5mn to complete (with multiple 10GB mailbox) at first sync or at startup... It would be nice to have it fixed but that is not the point of this bug...

I agree that the performance issue is complicated to sort out as it is greatly part due to the monolithic processing of Thunderbird... though I believe some people had/have ideas and already start working on making TB less monolithic... but once again, that is not the point of my bug here :-)

The point here, is the current default location of ImapMail folder is wrong by design at least on Windows platform. And I am only talking about physical folder/files location on drive... not any other feature here...

The Imap Directory (local cache copy of msg +.msf indexes for Quick search in folder) is local cache data therefore it should be stored in the Local folder of the windows user profile... by default and by design.

Following the reading of post you refered above, I would event extend the bug request to include the Global Search files location (global-messages-db.sqlite and global-messages-db.sqlite.journal) those should also be considered as Local cached data and have nothing to do in the Roaming folder of the windows user profile, those should also be relocated by default and by design in the Local folder of the windows user profile along the ImapMail folder... I am not asking to have them truncated in multiple database, just relocated on the drive to a different default location... Hope that make sense.

In all those cases, directory/files should be store within the TB Profile but as I indicated earlier, the TB Profile by design is already divided into two parts itself: One for storing Local data, One for storing Roaming data... So that is why I consider that changing the default file/directory location should be relatively easy and trivial as the structure is already in place to do so...

Once again the only issue I could see if any of those directory/files contains settings (but I doubt about it), then the settings part should separated and remain in the Roaming profile location of TB.

Hope that would clarify enough for TB developers to consider fixing what should be consider as a TB design bug on Windows platforms... the default location of what should be considered locally cached data...
Component: Untriaged → General
See Also: → 517425
(In reply to Wayne Mery (:wsmwk) from comment #10)
> The fact that you can actually change the location doesn't mean it will work
> as intended.

FYI, after changing location and using TB for months... I can confirm it has worked as intended and no issue were observed so far.

The only inconvenients are:

- It has to be done manually afer each setup of email account in TB
- There seems to be no way to automate the process via auto-configuration
- TB does not move the ImapMail directory and its content automatically when setting is changed, so it has to be done manually and requires TB to be shutdown...

Can any of those be automated already somehow?

That is definitely a possible solution for TB users with Roaming Profiles in Windows environment.

TB developer/governance shall consider targeting business in addition of user lambda... ot at least sysadmin, I believe there is a huge potential there that may not be tapped in.

Small Businesses particularly do appireciate TB for those where it is well setup... and I am sure some would be ready to donate some money some time to time to help development... where it could answer their need... partly because TB seems "excluding" them from primary target...by concept/policy/conviction perhaps... maybe I am wrong but that is a feeling...

My opinion from experience would be that if it benefit to business users it would benefit to all...

The governance shall remain free and independant from Business driven but that should not exclude improvements here and there for business users and sysadmin that install and configure TB for them...

More automation/auto-configuration capapilitues there could be welcome, easier it would be on end-users (including sysadmin) to raise usage of TB... especially in the work place...

I have been trialing the following change for a year with TB 60.x branch with multiple windows user attached to a domain with Roaming profile and I haven't noticed major issues with the changes on the contrary! I have yet to see what's gonna happen when they are forced to move to 68.x branch..

It would be great if on Windows such changes become the default!

For example via Tools -> Account Settings -> [account name] -> Server Settings -> Local directory

Changing location from:
C:\Users\richard\AppData\Roaming\Thunderbird\Profiles\lw99g3mh.default

To:
C:\Users\richard\AppData\Local\Thunderbird\Profiles\lw99g3mh.default

And moving manually the Imap mail profile folder which contains only cached data into new location (while TB closed).

Settings remain in Romaing profile area, only cached data is affected by the change.

I believe that search indexes shall also be stored in new location but that is a total different matter.

I would even go further and suggest the path setting to be manageable via GPOs (Global Policies) recently introduced in TB.

Comment 14 might require more open discussion. But, I don't see us moving the location of the imap cache. Seems like a duplicate of bug 517425

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.