2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. | Help Search Members Calendar |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
thefusa |
Posted: Nov 10 2004, 10:44 AM
|
Member Group: Members Posts: 80 Member No.: 1017 Joined: 4-April 04 |
Hi,
I'm using XMAIL with Courier-Imap (smartpost) and IMP/HORDE as webmail I conntect IMP using Courier IMAP. I wish to use the IMP features of conf['hooks']['quota'] = 'imp_show_quota'; I configure the conf file of quota as follows: if (!function_exists('imp_show_quota')) { function imp_show_quota ($imp) { $quota_html = ''; $imap_admin = $imp['user']; $imap_passwd = Secret::read(Secret::getKey('imp'), $imp['pass']); $stream = @imap_open(IMP::serverString(), $imap_admin, $imap_passwd, OP_HALFOPEN); $quota = @imap_get_quota($stream, 'ROOT'); imap_close($stream); if (is_array($quota) && $quota['limit'] != 0) { $taken = $quota['usage'] / 1024.0; $total = $quota['limit'] / 1024.0; $percent = $taken * 100 / $total; if ($percent >= 90) { $class = 'quotaalert'; } elseif ($percent >= 75) { $class = 'quotawarn'; } else { $class = 'control'; } $quota_html = '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="item">' . '<table border="0" cellspacing="2" cellpadding="2" width="100%"><tr><td align="center" class="' . $class . '">' . sprintf("%.2fMB / %.2fMB (%.2f%%)", $taken, $total, $percent) . '</td></tr></table></td></tr></table>'; } return $quota_html; } } ************************************** It doesn't give me any errors but IMP doesn't show me the quota. So my question is: I've made an error in the config file? It's impossible to use the imp quota monitor with XMAIL/COURIER IMAP? Thanks for your help!! -------------------- www.pcmweb.it - Il portale che mancava!!!
|