Open Bug 312619 Opened 19 years ago Updated 1 month ago

feature request: per-account offline status

Categories

(Thunderbird :: Account Manager, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: alanjstein, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

(Keywords: design-needed, triaged)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

It seems there's no way to specify an account as offline or unavailable; it's
all or nothing.

I have multiple accounts set up, one work acct and a couple of gmail accounts.

When I'm at home, I want to set the work one to offline. If I don't, 
I get an "Alert: failed to connect to mail.foobar.com" popup every 
few minutes. I've looked carefully at every config setting and all the
bugs in the list, and although I cannot imagine I'm the first one to
suffer from this problem, I can't find it reported elsewhere.


Reproducible: Always
Replacing the "Can't connect to server" dialog with a non-modal way of telling
the user that certain mail servers aren't working would fix this.  I looked but
couldn't find a bug for that feature.

Example:

Instead of saying "Couldn't connect to server pop.gmail.com" the Thunderbird
status line displayed a red message saying "Couldn't get mail from account(s): work"

I have this problem too as one of my accounts is accessible only when I am
connected through a VPN.  I want it to check mail automatically, but I want it
to be quiet if it fails.
Duplicate/related to bug 388696.
Assignee: mscott → nobody
Confirming as a possible enhancement.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Almost five years later, numerous other bugs marked as duplicates and still no progress on this?

Everyone's comment seems to be "just turn off new mail checking" but that's not always sufficient.  Offline mode carries many other benefits, such as being able to view local copies of folders, compose messages to be sent when you return online, etc - things which would be good to have on a per-account basis as well as across the board.
Actually, I think it's fixed in Thunderbird 3.1 in the way that comment 1 suggests.
Unfortunatelny this does not resolve all issues. I sometimes use rather slow (mobile, gsm) internet connection, and it would be nice to tell "don't even try to check/synchronize gmail  account; use downloaded for offline messages. Only synchronize my work account."
Jim, it's not fixed in Thunderbird 11. I just had T-bird lock up under Windows 7, seemingly due to this issue; and it couldn't be killed, not even from Task Manager, nor could Windows shut down cleanly. I eventually had to power down my machine and reboot, ran chkdsk, and found corruption of the offline folders for my IMAP server. I've booted into Ubuntu 10.04, under which T-bird appears to be better behaved with offline IMAPs that it can't contact ...
Blocks: 689067
No longer blocks: 689067
Depends on: 689067
After 8 years, I would really appreciate that this is resolved in such a way that server access can be selectively switched on/off for each individual IMAP account. Any progress on this? Any intention to implement this in future versions? It would be a very valuable feature, as already explained well in the comments above.

Also, why does this depend on bug #689067 ? In my view, #689067 is a duplicate of this, it is also requesting the ability to selectively turn on/off IMAP server access.
(In reply to Thomas from comment #16)
> After 8 years, I would really appreciate that this is resolved in such a way
> that server access can be selectively switched on/off for each individual
> IMAP account. Any progress on this? Any intention to implement this in
> future versions? It would be a very valuable feature, as already explained
> well in the comments above.

I think the answer to your question is self evident by a reading of the comments to date.

> Also, why does this depend on bug #689067 ? In my view, #689067 is a
> duplicate of this, it is also requesting the ability to selectively turn
> on/off IMAP server access.

I don't have a clear recollection of why I didn't dup, and changed the dependency. I vaguely think it was a minor distinction I took from a reading of both bugs (perhaps disable vs offline), and wanted to keep both open for possibilities. But if others read and make it to be nothing more than a dupe, feel free to make the change.
For whatever it's worth, I can add another scenario to the list of reasons supporting this feature request. My business partners occasionally have to monitor each others' emails -- multiple accounts per partner. We'd love the simplicity of being able to just turn accounts on and off in TB.
This is definitely a problem (missing ability) with TB. I do not want to delete certain accounts in TB or attempt to connect to particular mailboxes for a few reasons that I have found:

1) During testing of website/email setups for clients
2) Site hosting transfer and my or my client's emails
3) While I try/test different configurations
4) Checking other people's emails on occasions (e.g. colleagues/groups/vacations)
5) Reducing cPanel process tasks for little needed accounts (IMAP connections don't stop on my shared server even without IDLE)

And all the reasons others have stated.

This IS the same as bug 689067.

There needs to be a specific IMAP option to deactivate on a per account basis. Simply going off-line for an account would not be something I'd trust probably due to the way I've seen TB go onff-line on it's own and the complications it would/might bring making accounts on-line again.   

Due to the lack of the ability to deactivate an account I have a couple of times managed to lock myself out of my entire hosting server (thanks to their keen and useful firewall!) due to one account repeatedly using the wrong credentials in just a short space of time. My IP was completely blocked from accessing any email accounts or websites.

It's so obvious that this is needed and yet it's been missing for years despite the definite need.

It's no good saying to just set it to never check, or not to click on it, particularly when in unified view it automatically tries to connect and even though as a workaround I have changed the mail server etc. to xxx.yyy.zzz to avoid the firewall lock outs, TB still throws up a "can't connect" error message whenever I click on Unified or the particular account in normal view when checking contents of any of its folders.

Long overdue, really annoying for several reasons, and I can't find a fix or workaround.
Thinking about this problem slightly further when I was about to delete the offending accounts that I would rather be marked as inactive, I realise maybe two further issues:

1) I think the inactive account is causing TB to show the swirling throbber icon for a long time because it can't complete it's intended process?

2) If I were to delete the accounts to stop error messages and the throbber icon, I can't use the folders to (locally) archive, draft or whatever via manual or automatic filters that I have setup for current email redirects/forwarders/filters. 

All these problems would be solved if I could just stop TB wanting to connect to something for certain accounts.

I can stop TB checking every few minutes and connecting on startup, but every time I click on any of the account's folders, it automatically connects (including unified view). This is what I need to stop.

Anyone know of a config hack? I can't find one.
Why nothing gets done about this? 9 to 10 years old? Many users requesting?
A per-account offline status would be useful in my case too.
I have a Thunderbird profile with a personal and professional email account.
If I ask Thunderbird to save password of both accounts, the next time I will connect to an account using a master password, it will unlock all the accounts where I saved passwords.
Then if I am at home connected to my personal email and I just want to read an email received some time ago in my professional email, Thunderbird will connect to the mail box and check for new mails, despite having unchecked "Check for new messages at startup", "Check for new messages every X minutes" and "Use IDLE command if the server supports it" (I am using IMAP).
This is a privacy problem because a company can see when I read my emails and even know my location through the IP address I connected.
If I keep only 1 password saved, this problem will not happen because I will be asked to enter the original email password and I can cancel the login.
I really need to save more than 1 password because the professional email password is too complicated to write by hand each time I connect and now with Thunderbird 38 there is the possibly to use OAuth2 password with Gmail that will generate a strong key that you can save.
This bug has been reported 10 years ago and is annoying several users for different reasons, it should be fixed as priority in the next Thunderbird, please.
I also would very much appreciate if this feature (temporarily disabling IMAP accounts) could be implemented.
Chiming in, this would be a very helpful improvement. I know that Thunderbird doesn't get so much development anymore, but it would be nice if they could get around to some of these small and highly requested features.
What if,
* We have account level boolean pref that stores account disabled/enabled status.
* Even if the account is disabled, we'll show it in the folder pane to allow users to go through the account folders and messages. It's just that we won't contact the remote server.
** Maybe we'll grey out the account name in the pane or append `(disabled)` to it.
* It seems for this to be done, we'll have to retrieve all the accounts from c++ code so that remains unaltered and we can handle this filtering in JS code itself. (Possible points: get messages, get all messages, auto check server for new messages, check at startup).

Please let me know your thoughts on this.

Thanks.
Flags: needinfo?(richard.marti)
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(acelists)
Yes, something like that.
Flags: needinfo?(mkmelin+mozilla)
We have already greyed feeds when they are paused. So this makes sense.
Flags: needinfo?(richard.marti)
Yes, the 'disabled' would be a property (attribute in .idl) of the account (server) and we would need to obey this in some of the actions that try to hit the server online.
Flags: needinfo?(acelists)

(In reply to Suyash Agarwal (:sshagarwal) from comment #26)

What if...

Are you offering to implement? :)

Flags: needinfo?(syshagarwal)

This has been going on for 14 years now - surely someone can implement this without a lot of work? seems like a fairly simple idea, just skip the account when checking email.
What is holding this up? Is it a complex problem? or is it that developers are not interested? Can someone shed some light on this?
If it does get implemented please make it a feature for ANY email account in TB not just IMAP.

See Also: → 1132422

I would like to work on this. Please assign this to me. I would definitely complete this ASAP and push the PR. This is my first contribution to Mozilla and would be delighted to work on this.

Somu - glad to hear you're interested in helping. This bug is fairly involved, and not easy to tackle as a first contribution.

That said, if you want to go ahead and submit a patch for it, go ahead, and I'll assign it to you then.

Somu - I was wondering if you could post a status on your attempt to address this issue? Is there anything I can do to help? My expertise is in C with not too much c++ but if I can help I'm willing to do so.

This should be closed as 'developers not interested'

Eric, Somu seems to be gone. Are you willing to work on it?
Comment 26 lists some of the key items.

Flags: needinfo?(syshagarwal) → needinfo?(erbenton)

I would do it in a heartbeat if i had the skills. My expertise is in plain old C. There are 3 or 4 things I'd love to add to TB but the programming language is the barrier

Flags: needinfo?(erbenton)

Eric, we'd love to have you help out. Let me know if there's something you need help with to get started. Going from C to JavaScript may be easier than you think too.

I'll take a look at it, I cant promise anything but I'll certainly take a peek and see if its doable for me.
Is there an official git repo or someplace I should download the source from? Any pre-req's I need to make the unaltered source compile properly?

The best place to start is https://developer.thunderbird.net/the-basics/getting-started which should have all info you need.

I ran into a problem I cant figure out how to solve.
:25.84 config/external/icu/common
0:25.86 error: failed to run custom build command for baldrdash v0.1.0 (source/js/src/wasm/cranelift)
0:25.86 Caused by:
0:25.86 process didn't exit successfully: source/obj-x86_64-pc-linux-gnu/debug/build/baldrdash-48a5573b3680cb59/build-script-build (exit code: 101)
0:25.86 --- stdout
0:25.86 cargo:rerun-if-changed=baldrapi.h
0:25.86 cargo:rerun-if-changed=source/obj-x86_64-pc-linux-gnu/js/src/rust/extra-bindgen-flags
0:25.86 --- stderr
0:25.86 thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:999:5

libclang is installed:
/usr/lib/libclang.so.6
/usr/lib/libclang.so.6.0
/usr/lib/libclang.so.7
/usr/lib/libclang.so.8
/usr/lib64/libclang.so.6
/usr/lib64/libclang.so.6.0
/usr/lib64/libclang.so.7
/usr/lib64/libclang.so.8

Any ideas as to what might be going on there?
I tried ./machclobber followed by ./mach bootstrap and it appears tere is an issue with my OS:
NotImplementedError: Bootstrap support for this Linux distro not yet available: openSUSE Tumbleweed
Could this be the root cause of my errors?

Ha! Posting errors always causes me to find a fix! I dug around and found a patch for './mach bootstrap' , now it seems to be building, its well past the failure point from before. I don't know why the patch wasn't already in there but it wasn't.

I was having a look at this, but it is not exactly clear to me what behaviour we want to get. In particular the way this relates to the current binary offline/online option:

  1. Should this option be removed? (Clear behaviour, but you have to turn every account on/off manually to switch.)
  2. Should this option be kept as a shorthand to set all accounts to online/offline easily? (The option would then become tristate and we'd need a new icon for the case that some accounts are offline, and others online.)
  3. Should this option be kept in addition to the new per-account options? I.e., if we are globally offline, nothing is synced, and if we are globally online, only those accounts that are online are synced. (This seems the most powerful, but at the same time it's hard to communicate the current status clearly in the UI. And there would be no easy way to set everything online.)

I also had a look at the implementation. This is my first time working on thunderbird (but I have fiddled around in SpiderMonkey before), so I could use some pointers to where things should be implemented, if anybody has time to help out.

I found the MailOfflineMgr in mail-offline.js, which will need to be adapted regardless of how the global offline/online option is changed. But this class hooks into Services to disable all network traffic, it seems to me. This approach is not possible when we selectively set accounts offline: some connections must be closed, others must remain open. So where should this be done, and via which API?

Also, comment #29 talked about a property in a *.idl file; which file is this?

Many thanks for your time.

Flags: needinfo?(mkmelin+mozilla)

Maybe I have a simple view of things, but to me the solution is quite straight forward:
When creating an account, the account settings page would have a check box (at the top of the page) to disable the account, it would, by default, be unchecked. All the check box would do is set a flag in memory (e.g a class bool variable), when checking accounts for mail, if the flag is set for the account, skip it. You probably should also include some sort of visual indicator that the account is disabled, either put the name in orange or add a 'x' next to it in the accounts list on the left sidebar or some such thing. The checkbox state would also need to be saved in the rc file or wherever TB stores those things it wants to remember at next startup.
This at least would get things rolling and more involved changes could be addressed later on

(In reply to Eric Benton from comment #45)

Have you looked at the implementation of the current global offline/online setting? It may be a bit more complicated than you think. See my previous comment. Also, in my view, it is better to get the relation to the current global setting right at the first time as this is a user-facing change. The UI on which you write is the least of my concerns.

Note - this is a much requested feature in support forums (not reflected in the votes of this bug of course)

Thanks for offering to look at this.

Possible duplicates / related bugs in https://mzl.la/2Olj1x4 - to cite a few :

  • Bug 546553 - default setting for do Not check for new emails at startup does not work
  • Bug 636174 - Need ability to disable contacting server (TB presents "Add security exception" dialogue for inactive account)
  • Bug 689067 - Ability to disable an IMAP account without losing e-mail. (currently cited as a blocker to this bug)
  • Bug 563334 - Implement pref and UI to exclude account from "Get All New Messages" poll: Cannot disable checking of obsolete account

(In reply to Camil Staps from comment #44)
Thanks for considering looking a this bug. It is likely hard to take one as a first bug however.

The current online/offline needs to remain. The per account could be either a third state (applying just to a particular account), or maybe it could make more sense to have it called something different.

Flags: needinfo?(mkmelin+mozilla)

(In reply to Camil Staps from comment #46)

(In reply to Eric Benton from comment #45)

Have you looked at the implementation of the current global offline/online setting? It may be a bit more complicated than you think. See my previous comment. Also, in my view, it is better to get the relation to the current global setting right at the first time as this is a user-facing change. The UI on which you write is the least of my concerns.

If the account is disabled its not going to be able to send or receive mail. Whatever happens in global offline will (or should not) have any effect on a disabled account. A disabled account can neither send nor receive nor compose mail (but reading mail ought to be allowed) regardless of the Global Offline setting, when an account is disabled you just cant ask it to check mail or compose mail, it wont do anything if you do because its disabled. I suppose one would also need to prohibit composing mail for a disabled account because its disabled.
What "disable account" does for people is to save them from having to delete an account just to have it stop getting mail, they want to temporarily disable it for whatever reason but not lose the accounts emails.
This idea has been over thought or just ignored for a decade and a half! and still has no implementation. If you are capable of programing something up then please do, perfection is the enemy of good enough. I looked at the code but one thing i cant figure out is how to create a checkbox and respond to the check/uncheck events. How do you define a function to be called when the checkbox changes state? that sort of thing i just couuldnt determine while reviewing the code. I would also change the font color on the account name to show its disabled

(In reply to Eric Benton from comment #50)
If you look at the use cases described above and in the linked bugs, people want to be able to compose mail and send it when re-enabling the account. What you describe is but one use case.
Also, again, the UI is the least of my concerns at this point.

(In reply to Magnus Melin from comment #49)
Thank you for the clarification. I realise this bug is quite involved - to hopefully give you some trust that I might be capable of it: I did tackle this long-standing issue https://gitlab.com/gitlab-org/gitlab-foss/issues/20137, which was in a code base and a language I hadn't worked with before. Nevertheless, I could use some help with the architecture. If you/others don't have the time for that, I completely understand, but then I unfortunately won't be able to look into this.

Ideally I could use some pointers as to which files I should touch and where this functionality should be implemented. If you know of a similar feature in terms of which code paths it affects, that would be very helpful too, as I could then trace that feature through the source to better understand which files to work on (but I already looked at this myself from a user's perspective and could not really identify such a feature).

Flags: needinfo?(mkmelin+mozilla)

Great! Show us what you've got :)

It will require some research exactly where code need to be added/adjusted. Probably in a few different places - I imagine you'll start to find more once you've handled these: see nsIMsgIncomingServer.idl - nsIMsgIncomingServer.getNewMessages: https://searchfox.org/comm-central/search?q=getNewMessages&case=false&regexp=false&path=.cpp

Potentially some of it can be traced down to places that check for offline, especially in IMAP code. Maybe this will be relevant: https://searchfox.org/comm-central/search?q=MsgOfflineManager&case=false&regexp=false&path=

Sorry for the vague references, it's really not that clear exactly where such checks should be. You'll have to experiment a bit.

Flags: needinfo?(mkmelin+mozilla)

If you are just preserving accounts that have been deleted from the server changing the server name to localhost makes this a little bit less annoying. Instead of the modal window that I was previously getting that I had to manually dismiss i not just get a notification that the connection was refused.
This won't help people who want an easy way to flip an account on/off. But if you like me don't expect the account to be able to connect again this change helps a little bit.
Also this conversation would also fit so well on this thread - https://i.redd.it/g42qmpnunya51.jpg

this isn't a mozilla run project - https://www.thunderbird.net/en-US/about/

Focus on other things combined with lesser user interest in this type of capability compared to other requests. No can't predict when the priority may change.

To me, it seems is those simple/obvious features aren't implemented, then more people get fed up and move away from TB, and then less people ask for those particular features (especially when they never get addressed) then inevitably those features won't get asked for as much and then TB falls into a overall spiral of downward adoption.

Each year and evolution of TB that goes by, I see various "new" so-called methods of useabity added that somehow break, corrupt and limit my well-established UX workflows. Sometimes I wonder why I'm still with TB. I still like it for configurability, but for each so-called visual or streamlining 'advance' TB makes, it takes me a lot of effort to tweak TB back into functionality.

As a user of quite a few email accounts where I often have to set up additional ones for various client workflow and testing purposes, it is a real pain that I can't just simply deactivate some and instead have to resort to completely removing them from an otherwise well-honed TB config for each and every email account. A nice little checkbox somewhere in the account settings to pause or archive an account would be so wonderful and it seems it would be such an easy thing to add surely?

(In reply to mrartist from comment #61)

A nice little checkbox somewhere in the account settings to pause or archive an account would be so wonderful and it seems it would be such an easy thing to add surely?

It can not be implemented at all until bug 689067 is fixed. Without a full understanding of what is required it is always simple to ask for "just a little box asking". This is actually a reasonably complex issue and while it would be nice may still be aways off. Personally, I have a lot of things I think are more important to Thunderbird like operating system integration, Reliable MAPI compliance, profile import and export, address book import and export in a native file format and much much better error reporting. So I understand where you are coming from, but it will not be hastened by evangelising.

Restrict Comments: true
Severity: normal → S3
Duplicate of this bug: 1827823
Restrict Comments: false
Duplicate of this bug: 1853561
Duplicate of this bug: 1764559
Duplicate of this bug: 1837387

From bug 1647632 comment 6:

A user at Fosdem asked for this ability.
There's a workaround that can be achieved in a few steps in the Account Settings:
Uncheck all Server settings "Check for new messages..." options.
In Synchronization & Storage uncheck the Message Synchronization option.
That should theoretically prevent any active server syncing and message downloading, but still keep the account active without being deleted.
As we're not gonna focus on the Account Settings this year, this is an option we want to implement next year during the rebuild of the settings.

Note however, the workaround is not 100% solid in practice, because accounts can still get polled by various get new message in the unified toolbar which act on all accounts, and perhaps other functions. This is documented in other bug reports.

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