Ability to disable an IMAP account without losing e-mail
Categories
(Thunderbird :: Account Manager, enhancement)
Tracking
(Not tracked)
People
(Reporter: robrwo, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [gs])
Comment 1•13 years ago
|
||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Comment 5•12 years ago
|
||
Updated•12 years ago
|
Updated•12 years ago
|
Updated•10 years ago
|
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Comment 12•9 years ago
|
||
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Comment 16•7 years ago
|
||
Comment 17•6 years ago
|
||
Comment 19•6 years ago
|
||
While the ".invalid" extension to the domain name may make the URL invalid, that does NOT make TBird stop trying to download from the email account. Not only is this a bad hack, it also doesn't work right anyway. I suppose you could look at host names when doing a mail check, and if the server name ends in ".invalid" you could just skip checking that account and move on to the next. But as it is, you still try connecting to an invalid address, and still return an error.
For that matter, if I even do something as simple as click on the 'Inbox' for an account marked with the .invalid, TBird will STILL try to check the account, and I notice it will try looking it up with the hostname WITHOUT the .invalid extension. So it isn't even handling the invalidated hostname correctly.
Comment 20•6 years ago
|
||
James,
can you confirm that you are adding '.invalid' to the end of the server name in the 'Server Name' field of the 'Server Settings' page when modifying account settings, and NOT just adding '.invalid' at the end of the account name in the 'Account Name' field on the 'Account Settings' page?
The Account Name is cosmetic. It will not affect the behaviour of the Thunderbird Client. You can set it to anything you like.
The Server Name field is what the client uses as the string to look up in DNS.
The behaviour you describe appears consistent with modifying the Account Name rather than the Server Name. I have checked with Wireshark on my system that when the server name is terminated with '.invalid', no query is sent to the DNS server for that string (although in my case it does try to look up a string terminated with '.invalid.lan', which, of course, fails.
Comment 21•6 years ago
|
||
This feature request addresses only a part of a bigger problem. The ultimate solution would be some sort of snapshots.
Comment 22•6 years ago
|
||
(In reply to bugzilla.via.forwarder from comment #20)
can you confirm that you are adding '.invalid' to the end of the server name in the 'Server Name' field of the 'Server Settings' page when modifying account settings, and NOT just adding '.invalid' at the end of the account name in the 'Account Name' field on the 'Account Settings' page?
I had thought that as well, so I had checked the IMAP hostname and confirmed it is correctly set with the .invalid extension. Still getting the popup error message.
under the "Server Settings" page for the old email account:
Server Name: imap.bestweb.net.invalid Port: 143
Now, just out of curiosity I looked at what it has in the prefs.js file. Apparently any server I have tried to disable now has two hostname entries:
user_pref("mail.server.server5.hostname", "imap.bestweb.net");
user_pref("mail.server.server5.realhostname", "imap.bestweb.net.invalid");
yet there's only one place in the settings screen to edit the hostname (which is the one showing up in prefs.js as "realhostname")
Comment 23•6 years ago
|
||
(In reply to James E. LaBarre from comment #22)
mail.server.server%.realhostname corresponds to the fully qualified domain name* of the server which hosts the account.
I was incorrect in saying the account name is cosmetic: it is the string passed to the email server to identify your account on the server, and so should not be modified. It is stored in mail.server.server%.name
mail.server.server%.hostname is used to identify the directory on your computer where mail for the associated account is stored.
If you look under SERVER settings at the 'Local directory', you will see the mail.server.server%.hostname used there. It shouldn't be changed in prefs.js
Having just checked with Wireshark, if you terminate the realhostname (which is the 'Server Name' in 'Server Settings') with '.invalid.' - that is with a final trailing dot, Thunderbird correctly does not send out a DNS query for <realhostname>.invalid.lan as the trailing dot indicates that the string is a fully qualified domain name, and not a relative domain name.
If I then move focus to a valid account and select 'Get All New Messages' from the Get Messages drop-down button, I do not get any error pop ups. If I select 'Get Messages', messages are downloaded for the account. If I move focus to disabled account and select 'Get All New messages', no error pop-ups are generated, but if I select 'Get Messages', I get an error pop-up for the account in focus.
As a result, I recommend disabling an account by adding a trailing '.invalid.' on the 'Server Name' in 'Server Settings'. Note the final dot. This stops Thunderbird sending out any DNS queries for the disabled account, and so long as the account is not in focus, for me at least, no error pop-ups are generated when I select 'Get All New Messages' at any time, or when I select 'Get Messages' when a valid account is in focus. It looks like very good practice for Thunderbird to give an error when 'Get Messages' is selected while an disabled account is in focus.
*I have not put the final dot on the FQDN of the server. It works for me without it. Having checked, it also works with the final dot that is, '.invalid.'.
Comment 24•6 years ago
|
||
Interesting theory, I thought it sounded reasonable. I tried adding the dot to the end of .invalid, and it still doesn't work right. I click on the old inbox for the retired account, and it still gives me the error popup.
So rather than continuing to do hacks that aren't working anyway, should just add a function already to mark an account as disabled, so that TB doesn't even bother looking to the server for it. It's been on the requested list for 15 years now, longer than my daughter has been alive. It's kind of like the "email scams" checker.
Comment 25•6 years ago
|
||
Someone high up the food chain has decided this is not necessary because they never needed it. It should not be hard to implement, just a checking of check this account or don't check it. In my case it is not IMAP but pop3. Only one machine needs to check most of the time, but my wife wants to refer to the old files on a more convenient main computer.
Comment 26•6 years ago
|
||
(In reply to James E. LaBarre from comment #24)
Interesting theory, I thought it sounded reasonable. I tried adding the dot to the end of .invalid, and it still doesn't work right. I click on the old inbox for the retired account, and it still gives me the error popup.
So rather than continuing to do hacks that aren't working anyway, should just add a function already to mark an account as disabled, so that TB doesn't even bother looking to the server for it. It's been on the requested list for 15 years now, longer than my daughter has been alive. It's kind of like the "email scams" checker.
Well, <it works for me>(TM). If you select the inbox of a retired account* and click on 'Get messages', it generates the error**. If you select the inbox of an active and working account and select 'Get Messages or 'Get All New Messages', I get no error pop-up. Why this is apparently different for you, I don't know. I hope you find a solution that meets your requirements.
*An account where '.invalid.' is added at the end of the domain name in the 'Server Name' field of the 'Server Settings' page of 'Account Settings'.
**It also does not generate a DNS query (as confirmed with Wireshark), which is good. So it appears that the code that Thunderbird (on Linux) uses to resolve the IP address from the server name is intelligent enough to recognise a FQDN terminating in .invalid. and behave as though an NXDOMAIN has been received. From a security POV, this is good behaviour, as using another nonexistent domain is susceptible to someone registering that domain and emulating a mail server thereby fooling your client into giving up your account name and possibly other information when your client attempts to log in to the server. The code (on Linux) never even sends out a DNS query.
Comment 27•6 years ago
|
||
(In reply to bugzilla.via.forwarder from comment #23)
I was incorrect in saying the account name is cosmetic: it is the string passed to the email server to identify your account on the server, and so should not be modified. It is stored in mail.server.server%.name
NO, account name should never be sent to any server. If you have proofs otherwise, please file a new bug.
mail.server.server%.hostname is used to identify the directory on your computer where mail for the associated account is stored.
Correct.
If you look under SERVER settings at the 'Local directory', you will see the mail.server.server%.hostname used there. >It shouldn't be changed in prefs.js
But you can change this directory to any other path and then it may not contain mail.server.server%.hostname.
mail.server.server%.hostname is used to internally reference the account/server, but is not tied permanently to the path of the local storage.
(In reply to bugzilla.via.forwarder from comment #20)
Now, just out of curiosity I looked at what it has in the prefs.js file. Apparently any server I have tried to disable now has two hostname entries:user_pref("mail.server.server5.hostname", "imap.bestweb.net");
user_pref("mail.server.server5.realhostname", "imap.bestweb.net.invalid");
This is correct. mail.server.server5.hostname will be used as the server hostname to contact, but if mail.server.server5.realhostname exists, it will take precedence. It is when you change the server hostname after account creation when mail.server.server5.realhostname will be created and differ from mail.server.server5.hostname, which never changes.
Comment 28•6 years ago
|
||
(In reply to :aceman from comment #27)
Thank you for the clarifications, aceman. And yes, I mixed up 'Account Name' and 'User Name'. Apologies.
Comment 29•6 years ago
|
||
I have at least 10 imap and some pop accounts active for testing and development. It would be nice to be able to selectively enable/disable them just to keep the imap.log halfway readable. But I also think a regular user would also find this useful. I know that Evolution client has this feature (but not sure it works).
Comment 30•5 years ago
|
||
I also would like to see the ability to temporarily disable/enable an account (like Evolution can). It can be very useful for testing and development work as noted by another user.
Comment 31•5 years ago
|
||
(In reply to Tony Whelan from comment #30)
I also would like to see the ability to temporarily disable/enable an account (like Evolution can). It can be very useful for testing and development work as noted by another user.
I have found that in server settings, if I disable "check for new mail at startup", "check for new mail every X minutes" and "immediately notify new mail" then the account is essentially disabled (no imap comm occurs) as long as you don't click on a folder in the account. For development and testing of my profile I have found this useful.
Comment 32•5 years ago
|
||
<quote>I have found that in server settings, if I disable "check for new mail at startup", "check for new mail every X minutes" and "immediately notify new mail" then the account is essentially disabled (no imap comm occurs) as long as you don't click on a folder in the account. For development and testing of my profile I have found this useful.</quote>
Not much use to have emails you can never refer to.
It seems I have gotten over the "check every time I ask for 'Get all new messages'" by using 0.0.0.0 as the mail server, at least I haven't seen the error message pop up in a while. Which is a good thing since TB leaks SO much memory these days I have to shut it down every few hours (if it's been running overnight, I have to shut it down and restart it before I can read or check mail).
But even with the "IMAP Server" for a disabled account set to 0.0.0.0, if I click on ANY folder in that disabled account, it tries to go out and check the email on the server again. I've shut off everything that seems to be trying to connect. And I notice it's looking for the actual name of the original IMAP server, not the "0.0.0.0" that I set in the account profile.
But all of this is hackery on top of hackery, upon hackery. This should be something as simple as a checkbox to say "This is a disabled account. don't try to connect at all". Then the application would see that switch and just skip over that account. Essentially it should see it the same as it would see the "Local Folders" section, as just local files not linked to anything.
Comment 33•5 years ago
|
||
Not much use to have emails you can never refer to.
My method in comment 31 does not preclude accessing any email stored locally or on the imap server. Even new ones will come in when you click on a folder that flags new messages like Inbox.
But even with the "IMAP Server" for a disabled account set to 0.0.0.0, if I click on ANY folder in that disabled account, it tries to go out and check the email on the server again. I've shut off everything that seems to be trying to connect. And I notice it's looking for the actual name of the original IMAP server, not the "0.0.0.0" that I set in the account profile.
I guess when you change the "realhostname" to 0.0.0.0 and tb can't find anything it tries the "hostname" instead. (Real host name is what you have most recently entered while hostname is what was originally used for the account.) If it's doing this I guess I am somewhat surprised.
Essentially it should see it the same as it would see the "Local Folders" section, as just local files not linked to anything.
A problem with a account-specific switch to disable all comm with imap server: If the user only stores headers locally, you couldn't access email bodies when the account comm is disabled. An option to first download messages like for going offline would be needed.
Comment 34•5 years ago
|
||
OK, I am going on the presumption that you have fully-synced email accounts. I'll end up doing that because of habits picked up from my days of dial-up, where you would retrieve mail and then log-off. Especially going back to my days of using TapCIS and CISOP (auto-downloaders for CompuServe).
So I'm guessing maybe we'd need a "Disabling extension" that could go through a profile and switch all the hidden settings to block TB from attempting to connect (or giving it an address it won't even try)? Of course, that would mean it would need to store the original settings, in the situation where someone would want to re-activate it (in my case, these are no longer active accounts).
I'm wondering just how many of my periodic lock-ups in TB are from TB trying to re-connect to dead accounts? (yes, it does that on multiple machines and dual-boot on the same machine; I've copied the profile over, with whatever tweaking to make the Linux profile work on MSWin).
Comment 35•4 years ago
|
||
If implemented in the way I suggested in bug 1647632 comment 1, I believe it would also resolve this issue as originally described.
Comment hidden (advocacy) |
Comment hidden (advocacy) |
Updated•2 years ago
|
Comment 43•4 months ago
|
||
I wonder if what we need here is a third category of email accounts called "ArchivedMail", along side of "Mail" and "ImapMail". Marking it as an Archive Account would move the account from Mail or ImapMail to ArchiveMail, and Thunderbird would know not to check them. All the rest of the settings could stay in place (for those people only temporarily setting these inactive).
I would think, programatically it would be simplest to have a checkbox in the account profile to say "Inactive Account", and would be the simplest for users than trying to manually munge the mail server settings. You could have a particular keyword in the server settings to say this account is inactive, but that still requires code to check if it's inactive anyway (the currently suggested hacks still don't always work, it's still possible to jave Thunderbird trying to check mail there)
Description
•