Author Topic: Disk Usage: Unknown - Although I do have support... (Revived)  (Read 8592 times)

Offline Scubes13

  • Jr. Member
  • **
  • Posts: 48
Disk Usage: Unknown - Although I do have support... (Revived)
« on: August 07, 2006, 01:01:00 AM »
Well, to fill everyone in - my particular server supports QUOTA support in IMAP, but it does not return any flag that tells the RC install that QUOTA support is enabled. So, in my case, RC displays a "Disk Usage: Unknown" by default.

I just installed the Beta 2 from scratch and realized that this was still the case, so I had to go in and redo the changes I had worked up previously so that Quotas were displayed. This used to be documented on the old forum, so I dug up a cached version of it and am now reposting for anyone who may fall into the same boat that I am in.

So, without further adieu, the old post(s):

-----------------------------

Hello all,

I am currently using the latest CVS version of RC.

I have logged in and checked to make certain I have QUOTA support in imap.

Quote
1 login klanders
1 OK LOGIN Ok.
2 GETQUOTA
* QUOTA "GETQUOTA" (STORAGE 32381 97657)
2 OK GETQUOTA Ok.

Whenever I log into round cube, I see "Disk Usage: unknown" at the bottom of every page.

(Later)

I checked iil_C_GetQuota in program/lib/imap.inc which was taken from ilohamail

I have run the command that it executes:

1 login klanders XXXXX
1 OK LOGIN Ok.
2 QUOTAROOT
2 NO Error in IMAP command received by server.
QUOT1 GETQUOTAROOT "INBOX"
* QUOTAROOT "INBOX" "ROOT"
* QUOTA "ROOT" (STORAGE 32381 97657)
QUOT1 OK GETQUOTAROOT Ok.

So, that works - yet I still do not see the quota in the Round Cube display.

I just also tested using ilohamail and I do see the correct quota displayed in ilohamail version 0.8.11-Stable.

Perhaps this will help in some way to track down my issue.

(Later)

Ok, so one of the guys found that one of the checks for Quota support were dorking with the display of the user's quota on our installation. He did the following to enable quota display on our Round Cube installation. He modified the "program/steps/mail/func.inc" and "program/include/rcube_imap.inc" files. The diffs are below. I am not sure that I included them here correctly. My first time doing so.

As I haven't really seen anyone else post about this, it may be a case where we are just the odd-balls.

WARNING
If you are NOT sure that your server supports QUOTA, do NOT apply this patch. This can break your installation and could crash your server if overloaded. Not to mention that it fills your error log pretty quickly.

*********** FUNC.INC ****************
Code: [Select]
diff -uN program/steps/mail/func.inc.bak program/steps/mail/func.inc
--- program/steps/mail/func.inc.bak   2006-05-15 23:21:40.000000000 -0400
+++ program/steps/mail/func.inc 2006-05-16 00:06:01.000000000 -0400
@@ -598,9 +598,10 @@
  // allow the following attributes to be added to the <span> tag
  $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));

- if (!$IMAP->get_capability('QUOTA'))
-  $quota_text = rcube_label('unknown');
- else if (!($quota_text = $IMAP->get_quota()))
+// if (!$IMAP->get_capability('QUOTA'))
+//  $quota_text = rcube_label('unknown');
+// else
+  if (!($quota_text = $IMAP->get_quota()))
   $quota_text = rcube_label('unlimited');

  $out = '<span' . $attrib_str . '>';
@@ -1481,4 +1482,4 @@
  }


-?>
\ No newline at end of file
+?>


*******RCUBE_IMAP.INC******
Code: [Select]
diff -uN program/include/rcube_imap.inc.bak program/include/rcube_imap.inc
--- program/include/rcube_imap.inc.bak 2006-05-16 00:04:30.000000000 -0400
+++ program/include/rcube_imap.inc   2006-05-16 00:05:04.000000000 -0400
@@ -1197,12 +1197,12 @@
  */
  function get_quota()
   {
-  if ($this->get_capability('QUOTA'))
-   {
+//  if ($this->get_capability('QUOTA'))
+//   {
    $result = iil_C_GetQuota($this->conn);
    if ($result["total"])
     return sprintf("%.2fMB / %.2fMB (%.0f%%)", $result["used"] / 1000.0, $result["total"] / 1000.0, $result["percent"]);
-   }
+//   }

   return FALSE;
   }
@@ -2087,4 +2087,4 @@
  return trim($output);
  }

-?>
\ No newline at end of file
+?>


Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #1 on: August 07, 2006, 08:54:29 AM »
I still prefer my old method of turning the quota on/off via the preferences... but seeing as I don't have a quota, I can't test this.
 
  

Offline Scubes13

  • Jr. Member
  • **
  • Posts: 48
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #2 on: August 07, 2006, 09:09:14 AM »
Being able to turn it on or off via preferences sounds nice and ideal. Do you have code for that?

My issue, however, was that the quota was never displayed by RC due to the check for quota support. I basically had to modify those files so that RC no longer did its check. Basically forcing a quota to be displayed. Anyways, you know that already based on our previous posts about it.

Kevin L.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #3 on: August 07, 2006, 10:47:57 AM »
No I don't have code unfortunately.... but maybe I'll look into hacking it once I get a few things on my desk cleaned off....
 
  

Offline Michel

  • Newbie
  • *
  • Posts: 1
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #4 on: August 23, 2006, 09:44:18 AM »
When I used the code above and I login with a unlimited-account, then I see:

Disk Usage: Unlimited

And thats right! A have unlimited space!!

But! When I login with a account with 25 MB-space (on the same server) I see:

Disk Usage: Unlimited

_________________________________________________

I've installed UebiMiau 2.7 to. And there I can see my qouta, without problems.



Offline Heritz

  • Jr. Member
  • **
  • Posts: 58
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #5 on: August 24, 2006, 05:25:13 PM »
Quote from: Michel
When I used the code above and I login with a unlimited-account, then I see:

Disk Usage: Unlimited

And thats right! A have unlimited space!!

But! When I login with a account with 25 MB-space (on the same server) I see:

Disk Usage: Unlimited

_________________________________________________

I've installed UebiMiau 2.7 to. And there I can see my qouta, without problems.

Same thing is happening to me. Pretty weird. Any ideas about it?
Heritz

Offline tickus

  • Newbie
  • *
  • Posts: 3
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #6 on: August 30, 2006, 12:26:41 AM »
I have support also and cant seem to get it to read anything other than unknown.

Offline calande

  • Jr. Member
  • **
  • Posts: 64
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #7 on: November 04, 2006, 05:55:26 PM »
Same problem here. On a 50MB account, I get "Disk usage: unlimited" :(

Offline calande

  • Jr. Member
  • **
  • Posts: 64
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #8 on: November 05, 2006, 05:01:39 PM »
How can I apply the above patch? Is there a program that does it?

Offline calande

  • Jr. Member
  • **
  • Posts: 64
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #9 on: November 05, 2006, 05:17:53 PM »
What can I do to remove this "Disk used" string? :-\

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #10 on: November 05, 2006, 05:54:46 PM »
Quote
How can I apply the above patch? Is there a program that does it?
No, not unless you use linux, then it's a command. Otherwise, you have to manually do it.

Quote
What can I do to remove this "Disk used" string?
Open the templates and remove the string....
 
  

Offline till

  • Jr. Member
  • **
  • Posts: 49
Re: Disk Usage: Unknown - Although I do have support... (Revived)
« Reply #11 on: February 20, 2008, 01:12:45 PM »
IMO, instead of applying a patch that assumes that there is QUOTA, apparently a fix in rcube_imap::get_capability() is need.

If anyone wants to track this down, please contact me on IRC.