Doug,

You might also want to look on a previous post by Mr Sam (might be a little 
outdated but I think it still holds valid):

http://www.geocrawler.com/archives/3/9569/2001/4/0/5564545/

The relevant part is:
------------------------------
So, it is necessary to bootstrap the whole process by manually initializing 
maildirsize using something like deliverquota, then using sqwebmail to 
generate .mailfilter that explicitly initialized MAILDIRQUOTA.  Then, 
everything will run by itself... 
------------------------------


Respectfully,
Tim Hasson


Quoting Tim Hasson <[EMAIL PROTECTED]>:

> 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.
> 
> 2. I rather have all user information (including quotas) set in vpopmail's 
> mysql db, for administration reasons.
> 
> 3. Eventually, I do not want to use maildrop at all, except maybe for 
> filtering. But I'd like to find a better solution.
> 
> 
> And because I do not set the variable MAILDIRQUOTA, my mailfilter contains a
> 
> section like so:
> 
> VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
> 
> [...]
> 
> `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`
>    }
> }
> 
> 
> The vuserinfo -Q [EMAIL PROTECTED] will create the maildirsize file, owned by
> root 
> (or whatever maildrop runs as), if it does not already exist.
> 
> This works pretty good.
> 
> After using maildrop for all deliveries on the NFS volume, I think I am not 
> having the problem with the negated quotas (possibly caused by 
> vdelivermail/qmail-local w/ maildir++ patch not rebuilding maildirsize) any 
> more.
> 
> It's only been a couple days, so I will wait until monday then I will 
> confirm :)
> 
> 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