Open Bug 1723324 Opened 3 years ago Updated 3 years ago

With the first added IMAP account to a new mail profile, messages on the imap server are always fetched and stored in the local profile even if the user enters "Advance config" mode and disables offline storage

Categories

(MailNews Core :: Account Manager, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gds, Unassigned)

References

Details

The default setting for TB is to save all IMAP messages locally in files, mbox or maildir. Some users don't want this. When adding a new imap account to an existing profile, this can be prevented by doing a "Manual config" and then "Advanced config" when setting up the account and going to "Synchronization & Storage" and unchecking "Keep messages for all folders for this account on this computer" and then selecting the Inbox for the new account.

However, when the first account is added to a new profile, when "Advanced config" is selected in the account manager, the Inbox for the new account is automatically selected and the default settings are applied and used before the user can make the change to prevent local storage of emails. This causes messages to be fetched and stored locally and the user has to manually delete the files or repair the folders to get rid of the unwanted files.

A workaround for the issue and more details on this are here:
bug 163964 comment 49

See Also: → 163964

(In reply to gene smith from comment #0)
This causes messages to be fetched and stored locally and the user has to manually delete the files or repair the folders to get rid of the unwanted files.

Also noted:

  • when changing the 'Keep...' option, change seems applied inmediately in folders but effective only after a restart of TB... at least for the current folder...maybe changing folders would cause new settings to be applied (to be confirmed)
  • when disabling the option (general option or per folder) there is no prompt to end-user to ask what to do with already downloaded messages delete (should be the default) or keep in cache storage. If you choose delete, it could run repair on the folder assuming that action would delete cached message downloded data (to be confirmed)
  • if download of message starts and you disable cache option during the process, it does not stop the downloading of messages that just keep going. Process should stop and end-user be promoted to delete or keep already downloded msg in cache storage.

I'm not sure what's suggested. The summary of this bug doesn't make sense: The user had no wish at that point - they didn't configure anything. And storing by default is very reasonable IMHO.

The user creates a profile and adds an imap account with setup wizard and INBOX and other folders have gigs of messages on the server. The uses "wishes" to keep everything on the server and not save messages in tb's profile. The user enters advanced mode from the setup wizard and switches off Keep messages in all folders in this account on this computer but the fetch of messages and saving to mbox/maildir occurs anyhow before the change is made and only stops when the messages are all download or tb is shutdown.

A solution would be for tb to auto-select on the new 1st account and not the new 1st account's Inbox. That way the user's advanced change to "not keep messages" would be respected as long as the change is made before a folder is clicked. (The problem does not occur when a 2nd or later account is added to an existing profile because the selection point stays on an old account where it last was and does not move to the new account's Inbox.)

There may be better solutions (maybe add "keep messages..." to the account setup wizard page) but not auto-selecting on Inbox for the 1st account would be OK by me.

Anyhow, it seems that if the wizard allows "advanced" setting to be made, tb should not start using the default setting while the user is making changes.

(In reply to Magnus Melin [:mkmelin] from comment #2)

And storing by default is very reasonable IMHO.

No, it may be suggested as default option (reasonable IMHO though from a security point of view it isn't) but not imposed as it is currently (user choice not easily accessible nor respected upon setup).

Yes, user has wishes to keep or not local copy of message during setup of IMAP account and/or should be offered the defaut choice transparently with a chance to modify default behavior. Storing and caching full message content on local computer for offline use shall remain a user's choice at all time. Not being imposed...

This option shall remain a choice (which you may still suggest enabled by default would you want to) and shall be made easily accessible within the setup wizard maybe just under the detected server settings and be respected during the first setup of the account, once set.

Also account setup shall not start prior Advance Settings are set and saved. Currently as soon as you access Advance Settings from new email account wizard, the account setup starts immediately before you can change any advance settings... so if I choose for example not to keep message... or want to relocate path to local cache... it won't work as expected. Message from Inbox and other folders have already started downloafing locally by that time and it seems change only get effective at next TB restart of Thunderbird...

Use cases:

  • IMAP account is 40GB in size no need to dowload by default on my computer, can access all online.
  • from gdpr/security point of view, data shall remain on server only. No local cache copy of msg on computers at all time. So if laptop stolen data more secured for example.
  • Reduce disk usage on local computer

There might be other use cases...

Flags: needinfo?(alessandro)

This is tricky.

So, the "issue" here is that as soon as the first account is created (fresh profile), TB initializes the Folder Pane and selects the INBOX folder, consequentially triggering the download of all messages.

I can see how in the use cases you listed, the immediate download of all the messages can be a bad thing and how having the ability to control the "Keep..." option in the Account Settings before the starting of the download might be useful.

On the other hand, we have many users which find super annoying that the INBOX folder is not immediately selected after a successful account setup, as they think TB is broken because the account central page is still visible.

So...how can we accommodate both needs?
Maybe something like this?

  • If the user goes through the regular account setup, we keep everything as it is and we don't change anything.
  • If the user clicks on the "Advanced config" link in the account setup, we don't select the INBOX folder in order to prevent the initial download and give users the proper time to change the needed settings.

This seems like a good balanced solution since, most likely, users that have a good knowledge of account size, local cache, disk usage, etc, are those that feel comfortable in going through the "Advanced config" settings, while "regular" users that don't care about this will keep having the same standard first run experience.

Does this sound good?

Flags: needinfo?(alessandro)

On the other hand, we have many users which find super annoying that the INBOX folder is not immediately selected after a successful account setup, as they think TB is broken because the account central page is still visible.

By "account central page" do you mean the main TB screen? All I've noticed when adding a new imap account to an existing profile is that the previous selection point in an old account remains selected and only Inbox is visible under the new account. Only when you click on the new account's Inbox do the other folders appear and any message download and store occurs. To me this behavior is fine.
Do we have bug reports from these "super annoyed" users? Just curious.
Edit: I see what you mean about the account central page. After you enter the account you end up in the "Account Settings" tab and have to go select the main tb tab to see your new account in action. Yes, this might be confusing to new users.

So...how can we accommodate both needs?
Maybe something like this?

  • If the user goes through the regular account setup, we keep everything as it is and we don't change anything.

Will Inbox be auto-selected for every new imap account when advanced is not selected? That would be a change since it is currently not auto-selected when a new imap account is added to an existing profile containing other accounts. (But again, changing this is not important to me personally.)

  • If the user clicks on the "Advanced config" link in the account setup, we don't select the INBOX folder in order to prevent the initial download and give users the proper time to change the needed settings.

Sound exactly what I would like. They can make advanced setting to change "keep..." and it only takes effect when they click the new 1st account's Inbox. This will make the 1st account in a new profile behave just like a new account in an existing profile (as it currently works).

This seems like a good balanced solution since, most likely, users that have a good knowledge of account size, local cache, disk usage, etc, are those that feel comfortable in going through the "Advanced config" settings, while "regular" users that don't care about this will keep having the same standard first run experience.

Does this sound good?

Sounds great to me!

That all still is something a user would have to know beforehand, so basically a few people reading this bug report in detail ;)

It could be more reasonable to just don't kick off the syncing before a minute or so after the setup. For a large account just syncing the headers will certainly take some time so it's not losing much time either... Or, expose stopping the sync as it's occurring (xref bug 476487)

That all still is something a user would have to know beforehand, so basically a few people reading this bug report in detail ;)

Not sure if you are referring to my bug summary line. If so, don't understand what is wrong with it but I changed it to something maybe better, but longer.

It could be more reasonable to just don't kick off the syncing before a minute or so after the setup. For a large account just syncing the headers will certainly take some time so it's not losing much time either...

This would work for me too since it doesn't take long to change the setting to disable offline storage since I know exactly where to find it. Other's may not know where it is and take too much time.

However, I still like Alessandro's suggestion better.

Or, expose stopping the sync as it's occurring (xref bug 476487)

You would still end up with unwanted offline store files like you have if you shutdown TB during the initial sync, unless a clean-up occurs when you activate the "stop".

Summary: With first IMAP account of new profile, messages are always stored in mbox/maildir file regardless of user wishes → With the first added IMAP account to a new mail profile, messages on the imap server are always fetched and stored in the local profile even if the user enters "Advance config" mode and disables offline storage

Here's a better work-around that makes this bug moot, at least for me.

Before clicking the "Advanced config" in the setup wizard, go back to the main TB tab and set TB offline. Then click "Advanced config" and do the change(s). Then go back to main TB tab and go online. Then click on the new account name and then back to Inbox of the new 1st account and the advanced settings are respected, folders are discovered and appear. If offline store was disabled, full messages are not downloaded and storage files are not created.

(In reply to Alessandro Castellani [:aleca] from comment #5)

This is tricky.

So, the "issue" here is that as soon as the first account is created (fresh profile), TB initializes the Folder Pane and selects the INBOX folder, consequentially triggering the download of all messages.

I can see how in the use cases you listed, the immediate download of all the messages can be a bad thing and how having the ability to control the "Keep..." option in the Account Settings before the starting of the download might be useful.

On the other hand, we have many users which find super annoying that the INBOX folder is not immediately selected after a successful account setup, as they think TB is broken because the account central page is still visible.

So...how can we accommodate both needs?
Maybe something like this?

  • If the user goes through the regular account setup, we keep everything as it is and we don't change anything.
  • If the user clicks on the "Advanced config" link in the account setup, we don't select the INBOX folder in order to prevent the initial download and give users the proper time to change the needed settings.

This seems like a good balanced solution since, most likely, users that have a good knowledge of account size, local cache, disk usage, etc, are those that feel comfortable in going through the "Advanced config" settings, while "regular" users that don't care about this will keep having the same standard first run experience.

Does this sound good?

I think it would be good for now as a quick fix but long term, you may want to consider:

  • showing the option in wizard for more transparency
  • have Inbox selected once Advanced Settings (whatever they are) are all set by end-user. I don't think a timer woukd di because you cannot predict how long a user would take to change settings. Maybe a save and close Advance Settings tab mechanism could trigger the sync...

Also what happen if I want to change another setting for example Local Directory in Advance Settings > Server settings would the new path be respected considering account is already set but Inbox not selected yet (sync not triggered)?

Also in advance option under "Keep..." option there is a button to choose which folder it applies to... would that be possible if account is set but not synced yet? Or option disabled/list of folder empty?

(In reply to gene smith from comment #9)

Here's a better work-around that makes this bug moot, at least for me.

Before clicking the "Advanced config" in the setup wizard, go back to the main TB tab and set TB offline. Then click "Advanced config" and do the change(s). Then go back to main TB tab and go online. Then click on the new account name and then back to Inbox of the new 1st account and the advanced settings are respected, folders are discovered and appear. If offline store was disabled, full messages are not downloaded and storage files are not created.

Thanks for the workaround ;-)
Coukd putting TB offline while Advance Settings are set could be an alternative way, asking and user to close Advance settings tab once set to put TB back online and trigger the sync according to settings that may have changed?

Currently, when you choose "advanced config" this message pops up:

This dialog will be closed and an account with the current settings will be created,
even if the configuration is incorrect.
Do you want to proceed?
[Cancel]  [Ok]

My workaround requires that you go back to the main TB tab/screen and go offline before clicking Ok.

A fairly simple UI change might be to add a checkbox to this dialog that allow you to to go offline right there with with some explaining text:

[ ] Go offline to ensure that all advanced changes take precedence. 
    You will need to manually go back online when your changes are complete.

Richard also mentions changing the storage location:

Also what happen if I want to change another setting for example Local Directory in Advance Settings > Server settings

For the path change to take effect, it prompts the user for a restart:

Daily needs to restart now to apply the change to the Local directory setting
[Cancel]  [Ok]

If you have already set TB offline and then allow the restart, TB comes back online. So this can still allow problem to occur unless you do the Local Directory path change last (I.e., after disabling offline storage).

You need to log in before you can comment on or make changes to this bug.