[imp] Printing Quota Warning - WAS: How to print username and password
Henry Blackman
h.blackman@chester.ac.uk
Thu, 21 Feb 2002 17:03:21 -0000
Hello Mauricio,
As the admin/developer at a University with 12,000 and issues with quotas
(but with no IMAP server that supports quotas), your code is very helpful.
I'd love to see this as a preference in the standard IMP release. Guys?
Henry
----- Original Message -----
From: "Mauricio Cuenca" <fauro@mindless.com>
To: <imp@lists.horde.org>
Sent: Thursday, February 21, 2002 4:34 PM
Subject: [imp] Printing Quota Warning - WAS: How to print username and
password
> Hello,
>
> I was asking how to get username and password in order to query the IMAP
> server and show a warning if the user is approaching a specified quota
> limit. Now I have the answer and someone could be interested:
>
> We do not have quotas set up on our IMAP server. Our mailbox may have
> unlimited size, so we decided to send a warning to users exceeding certain
> limit in the size of his/her mailbox. These are the changes that I made:
>
>
> * /horde/imp/config/conf.php
> -----------------------------
> // If this option is set to 1. The mailbox will show a message to the
user
> if his/her
> // mailbox size is exceeding or approaching the limits given below.
> $conf['mailbox']['warning_limit_show'] = 1;
>
> // This is the maximum size of the mailbox, based on this settings the
> mailbox will
> // display a warning message. The size is giving in bytes.
> $conf['mailbox']['warning_limit_approaching'] = 8000000;
> $conf['mailbox']['warning_limit_reached'] = 10000000;
> $conf['mailbox']['warning_message_approaching'] = 'You're approaching the
> limit';
> $conf['mailbox']['warning_message_reached'] = 'You reached the limit.
Delete
> some files!';
>
>
>
>
> * /horde/imp/mailbox.php
> --------------------------
> /*
> * Check if the user is approaching or exceeding the size limit. This size
> is specified
> * in the conf file (bla).
> */
> function show_limit_warning() {
> global $imp, $prefs, $conf;
>
> $get_info = imap_mailboxmsginfo($imp['stream']);
>
> if($get_info)
> $mailbox_size = $get_info->Size;
>
> if ($mailbox_size >= $conf['mailbox']['warning_limit_reached'])
> echo "<p align=\"center\"><font
> color=\"#ff0000\">".$conf['mailbox']['warning_message_r
> elseif ($mailbox_size >=
$conf['mailbox']['warning_limit_approaching'])
> echo "<p align=\"center\"><font
> color=\"#ff0000\">".$conf['mailbox']['warning_message_a
>
> }
>
>
>
> * /horde/imp/templates/mailbox/header.inc
> -------------------------------------------
> <?php if (isset($conf['mailbox']['warning_limit_show'])) {
> show_limit_warning(); } ?>
>
>
> None of the code was changed, al this lines were added to the respective
> files.
>
> Hope someone qualifies this as usefull, at least it was for me =)
>
>
> ______________________
> Mauricio Cuenca
>
>
> ----- Original Message -----
> From: "Mauricio Cuenca" <fauro@mindless.com>
> To: <imp@lists.horde.org>
> Sent: Wednesday, February 20, 2002 6:14 PM
> Subject: [imp] How to print username and password
>
>
> > Hello,
> >
> > We are customising IMP and we need to print the login and password of
the
> > current user. I know this could be dangerous, but we really need to do
it.
> > We need the password in order to pass it to other app and display the
> result
> > in the INBOX.
> >
> > I tried using this variables:
> > $HTTP_SESSION_VARS['imp']['user']
> > $HTTP_SESSION_VARS['imp']['pass']
> > $imp[user];
> > $imp[pass];
> >
> > But none of them worked...
> > How can I obtain username/password from IMP ???
> >
> > TIA,
> >
> > ______________________
> > Mauricio Cuenca
> >
> >
> > --
> > IMP mailing list: http://horde.org/imp/
> > Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> >
> >
>
>
> --
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>
>