may be a silly answer.. Why don't you put the complete path of quota or grep command. I don't know exactly what kind of path apache could have. And if you use cyrus, get rid of all that. It's working directly!
Your version seems a little bit old, anyway. Don't expect too many answers Dom 2009/4/5 <[email protected]> > > > -------- Original Message -------- > Subject: Error message of "Unable to retrieve quota" from IMP > Date: Sun, 05 Apr 2009 14:41:08 +0800 > From: [email protected] > To: IMP <[email protected]> > CC: [email protected] <[email protected]> > > > > 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: > http://img124.imageshack.us/img124/1928/impquotafunction.jpg > > 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 : > [mana...@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 > [mana...@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. > > > -- > Horde mailing list - Join the hunt: http://horde.org/bounties/#horde > Frequently Asked Questions: http://horde.org/faq/ > To unsubscribe, mail: [email protected] > -- Dominique LALOT Ingénieur Systèmes et Réseaux http://annuaire.univmed.fr/showuser.php?uid=lalot -- IMP mailing list - Join the hunt: http://horde.org/bounties/#imp Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
