<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear All,<br>
<br>
Who can help me to solve the problem ?<br>
<br>
Thanks !<br>
<br>
Edward.<br>
-------- Original Message --------
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th align="right" nowrap="nowrap" valign="baseline">Subject: </th>
<td>[imp] [Fwd: [Fwd: Error message of "Unable to retrieve quota"
from IMP]]</td>
</tr>
<tr>
<th align="right" nowrap="nowrap" valign="baseline">Date: </th>
<td>Sun, 05 Apr 2009 16:06:52 +0800</td>
</tr>
<tr>
<th align="right" nowrap="nowrap" valign="baseline">From: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo">edwardspl@ita.org.mo</a></td>
</tr>
<tr>
<th align="right" nowrap="nowrap" valign="baseline">To: </th>
<td>IMP <a class="moz-txt-link-rfc2396E" href="mailto:imp@lists.horde.org"><imp@lists.horde.org></a></td>
</tr>
<tr>
<th align="right" nowrap="nowrap" valign="baseline">CC: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:horde@lists.horde.org">horde@lists.horde.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:horde@lists.horde.org"><horde@lists.horde.org></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Dear All,
Sorry, for the URL :
<a class="moz-txt-link-freetext" href="http://img4.imageshack.us/img4/1928/impquotafunction.jpg">http://img4.imageshack.us/img4/1928/impquotafunction.jpg</a>
Thanks !
Edward.
-------- Original Message --------
Subject: [imp] [Fwd: Error message of "Unable to retrieve quota" from IMP]
Date: Sun, 05 Apr 2009 14:55:18 +0800
From: <a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo">edwardspl@ita.org.mo</a>
To: IMP <a class="moz-txt-link-rfc2396E" href="mailto:imp@lists.horde.org"><imp@lists.horde.org></a>
CC: <a class="moz-txt-link-abbreviated" href="mailto:horde@lists.horde.org">horde@lists.horde.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:horde@lists.horde.org"><horde@lists.horde.org></a>
-------- Original Message --------
Subject: Error message of "Unable to retrieve quota" from IMP
Date: Sun, 05 Apr 2009 14:41:08 +0800
From: <a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo">edwardspl@ita.org.mo</a>
To: IMP <a class="moz-txt-link-rfc2396E" href="mailto:imp@lists.horde.org"><imp@lists.horde.org></a>
CC: <a class="moz-txt-link-abbreviated" href="mailto:horde@lists.horde.org">horde@lists.horde.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:horde@lists.horde.org"><horde@lists.horde.org></a>
Dear All,
Mine is Linux FC6 ( Include Apache Web Server ), WebMail Client ( IMP
4.1.5, Horde 3.1.5 ).
The Quota display function can't be good for work as the following link:
<a class="moz-txt-link-freetext" href="http://img124.imageshack.us/img124/1928/impquotafunction.jpg">http://img124.imageshack.us/img124/1928/impquotafunction.jpg</a>
For our config setting:
horde/imp/config/servers.php
$servers['cyrus'] = array(
'name' => 'Mail Server',
'server' => 'xxx.xxx.xxx.xxx',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'maildomain' => 'xxx.xxx.xxx',
'smtphost' => 'xxx.xxx.xxx.xxx',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
'quota' => array(
'driver' => 'command',
'params' => array(
'quota_path' => '/usr/bin/quota',
'grep_path' => '/bin/grep'
)
),
);
command.php :
function IMP_Quota_command($params = array())
{
$this->_params = array(
'quota_path' => 'sudo quota',
'grep_path' => 'sudo grep',
'partition' => null
);
$this->_params = array_merge($this->_params, $params);
}
function getQuota()
{
$imap_user = $_SESSION['imp']['user'];
if (empty($this->_params['partition'])) {
$passwd_array = posix_getpwnam($imap_user);
list($junk, $search_string, $junk) = explode('/', $passwd_array['dir']);
} else {
$search_string = $this->_params['partition'];
}
$cmdline = $this->_params['quota_path'] . ' -u ' . $imap_user . ' | ' .
$this->_params['grep_path'] . ' ' . $search_string;
exec($cmdline, $quota_data, $return_code);
if (($return_code == 0) && (count($quota_data) == 1)) {
$quota = split("[[:blank:]]+", trim($quota_data[0]));
$blocksize = $this->blockSize();
return array('usage' => $quota[1] * $blocksize,
'limit' => $quota[2] * $blocksize);
}
return PEAR::raiseError(_("Unable to retrieve quota"), 'horde.error');
}
sudo ( sudo-1.6.8p12-10 ) :
Host_Alias MH= itahost1
User_Alias WEB = nobody
Cmnd_Alias WEBADMIN = /usr/bin/quota, /bin/grep
WEB MH = NOPASSWD: WEBADMIN
Under the Linux ENV :
[manager@svr1 ~]$ sudo quota -u edward
Disk quotas for user edward (uid 500):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda2 1720 0 10240 1 0 0
[manager@svr ~]$ ls -l -h /var/spool/mail/edward
-rw------- 1 edward mail 1.7M Apr 5 14:30 /var/spool/mail/edward
So, what config mistake I have ?
Would you mind to help to solve the problem of "Unable to retrieve quota" ?
Thank !
Edward.</pre>
</body>
</html>