[Tickets #8892] Quota
bugs at horde.org
bugs at horde.org
Mon Mar 1 00:14:24 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8892
------------------------------------------------------------------------------
Ticket | 8892
Created By | mtecles at biof.ufrj.br
Summary | Quota
Queue | IMP
Version | 4.3.6
Type | Enhancement
State | New
Priority | 1. Low
Milestone |
Patch | 1
Owners |
+New Attachment | quotaIMP.zip
------------------------------------------------------------------------------
mtecles at biof.ufrj.br (2010-02-28 19:14) wrote:
Based on the my experience, users tend to keep messages on the INBOX.
The bigger the quota, the bigger the INBOX file, with performance hit.
In the other hand, messages are documents that must be filed.
I use two different devices (file systems) with quota enabled. This
allows different
quotas for INBOX and IMAP folders, resulting better organization,
administration
and performance if INBOX quota is lower than IMAP folders quota.
This describes enhancements to IMP quota that can be configured to use
one or two different devices (file systems). If using two devices, one
is for INBOX
and the other is for IMAP folders.
Tested on Debian 5.02.
Modifications
File Function(s) Patch file
imp/lib/Quota/command.php IMP_Quota_command, getQuota quotacommand.txt
imp/lib/Quota.php getQuota, getMessages qQuota.txt
imp/lib/IMP.php quota, quotaData quotaIMP.txt
Configuration file examples
servers1.txt, servers2.txt
Descriptions
command.php, function IMP_Quota_command accepts 2 new parameters:
'dev_inbx' => User´s INBOX file system device - REQUIRED
If you have INBOX and IMAP folders in the same
device, use ONLY this parameter.
If you have INBOX and IMAP folders in different
devices and quota enabled on them you MUST use
'dev_fldrs' parameter also.
Usually device to: /, /var/mail, /var/spool/mail
Examples: '/dev/hda6', '/dev/sdb2', '/dev/md2',
'/dev/mapper/VOL1-VarM'
'dev_fldrs' => User´s home file system device - OPTIONAL
Use only if you have INBOX and IMAP folders in
different devices and quota enabled on them.
For IMAP folders. Usually device to: /home
Examples: '/dev/hda7', '/dev/sda3', '/dev/md1',
'/dev/mapper/VOL2-Home'
Obsolete parameters: grep_path, partition
command.php, function getQuota:
1- @return mixed An associative array.
'soflimithome' = Maximum quota allowed in dev_fldrs
'usagehome' = Currently used portion in dev_fldrs
'soflimitvar' = Maximum quota allowed in dev_inbx
'usagevar' = Currently used portion in dev_inbx
Returns PEAR_Error on failure.
2- Now it executes 'quota -wu user' instead of 'quota -u user'. Volume device
names are long and would break quota output lines. Output may have 1
to 4 lines.
3- Function now takes care of exceeded quotas, quota not defined for that user
and if it is using one or two file systems (dev_inbx, dev_fldrs). If using
only dev_inbx then 'usagehome' => -1, 'soflimithome' => -1.
Quota.php, function getQuota now returns:
* @return mixed An associative array.
* 'limit...' = Maximum quota allowed
* 'usage...' = Currently used portion of quota (in bytes)
* 'limithome' and 'usagehome' for dev_fldrs (mail folders)
* 'limitvar' and 'usagevar' for dev_inbx (INBOX)
Quota.php, function getMessages:
New messages (dev_inbx and dev_fldrs, long and short):
Alerts quota exceeded, grace time or expired;
Alerts almost full;
Normal quota information.
IMP.php, function quota takes care of using one or two file systems
(dev_inbx, dev_fldrs) to show quotas.
IMP.php, fucntion quotaData takes care of using one or two file systems
(dev_inbx, dev_fldrs). New information scale:
quota >= 100%, quotaalert. Alerts quota exceeded, grace time
or expired;
90% <= quota < 100%, quotaalert. Alerts almost full;
75% <= quota < 90%, quotawarn;
quota < 75%, control.
Thank you,
Mauricio Tecles
More information about the bugs
mailing list