On Fri, 19 Sep 2003, Tim Hasson wrote:

> I am not setting the environment variable MAILDIRQUOTA for some reasons:
>
> 1. If user has access to their maildrop filter, or they have shell access,
> then the MAILDIRQUOTA makes no sense.

I didn't even know there was a MAILDIRQUOTA environment variable (this is
generated by vdelivermail?).  In my case, this might work better (no shell
access).  Is there documentation anywhere as to what environment variables
are available in qmail-local and vdelivermail?

> `test -s "$VHOME/Maildir/maildirsize"`
> if ( $RETURNCODE == 1 )
> {
>    `/home/vpopmail/bin/vuserinfo -Q [EMAIL PROTECTED]
>
>    `test -s "$VHOME/Maildir/maildirsize"`
>    if ( $RETURNCODE == 0 )
>    {
>       `/usr/sbin/chown vpopmail:vchkpw $VHOME/Maildir/maildirsize`
>       `/bin/chmod 640 $VHOME/Maildir/maildirsize`
>    }
> }

This is working wonderfully for me right now.  I just ran through a
battery of tests, and quotas in general seem to be working correctly.

I do have one lingering question about how quotas are calculated.  I had
my test user setup with a 20M quota.  Usage was around 18M.  I pulled over
a bunch of mboxes and converted them to Maildir.  Chowned them properly,
bringing the usage up to about 35M.  Sent some test mails to the account,
checked mail via IMAP, quota was still showing 18M usage.  Later the next
day, mail started bouncing with an overquota message.  Questions:

-what later kicked in to tally up the new usage numbers?
-after modifying the quota with vmoduser, the only way to let the quota
system know that there was now at 40M was to blow away the maildirsize
file.  Is this correct behaviour?  I don't think it's really a problem as
there's no way for a normal user to inject more mail without passsing
through some quota-aware program.

Thanks,

Charles


> Respectfully,
> Tim Hasson
>
>
> Quoting Doug Clements <[EMAIL PROTECTED]>:
>
> > On Thu, Sep 18, 2003 at 05:10:29PM -0700, Tim Hasson wrote:
> > > BTW,
> > >
> > > I had a problem before where if I changed a user quota using vpop's
> > > vsetuserquota, the maildirsize file in the user's maildir will
> > automagically
> > > get deleted, but never recreated by maildrop (for the domain I was doing
> > > filtering for) So that's why i put the check in mailfilter script to see if
> >
> > > maildirsize needs to be recreated.
> > >
> > > Shouldn't maildrop create the maildirsize file if it doesn't exist?
> > >
> > > I think when I used vdelivermail, it created maildirsize when a new message
> >
> > > was received in the mailbox that didn't have maildirsize in place, but with
> >
> > > quota limit on it.
> > >
> > > Now, as far as I recall, Bill Shupp made the maildir++ patch based on the
> > code
> > > from maildrop, so I am not surprised it doesn't recreate the maildirsize
> > > file ;-)
> > >
> > > Respectfully,
> > > Tim Hasson
> >
> > Hm.. maildrop creates maildirsize for me. Are you sure you're setting the
> > MAILDIRQUOTA environment variable when you run maildrop?
> >
> > When I create a user, it creates all the maildrop recipes for that user,
> > including one that sets MAILDIRQUOTA (in addition to setting the quota with
> > vsetuserquota, which only seems to set it in the database). I've tested
> > multiple times, and the maildirsize file behavior is what you'd expect; the
> > file gets created on first delivery, and it gets recreated when it gets big.
> > Naturally I don't expect maildrop to directly use vpopmail quota settings,
> > which is why I set the variable.
> >
> > --Doug
> >
>
> >
> >
>
>
>
>

Reply via email to