atom feed2 messages in net.sourceforge.lists.courier-usersRe: [courier-users] PHP imap quota + ...
FromSent OnAttachments
tibykeNov 14, 2002 4:45 am 
tibykeNov 14, 2002 5:37 am 
Subject:Re: [courier-users] PHP imap quota + maildirmake + maildrop deliverquota
From:tibyke (tib@tibyke.hu)
Date:Nov 14, 2002 5:37:06 am
List:net.sourceforge.lists.courier-users

On Thu, 14 Nov 2002 13:36:32 +0100 tibyke <tib@tibyke.hu> wrote:

T> hey, folks! T> T> i have 3 little problems: T> T> 1. PHP courier quota T> i want to get the quota of a user with: T> T> $quotatomb=imap_get_quota($mbox,"ROOT"); T> $used=$quotatomb['usage']; T> $quota=$quotatomb['limit']; T> $usage=round($used/$quota*100); T> T> at least 2 out of 5 times i get a division by zero instead of the real quota
values, but when it's ok, it gives back the correct values. T> is seems as if it didnt pass any values (the array) to php. T>

this is solved, i'm an idiot :)

T> 3. maildrop deliverquota T> T> i have the following setup: T> - postfix 1.1.11 T> - maildrop 1.5.0 T> - courier-imap 1.6.1 T> T> all three use mysql, so everything is virtual. T> i made a maildrop: transport for a domain in postfix which delivers to a
maildir. T> how to get quotas to work? T> maildrop can fetch quotas for specific users from mysql, or i have to
specify it in the maildir? or maybe both? T> im a bit confused :) T> I have a quota field in my users table for mailboxes, and it is correctly
set in /etc/maildropmysql.config, but yet not good. T>

i figured out that if i have a maildirquota for that specific maidir, than
maildrop delivers the mail fine, then updates the $MAILDIR/maildirsize file, so
it seems ok. but how can i apply my mySQL maildir quota? and how can i get to send a warning message when the user is getting closer to
his quota?