Class IMP_Quota_command

Description

Implementation of the Quota API for IMAP servers with a unix quota command.

This requires a modified "quota" command that allows the httpd server account to get quotas for other users. It also requires that your web server and imap server be the same server or at least have shared authentication and file servers (e.g. via NIS/NFS). And last, it (as written) requires the POSIX PHP extensions.

You must configure this driver in horde/imp/config/servers.php. The driver supports the following parameters: 'quota_path' => Path to the quota binary - REQUIRED 'grep_path' => Path to the grep binary - REQUIRED 'partition' => If all user mailboxes are on a single partition, the partition label. By default, quota will determine quota information using the user's home directory value.

$Horde: imp/lib/Quota/command.php,v 1.11.10.17 2009/01/06 15:24:11 jan Exp $

Copyright 2002-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.

Located in /lib/Quota/command.php (line 28)

IMP_Quota
   |
   --IMP_Quota_command
Method Summary
 IMP_Quota_command IMP_Quota_command ([array $params = array()])
 void blockSize ()
 mixed getQuota ()
Variables

Inherited Variables

Inherited from IMP_Quota

IMP_Quota::$_params
Methods
Constructor IMP_Quota_command (line 35)

Constructor

IMP_Quota_command IMP_Quota_command ([array $params = array()])
  • array $params: Hash containing connection parameters.
blockSize (line 54)

Get the disk block size, if possible.

We try to find out the disk block size from stat(). If not available, stat() should return -1 for this value, in which case we default to 1024 (for historical reasons). There are a large number of reasons this may fail, such as OS support, SELinux interference, the file being > 2 GB in size, the file we're referring to not being readable, etc.

void blockSize ()
getQuota (line 73)

Get quota information (used/allocated), in bytes.

  • return: An associative array. 'limit' = Maximum quota allowed 'usage' = Currently used portion of quota (in bytes) Returns PEAR_Error on failure.
mixed getQuota ()

Redefinition of:
IMP_Quota::getQuota()
Get quota information (used/allocated), in bytes.

Inherited Methods

Inherited From IMP_Quota

 IMP_Quota::IMP_Quota()
 IMP_Quota::factory()
 IMP_Quota::getMessages()
 IMP_Quota::getQuota()
 IMP_Quota::singleton()

Documentation generated on Sun, 30 Jan 2011 05:28:09 +0000 by phpDocumentor 1.4.3