Closed Bug 110672 Opened 23 years ago Closed 3 months ago

Cannot remove local folders from Thunderbird UI (having either IMAP or POP account)

Categories

(MailNews Core :: Backend, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1817913

People

(Reporter: jan.h.d, Unassigned)

References

(Blocks 1 open bug)

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5+) Gecko/20011114
BuildID:    2001111408

Mozilla automatically creats a mail account named
Local Folders with a bunch of folders in them.

If you are an IMAP user, these folders make no sense
as they are never used.  However, they can't be removed.

I'd like to remove all of "Local folders", since it is
annoying to have it show up in the "Copy/Move messages" menues
as well in the File toolbar button.


Reproducible: Always
Steps to Reproduce:
1.Start mozilla
2.Try to remove account "Local Folders"


Expected Results:  Edit -> Mail & Newsgroups account settings.
Select Local Folders.
Press "Remove Account" (now the remove button is not available).
I don't know if this is possible, because we automatically use Local Folders 
for things like saving drafts of unsent messages...

->Account Manager
Assignee: sgehani → racham
Status: UNCONFIRMED → NEW
Component: Preferences → Account Manager
Ever confirmed: true
Product: Browser → MailNews
QA Contact: sairuh → nbaca
It was designed for Local Folders to always be available for the reasons given
by hwaara. Unfortunately I could not find an explanation in the Account Setup
specification (http://mozilla.org/mailnews/specs/accounts/#AccountSettings).
If this is /possible/, I'd like to see this implemented though. I do not,
myself, ever used Local Folders so I'd remove it if I could. :-)
Status: NEW → ASSIGNED
Target Milestone: --- → Future
cc'ing Seth. I believe he implemented Local Folders? 

Unsent messages are stored here.
Templates that come with NS version are stored here.
By default Sent messages from newsgroups are stored here.
Imported messages are stored here.
Probably other items i'm forgetting?

If we want to allowed users to remove the Local Folders section, we need to 
first address all the potential issues that may arise and how to address them 
(what happens when users try to perform the actions that by default require 
Local Folders). This should prob have a spec that addresses all the potential 
issues and resolutions before anything is changed.
This is similar to bug 64716
> Unsent messages are stored here.
> Templates that come with NS version are stored here.
> By default Sent messages from newsgroups are stored here.
> Imported messages are stored here.

How about a "Place special folder on: " choice (like Sent/Drafts/Templates can
be choosen to be on the IMAP server today), and if local folders is about to be
removed, check if any special folders are there.  If they are, give an error. 
This might be tough to implement, but it makes sense to me as a user :-)
*** Bug 64716 has been marked as a duplicate of this bug. ***
This bug has to do with both imap and pop users. And it is in full contrast with
bug 23313 (although I must admit that I hate Local Folders because they eat
valuable space on my 15" alt 3 pane window). Updating summary. 
Summary: Can not remove local folders → Can not remove local folders (having either IMAP or POP account)
*** Bug 126389 has been marked as a duplicate of this bug. ***
*** Bug 136126 has been marked as a duplicate of this bug. ***
*** Bug 142046 has been marked as a duplicate of this bug. ***
*** Bug 158022 has been marked as a duplicate of this bug. ***
There are dups from Win32. Probably on Mac too. Platform->All.
OS: Linux → All
Hardware: PC → All
Why on earth aren't the drafts, templates, and unsent messages not stored in the
respective account they belong in, rather than the local folders folder?  I hate
having that localfolders folder there.  I don't use it at all.  At the very
least, hide it from view.

Why should I have duplicates of all of these folders?  I want ONE set of folders
for each account.  As soon as you make an account, why can't that be your
guaranteed folder on disk?  

For the average joe with one mail account, they want to see something like
Outlook express which has one set of folders.  Mozilla one-ups OE by allowing
you to add multiple accounts (and have the e-mail come into a seperate inbox
area for each account)  But then it goes and throws away the advantage by
wasting screen space and confusing users by giving you a Drafts, Templates, Sent
and Trash for each account (which is intuitive and makes sense, and this is
where you would expect all messages for this particular account to end up) and
then having one additional set of folders where some messages end up, and you
can't get rid of.


Also, Imported messages should be imported into the account that is selected
when you click import.  They should not be imported into the default folders.

I have always found this mildly annoying, and since I converted my wife from
netscape 4.77 to mozilla, this is her chief complaint - "What am I supposed to
do with these extra folders?  Why can't I delete them?  I don't need them..."
*** Bug 125435 has been marked as a duplicate of this bug. ***
*** Bug 167919 has been marked as a duplicate of this bug. ***
So lets speed up this bug and have some constructive input here.

>Unsent messages are stored here.
>Templates that come with NS version are stored here.
>By default Sent messages from newsgroups are stored here.
>Imported messages are stored here.

-So have mozilla create an unsent folder on the already existing mail account if
one doesn't already exist.  Easy enough.
-Mozilla obviously copies templates into that folder upon setup, so it can just
as easy copy templates to the existing mail account.  
-So make the default Sent message folder be the existing account.  This can
already be set in the preferences.
-If you import messages, fine...no problem allowing creation of local folders there.

Even if this capacity is difficult to impliment right now, at the least a user
should have the ability to REMOVE the Local Folders account.  Then if bugs start
arrising we can enter them into bugzilla.  The newly created bugs would only
effect users who though themselves smart enough to delete the Local Folders
account anyways.  Once those bugs are cleared out, the creation of Local Folders
on profile creation can be removed all together.
Summary: Can not remove local folders (having either IMAP or POP account) → Cannot remove local folders (having either IMAP or POP account)
It seems that you can play some tricks to remove Local Folders. Here is what I
did (use on your own risk;-) to my prefs.js (I also delted the Local Folders
directory):

< user_pref("mail.accountmanager.accounts", "account1,account4");
> user_pref("mail.account.account6.server", "server5");
> user_pref("mail.accountmanager.accounts", "account1,account4,account6");
< user_pref("mail.accountmanager.localfoldersserver", "server1");
> user_pref("mail.accountmanager.localfoldersserver", "server5");
> user_pref("mail.server.server5.directory", "<path to Local Folders>");
> user_pref("mail.server.server5.hostname", "Local Folders");
> user_pref("mail.server.server5.name", "Local Folders");
> user_pref("mail.server.server5.type", "none");
> user_pref("mail.server.server5.userName", "nobody");

Of course, your numbers might be different. server1 is my POP3 account.
Mail & Newsgroups Account Settings does not show anything on Local Folders
anymore. That's surprising but welcome;-)

pi
mass re-assign.
Assignee: racham → sspitzer
Status: ASSIGNED → NEW
*** Bug 214332 has been marked as a duplicate of this bug. ***
*** Bug 224969 has been marked as a duplicate of this bug. ***
My two cents: I use a mix of IMAP and POP3 accounts, up to 5 at the moment. My
wish is to have only one Templates, Drafts and Sent folder and I want it on the
Local Folders so that I have only one.

This is what I propose:
Since the user can choose where to have each of these folders per account,
Thunderbird/Mozilla could be intelligent: it should hide all Drafts, Templates
and Sent folders that are not used.

This allows one to set these folders to reside on the server and the Local
Folder versions will be hidden.

It allows one to set these folders to the Local Folders and all remote ones will
be hidden. (This happens for IMAP, but not yet for POP3).

Would this please all? Is this feasible?
Hiding specific folders isn't enough for us IMAP types, Local Folders itself
should not exist.  I currently have two IMAP accounts, both set to use the Sent
folder on their respective server, and messages still sometimes show up in Local
Folders/Sent.  If this happened and the folder was merely hidden it would be
_very_ annoying.
I've just wondered why those messages showed up in Local Folders/Sent.  I have a
couple news accounts set up; these had their special folders in Copies & Folders
set to "Local Folders" (I've just changed them).  When this bug is fixed, Local
Folders should not be an option on those pages.
Hello Randy: I consider my self an IMAP type as well and I love the local
folders and don't want those server-side folders.

You are right of course that these folders should not merily be hidden, but
rather not shown _and_ not used. Of course, these two go together.
Ben, re comment 22: Automatically hiding folders that might have messages in
them wouldn't be fun, and hiding on unused&&empty might be ok but sounds like
trying to be a bit too smart perhaps? Bug 197228 exists on the issue of not
being able to manually get rid of the unused special folders. I believe
currently all the folders under Local Folders with probably the exception of
Unsent Messages can be manually deleted modulo that bug (icbw there).
Hello Tuukka: You are completely right. See my comment #25. Thanks for the
reference to the other bug.
There seems to be a work-around in Bug 110672.

These special folders can neither be deleted for POP3 accounts.

IMAP accounts do it correctly: when changing the folder settings for the account
to have them on Local Folders, the server-side folders disappear from the list.
Oops, Sorry, That was copied into the wrong bug.
Another vote from a 250-user IMAP site. The local folders are unused here, and
just a PITA.
I voted for this "bug" We have an office in europe and we do all IT support from
the US. No matter how much we stress use only the IMAP folders they continually
save stuff on their local folders. This obviously is not backed up and they
loose mail when their PCs die or are reloaded. We don't have an IT staff there
to stay on top of this, so if we could disable the local folders it would make
sure they keep their mail on the IMAP server.

Justin

I was thinking about this. Removal of Local Folders might be an easier change to
cope with if we stop thinking of Local Folders as being a special magical
account. Think of it as a another type of account, that unlike POP or IMAP or
NEWS, doesn't happen to have any server associated with it.

Not only should it be possible to delete the Local Folders (and intellegently
redirect anything like drafts and templates that were being stored there) but it
should also be possible to re-add Local Folders to a mail setup that doesn't
have one. Imagine if when you clicked the "Add Account" button you were
presented with a dialog that, in addition to allowing you to create a Mail or
News account, also allowed you to create a "Local Folders" account.

Anyway. Just something to think about.
*** Bug 232332 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
This is a perfect example of the way Mozilla.org is unresponsive to the end
user. This problem has been around long enough that it should have been dealt
with by now. I also DETEST having "local folders" to deal with and have
complained bitterly about it before. But in the larger scheme of things, this
problem is perfectly indicative of how difficult it is for the end user to find
a place to complain about problems and to make suggestions for improvements.
Until a better way is provided for the END USER to provide feedback, development
will continue to be based mainly on the preferences of a relative handful of
developers and the program will not take hold as well as it could.

To get rid of the local folders, do the following (from a source I have
unfortunately lost at this point, my apologies to the hero who came up with this
technique):
______________________________________________
How do I get rid of the "Local Folders" in Mail/News? 
You don't want to do this, these folders actually serve a purpose (Mozilla uses
the Local Folders to save postings to newsgroups for example) and should best be
left alone. There is a way to remove them, but please note that the Local
Folders will be recreated whenever you add a new account. (note: I personally
have not found this second item to be true)

To remove Local Folders: 

1. Close Mozilla completely. 

2. In your profile directory, delete "\Mail\Local Folders". 

3. Open the file prefs.js with your favorite text editor and delete any
reference to Local folders, especially: 

user_pref("mail.accountmanager.localfoldersserver", "server2"); 
user_pref("mail.root.none", "C:\\WINDOWS\\APPLICATION
DATA\\Mozilla\\profiles\\DeinProfil\\xxxxxxxx.slt\\Mail"); (WHAT IS "DEINPROFIL"?) 
user_pref("mail.server.server2.directory", "C:\\WINDOWS\\APPLICATION
DATA\\Mozilla\\profiles\\YourProfile\\xxxxxxxx.slt\\Mail\\Local Folders"); 
user_pref("mail.server.server2.hostname", "Local Folders"); 
user_pref("mail.server.server2.name", "Local Folders"); 
user_pref("mail.server.server2.type", "none"); 
user_pref("mail.server.server2.userName", "nobody"); 

Note: "server2" is just an example. The name might be different on your system
(server3, server4, and so on).

4. Save prefs.js, delete prefs.bak and copy prefs.js to that name, then restart
Mozilla. Local Folders should be gone now.

5. Adjust settings in news server accounts (especially Sent Items).

HTH
Can we not just have an option to have the GUI hide Local Folders if it contains
no messages? The scan for this should be very quick as the moment it finds a
single message it can stop.

Then it won't lose or hide mail if some obscure bit of code somewhere creates
something in Local Folders, but it will be hidden to all users who just use IMAP
(I have a few hundred users doing this and nothing goes in there unless they do
it themselves).
Assignee: sspitzer → mail
*** Bug 301903 has been marked as a duplicate of this bug. ***
As a workaround, we have re-configured the Local Folders to be in the TEMP directory, and renamed them to 'Do not use'.  The TEMP directory is cleared when a user logs out.  Mozilla automatically re-creates the magic folders on each startup.

Now at least the users have stopped saving mail into this Local Folders tree.  When they do, it is lost quickly so they quickly notice this is not the place to save mail.
(the Local Folders can be conveniently used as a quick way to archive old mail.  move old mail messages from IMAP account to local folders, and burn on CD.  when configured this way, that is still possible)

Now, it would still be convenient when you could somehow hide this account, automatically as suggested in comment #35 or manually via the "edit mail preferences" dialog.
The suggestion to put the Local Folders in the TEMP directory is dangerous.  If you're working offline and send a message, the message sits in the Local Folders/Unsent folder until you go online and it is really sent.  If the user closes and re-opens Thunderbird while offline, they'll lose any messages they've sent.

This behavior could be fixed by using an Unsent folder in the relevant IMAP store (which of course would have to have "Select this folder for offline use" ticked by default).

Having the option to hide Local Folders when they're empty would be an acceptable temporary "fix", but to make Thunderbird a really good IMAP client issues like this need to be fixed.
It works OK in our case because the TEMP folder is only emptied on logout in a certain set of circumstances, the Unsent Messages being empty is one of them.
(a software installation being pending is another)

But indeed this is quite configuration dependent.  A good solution has to be found, especially for corporate LAN environments with IMAP.
*** Bug 324797 has been marked as a duplicate of this bug. ***
please if you think about suppressing local folders, don't do it without a vote among all users of mozilla suite and seamonkey.
as somebody mention it, it is a way of archiving mail, mainly if the imap provider does not supports a big amount of storage (mine was 25 Mo, and is upgrading to 100 Mo)
in addition, a whole hierachy of folders can be created in local folders and can be copied anywhere (CD, remote shared folder, etc)

the option of being able to hide a folder if empty could be wise in my opinion
(some people become mad when they see any mess)
> the option of being able to hide a folder if empty could be wise in my opinion

We will be backporting "folder views" (aka favourite folders, bug 251296) from TB, which then makes this bug less of an issue, at least UI-wise.
By modifying prefs.js and removing Local Folders as in comment 18 & comment 34, wil result confusing IMAP copy operation. If you insist to disable Local Folders completely, try emptying everything in

NS_IMETHODIMP nsMsgAccountManager::GetLocalFoldersServer(nsIMsgIncomingServer **aServer)

and in:

NS_IMETHODIMP nsMsgAccountManager::CreateLocalMailAccount()


So it will be exactly as:

NS_IMETHODIMP nsMsgAccountManager::GetLocalFoldersServer(nsIMsgIncomingServer **aServer)
{

}

NS_IMETHODIMP
nsMsgAccountManager::CreateLocalMailAccount()
{

}

Then re-compile Thunderbird.
But I'm not guarantee it will works. Some operation like POP and Import might be complain.




Hmm, why won't the devs just think about an option within the "first start"-wizard which asks the user if he/she wants multiple accounts or only one to be controlled by Thunderbird and if it's the latter, don't create a Local Folders-node?

IMHO, either such an option or the capability of using Local Folders together with IMAP account(s) should be implemented..
http://kb.mozillazine.org/Local_Folders recommends using the MailTweak extension if you want to hide local folders, rather than editing prefs.js to remove all references to it.

http://journal.mozdev.org/mailtweak.html
But that would not actually remove it - and the prefs.js-way isn't bulletproof..

Additionally, hiding isn't the same as removing the Local Folders completely. ;)
QA Contact: nbaca
Target Milestone: Future → ---
Assignee: mail → nobody
Component: MailNews: Account Configuration → Backend
Product: SeaMonkey → MailNews Core
QA Contact: backend
bienvenu, it seems to me this will only ever be possible if a "per account" outbox is implemented. can you envision us ever getting there, or wanting to, given the costs of designing and coding?

from an enterprise POV (i.e. more a "this would be nice to have" for reasons like it takes space in my UI), comment 13 seems to me the most compelling reason to want to do something like this.  But my guess would be such installations would be few.
Blocks: 297793
Depends on: 23313
You can have an Outbox in one of the accounts and store all outgoing messages in it. I have it that way and never ever use Local Folders for anything.

I think it worked this way in NS4 and got migrated to Suite and TB. But the setup can still be done manually via prefs.js. So it is possible and worked for me for years on every version, just maybe unsupported officially.
Summary: Cannot remove local folders (having either IMAP or POP account) → Cannot remove local folders from Thunderbird UI (having either IMAP or POP account)
Severity: normal → enhancement

I'd have to look at other projects... but I think this request might just be the oldest open, unfixed issue that I'm tracking. 17 years ago I commented on this. Sorta special, huh?

Not sure there is any point to keeping a bug around that obviously no one is going to resolve.
There is also an extension to do this:
https://addons.thunderbird.net/en-us/thunderbird/addon/hide-local-folders/

There is also an extension to do this:
https://addons.thunderbird.net/en-us/thunderbird/addon/hide-local-folders/

Except this no longer works for TB68+, so we're back to square one.

All that would appear to be required is an option to hide the "Local Folders" from the Server pane.

+1 for being back to square one. Please re-consider this? Anyone?

Hey k-l-p, this is great news!

I gave it a go, but I have to admit I was slightly hesitant when TB warned me

It requires your permission to: Have full, unrestricted access to Thunderbird, and your computer

Is that really necessary? It seems a bit drastic. Do you have a public repository?

Hi Sebastian,
At the time being this cannot be avoided, otherwise it is not possible to achieve the goal of the Add-on.
Technically the Add-on uses a so called "Experiment API", and this API needs this - let's say - "total" permission.
I can confirm that my Add-on does not access your computer and only uses the access to Thunderbird to hide the "Local folders" entry.
The public repository is ATN itself: If you want to look into the code, just download the Add-on and rename it from .xpi to .zip.
Maybe the following discussion regarding the topic permission is also of interest to you: https://thunderbird.topicbox.com/groups/addons/Tc9a1303c15d0444d/permissions
Best Regards
C-E

Thanks for your response! I did have a look at the code and decided it does what it says on the tin. So I went ahead and installed it. Cheers!

It's just a matter of adding

user_pref("mail.server.server2.hidden", true);

or whatever server# mail.accountmanager.localfoldersserver points to

Thanks bisag79981 : just put it in user.js and local folder disappeared.

The advantage of
https://addons.thunderbird.net/de/thunderbird/addon/hide-local-folders-for-tb78/
is that you can easily switch the visibility of "Local Folders" on and off.

More flexible, okay, but certainly a lot less resilient and less easy to implement for multiple users.

And I don't need the switch.

I agree, if you never switch back, the Add-on provides no advantage.
However for most users it's much easier to install an Add-on compared to create a user.js file.

Severity: normal → S3

Bug 1817913 implemented hiding.
I don't think we would remove it more than that, since then if you later need such an account you're out of luck. It's also needed for various functionality (atm) like Outbox and as fallback when online folders are not available.

Status: NEW → RESOLVED
Closed: 3 months ago
Duplicate of bug: 1817913
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.