[imp] mailbox quota

Mohamed Eldesoky m.eldesoky at tedata.net
Thu Oct 16 02:04:33 PDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You put it in the imp/config/conf.php file
Just in the quota function hooks.

Just note that I am using IMP 3.0
If you have the same version, you will find it in that file, otherwise, put it 
somewhere else, it is portable for sure.

Peter, what is your problem ??

Regards

On Thursday 16 October 2003 9:23 am, Tomáš Macek wrote:
> Where did you put this pice of code? (please send me file,line).
> Thanks!!
>
> On Wed, 15 Oct 2003, Mohamed Eldesoky wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > This is how I solved it
> >
> > ____________________________________________
> >
> > if (!function_exists('imp_show_quota')) {
> >     function imp_show_quota ($imp) {
> >         $quota_html = '';
> >         $host="YOUR MAIL SERVER";
> >         $port = 143;
> >         $user = $imp['user'];
> >         $pass = Secret::read(Secret::getKey('imp'), $imp['pass']);
> >         $fp = fsockopen ($host, $port, $errno, $errstr);
> >         if (!$fp)
> >         {
> >                 die("Error: contact your systems administrator\n");
> >         }
> >         else
> >         {
> >
> >                  // send username and read response
> >                         fputs ($fp, "123 login $user $pass\n");
> >                          // send password and read response
> >                         $ack = fgets($fp, 50);
> > 			fputs ($fp, "123 GETQUOTAROOT inbox\n");
> >                         fgets($fp, 150);
> >                         $status = fgets($fp, 150);
> >                         fputs ($fp, "123 logout\n");
> >                 $stor = strstr($status, '(');
> >                 $arr = explode(" ", $stor);
> > 		$taken   = $arr[1];
> >                 $total   = $arr[2];
> >                 $percent = $taken * 100 / $total;
> >                 if ($percent >= 90) {
> >                  $class = 'quotaalert';
> >                 } elseif ($percent >= 75) {
> >                         $class = 'quotawarn';
> >                 } else {
> >                  $class = 'control';
> >                 }
> >
> >                 $quota_html = 'YOUR HTML';
> >                                    }
> >          return $quota_html;
> >      }
> >
> > ________________________________________________
> >
> > On Tuesday 07 October 2003 4:46 pm, Peter Mueller wrote:
> > > ok, i take this, but nothing appears. in the script the value of
> > > $imap_admin and $imap_passwd are ok. but under $stream the value
> > > "Resource id #77" appears. is this correct or where could the problem
> > > are?
> > >
> > > with regards
> > > peter
> > >
> > > Zitat von Mark Toomey <mark at fcs.uga.edu>:
> > > > On Mon, Oct 06, 2003 at 11:03:20PM +0200, Peter Mueller wrote:
> > > > > we have courier imap. how we can do that in this way?
> > > > >
> > > > > with regards
> > > > >
> > > > > peter
> > > >
> > > > You can start with http://tinyurl.com/q0n1 and google from there.
> > > >
> > > > > Zitat von Mark Toomey <mark at fcs.uga.edu>:
> > > > > > On Mon, Oct 06, 2003 at 05:17:28PM +0200, Peter Mueller wrote:
> > > > > > > hi
> > > > > > >
> > > > > > > is there a way, that we can show the mailbox-quota with imp.
> > > > > > > the sudo
> > > > > >
> > > > > > doesn't
> > > > > >
> > > > > > > functioned in our system (with plesk).
> > > > > > > in imp for each email it will show the quota. is it possible,
> > > > > > > that we
> > > >
> > > > can
> > > >
> > > > > > show
> > > > > >
> > > > > > > the quota for the folder (in the same way)?
> > > > > > >
> > > > > > > with regards
> > > > > > >
> > > > > > > peter
> > > > > >
> > > > > > Peter,
> > > > > >
> > > > > > You can do stuff using Courier IMAP, but if you're using U of
> > > > > > Washington IMAP you can follow this fellow's directions:
> > > > > >
> > > > > > http://tinyurl.com/px9d
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Mark Toomey, Systems & Network Manager
> > > > > > Family & Consumer Sciences, UGA
> > > > > > mark at fcs dot uga dot edu: Yahoo IM: mark_toomey
> > > > > > Owner: USG-TECH & COOLTECH Listservs
> > > > > > voice:706-542-4738 - fax:706-542-4168
> > > > > > Linux: The Power of Choice
> > > >
> > > > --
> > > >
> > > > Mark Toomey, Systems & Network Manager
> > > > Family & Consumer Sciences, UGA
> > > > mark at fcs dot uga dot edu: Yahoo IM: mark_toomey
> > > > Owner: USG-TECH & COOLTECH Listservs
> > > > voice:706-542-4738 - fax:706-542-4168
> > > > Linux: The Power of Choice
> >
> > - --
> > How clean is a war when you shoot around nukelar waste?
> > Stop the use of depleted uranium ammo!
> > End all weapons of mass destruction.
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.1 (GNU/Linux)
> >
> > iD8DBQE/jTMu2FHsOWMJBKMRAvCvAJ9dKCz7+OAIz7tJWBQT+GIjTiQL/QCg04Bv
> > CHYlAYK1Yj1KDAsExgavU80=
> > =HH8D
> > -----END PGP SIGNATURE-----
> >
> >
> > --
> > IMP mailing list
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe at lists.horde.org

- -- 
How clean is a war when you shoot around nukelar waste?
Stop the use of depleted uranium ammo!
End all weapons of mass destruction.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/jl8k2FHsOWMJBKMRAphbAJ9QkbjL7qxlZ/MV3JLPwfIPUbBQGgCeIi9C
APkAEbZJhtuW3Jra512VgPQ=
=k3ec
-----END PGP SIGNATURE-----



More information about the imp mailing list