MrSam,
I made the system run maildrop in delivery mode with mysql (reading from a
slightly modified vpopmail auth table) and I haven't had the negative quota
problem again...
This is without using the maildirquota_recalculate patch to maildrop!
For some reason the race conditions only happens when running any of the
following:
1. vpopmail's vdelivermail from .qmail-default
2. maildrop in non-delivery mode from .qmail-default and a script that runs
vuserinfo to get the user's maildir path. I have also added a few more lines
to that script along the line, to check if the maildirsize doesn't exist and
create it if necessary.
It looked something like this:
SHELL="/bin/sh"
import EXT
import HOST
VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`
`test -d $VHOME/Maildir`
if ( $RETURNCODE == 1 )
{
echo "Sorry, no mailbox here by that name. (#5.1.1)"
EXITCODE=100
exit
}
# Make sure the quota file is in place.
# Vpopmail does not create it by default.
# Vpopmail also removes it when you change the quota.
`test -s "$VHOME/Maildir/maildirsize"`
if ( $RETURNCODE == 1 )
{
`/home/vpopmail/bin/vuserinfo -Q $EXT@$HOST`
`test -s "$VHOME/Maildir/maildirsize"`
if ( $RETURNCODE == 0 )
{
`/usr/sbin/chown vpopmail:vchkpw $VHOME/Maildir/maildirsize`
`/bin/chmod 640 $VHOME/Maildir/maildirsize`
}
}
# Default delivery
exception {
to "$VHOME/Maildir/"
}