Mail: Doesn't work when there are too many messages in the table

These are probably two bugs in one depending on how you read it.

Today I had to delete a bunch of emails I created for testing something, and so I logged into Usermin and set the user Mail messages to display per page 1000 for the inbox so I could delete as many emails as I could at once.

Fine. Worked.

I then set it to 10,000

I could not access the inbox anymore. Every time I tried to access the inbox the loading circle that shows before loading the mail would stay like that for an extended period of time. I waited even 30 minutes between tests.

Of course. It's way too many messages at once, no problem I said, so I will just change it back to something lower. Then it hit me !!!! You cannot access that setting again now.

With the new Authentic theme, the user settings to change that configuration was moved to a gear right on top of the Mail tab.

You see the problem here? The user is now locked out of his messages for good.

Why? Because he cannot access the uconfig.cgi?mailbox page. Since the inbox will does not load anymore, he needs to change the setting first and reduce the amount of messages per page, but he can't because that setting was moved right on top of the page that Mail in Inbox.

In the past with was not a problem, because that setting page was right there in the user settings section in the sidebar but since this was moved now to the frame, the user is locked out for good.

I was able to fix this quickly because I said, I will just load the url manually, change the settings.

But you can't open that url unless you change /etc/usermin/config

referers_none=0

So I changed that first. Then manually loaded the url uconfig.cgi? to change the settings and fixed it but for my surprise, loading the page directly (without the frame) actually does work with 10,000 messsages. Now I'm loading the inbox directly without the sidebar and I tested it again and again and it works. It takes a while but all the 10,000 messages are shown and I can delete them. I guess this will also work even with a higher number.

So there are two nasty bugs here.

  1. First, the Authentic theme loader has some sort of problem that will get stuck at XXX number of messages. It works with 1000, but eventually seems to be stuck at some higher number.

  2. If this happens, there is no way for the user to change the settings back, mail users don't have root access so they cannot modify the referrers config file like I did.

Solution: 1. Loading the inbox directly works with any amount of messages but with the sidebar in place it does not. I suspect there is something wrong with the ajax loading that doesn't accept a particular size or timeouts as opposed to loading the page directly without that ajax load.

  1. The user settings should not be there if you ask me. It should be somewhere in the side bar, because all those settings in the Gear Icon (uconfig.cgi) can potentially affect some settings that can stuck the user from loading the inbox again. Why is this in the inbox page in the first place???? It was in the sidebar before.

This is obviously a disaster if it happens to a user because he will then be locked out of his email messages for good (can't load the inbox anymore or access any messages) without any resort than contacting the administrator to fix this.

Status: 
Closed (fixed)

Comments

Ilia's picture
Submitted by Ilia on Thu, 04/20/2017 - 08:50

Title: Mail users can get locked out of their mails » Mail: Doesn't work when there are too many messages in the table
Status: Active » Needs work
Ilia's picture
Submitted by Ilia on Thu, 04/20/2017 - 08:55

Hi,

Yes, I agree. I don't change/improve old-mail experience, as I'm in the state of restarting its very initial stage of brand new development #431

I was distracted with multiple of other issues to fix and add to upcoming 18.4x releases.

Mail - is my next humongous priority to continue working with. I'm looking forward myself to have it finesse. It will be done just as that. It's complex and very time consuming but I'm restarting very soon.

FYI, users can change these preferences by editing the file .usermin/mailbox/config under their home directories.

Jamie you can't expect a regular user to find that out on his own before having to open a support ticket first, by that time you are better off fixing it yourself for the user. What I posted is an easy way, and probably something more than Email user will do and get locked out of his inbox.

If you research my bugs, I will also open by mistake one, saying the option to change user settings in Usermin was gone in Authentic. It was not a bug, because the option is on the gear icon. Then I read in the forums 2 other people at least asking where it was well.

So not only me but other people seem not to find the option, it's a bit hidden in terms of GUI usability, the logic also does not tell you to look in your inbox to change your user settings. For usability reasons, I would move it to the sidebar were all other options are.

For example, maybe when the user clicks on his username on the sidebar or just put a new Preferences option there. Not only its hidden in the Gear icon because that looks like a regular icon and not something you have to click but the issue I posted means if they cannot access the inbox for whatever reason they are also locked out of their inboxes.

So my suggestions are:

Move that option to the sidebar it will have the following benefits:

a) Users will find it easier.

b) The user can fix the above-posted scenario by just reverting the settings back

c) If his email inbox is broke internally for some reason in the server, he at least can still access the preferences

As for the other bug where the theme is stuck if you set anything over 1000 messages, that is clearly not a Usermin bug but an Authentic theme bug. I tested this several times, and while I'm not sure what the limit is (I guess it depends on the browser and Usermin server), I was able to load 10,000 messages several times and then even delete them in a bunch of 10,000. No problems, but I had to do this directly without using the Authentic theme.

So the loading bar seems to get stuck at some point and refuses to load the inbox if it's big or has to display to many messages simultaneously.

This is very easy to fix with just a few code changes.

Ilia's picture
Submitted by Ilia on Sat, 04/22/2017 - 06:49

c) If his email inbox is broke internally for some reason in the server, he at least can still access the preferences

I agree. Jamie, let list_combined_webmin_menu() for Webmail print Mail Configuration link that would go directly to uconfig.cgi?mailbox? I would put it above Manage Folders link.

DataTables seems to manage easily 10.000 rows if loaded properly. I will try to overcome the currently existing limitation when developing new mail.

@volk - you're correct, I don't expect normal users to find that file .. I only posted it as a work-around.

@Ilia - list_combined_webmin_menu should include a uconfig.cgi link already, although it is below the list of folders.

Ilia's picture
Submitted by Ilia on Sun, 04/23/2017 - 03:21

@JamieCameron oh, my. You're right, one or two things are missing there, including in System Information.

I will try fixing it as soon as I can.

Thanks.

Ilia's picture
Submitted by Ilia on Sun, 04/23/2017 - 14:14

Thanks to this report:

  1. Display of Disk usage and quota are fixed under virtual server owner account;
  2. Added Account Functions collapse to Usermin;
  3. Added Mail Preferences and Change Password links to the left menu in Usermin;
  4. Changed title from System Information to Account Information under Usermin

d335ce3

Ilia's picture
Submitted by Ilia on Sun, 04/23/2017 - 14:14

Status: Needs work » Closed (fixed)