[Fwd: [imp] [Fwd: [Fwd: Error message of "Unable to retrieve quota" from IMP]]]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

Who can help me to solve the problem ?

Thanks !

Edward.
-------- Original Message --------
Subject: [imp] [Fwd: [Fwd: Error message of "Unable to retrieve quota" from IMP]]
Date: Sun, 05 Apr 2009 16:06:52 +0800
From: edwardspl@xxxxxxxxxx
To: IMP <imp@xxxxxxxxxxxxxxx>
CC: horde@xxxxxxxxxxxxxxx <horde@xxxxxxxxxxxxxxx>


Dear All,

Sorry, for the URL :
http://img4.imageshack.us/img4/1928/impquotafunction.jpg

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: 	edwardspl@xxxxxxxxxx
To: 	IMP <imp@xxxxxxxxxxxxxxx>
CC: 	horde@xxxxxxxxxxxxxxx <horde@xxxxxxxxxxxxxxx>



-------- Original Message --------
Subject: 	Error message of "Unable to retrieve quota" from IMP
Date: 	Sun, 05 Apr 2009 14:41:08 +0800
From: 	edwardspl@xxxxxxxxxx
To: 	IMP <imp@xxxxxxxxxxxxxxx>
CC: 	horde@xxxxxxxxxxxxxxx <horde@xxxxxxxxxxxxxxx>



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 :
[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.
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux