It helped with the --with-trashquota, now deleted items are updates/removed from quota
But i have a problem when mail arrives to, then the quota file donÂt get updated, below you can se my qmail startup script....hov can i implement deliverquota into that?
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/var/qmail/bin:/usr/local/bin
. /etc/rc.d/init.d/functions
case "$1" in
start)
# qmail itself:
echo -n "Starting qmail: "
env - PATH="/var/qmail/bin:/usr/local/bin" qmail-start ./Maildir splogger qmail &
echo
touch /var/lock/subsys/qmail
# pop3 server:
echo -n "Starting pop: "
env - PATH="/var/qmail/bin:/usr/local/bin" \
tcpserver -H -R -l -c200 0 pop3 /var/qmail/bin/qmail-popup loke.yanet.dk \
/home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1 | > /dev/null &
echo
# smtp server:
echo -n "Starting smtp: "
env - PATH="/var/qmail/bin:/usr/local/bin" \
tcpserver -v -p -x/home/vpopmail/etc/tcp.smtp.cdb -c200 -u613 -g613 0 smtp \
/usr/local/bin/rblsmtpd -rbl.spamcop.net -rrelays.ordb.org \
/var/qmail/bin/qmail-smtpd 2>&1 | \
/var/qmail/bin/splogger smtpd &
echo
;;
stop)
echo -n "Stopping qmail "
killproc qmail-send
killproc tcpserver
rm -f /var/lock/subsys/qmail
echo
;;
restart)
$0 stop
$0 start
;;
cdb)
/usr/local/bin/tcprules /home/vpopmail/etc/tcp.smtp.cdb /home/vpopmail/etc/tcp.smtp.tmp < /home/vpopmail/etc/tcp.smtp
chmod 644 /home/vpopmail/etc/tcp.smtp*
echo -n "Reloaded /home/vpopmail/etc/tcp.smtp."
;;
alarm)
echo -n "Alarm processing of E-Mails (qmail):"
killproc -ALRM /var/qmail/bin/qmail-send
;;
*)
echo "Usage: qmail {start|stop|restart|alarm}"
exit 1
esac
exit 0
Brian Candler writes:
On Wed, Dec 10, 2003 at 12:34:37AM +0100, Peter Nilsson wrote:Hi the problem was not solved by upgrading
it seems like sqwebmail donÂt update the quota files....the quota is ok until a user deletes mail ind sqwebmail....how can i configure sqwebmail to update the quotafiles....is it the file maildirsize?
So what exactly is the problem when you delete a mail in sqwebmail? Is it
that the quota does not go down, when you expect it to? Did you compile with
the '--with-trashquota' argument to ./configure?
Apart from that, there is no configuration option which affects quota
calculation that I know of.
The file is indeed maildirsize. If you 'cat' it you will see:
- the first line is the quota (bytes and messages)
- the second line is the number of bytes/messages in the mailbox at the time
maildirsize was created
- subsequent lines are deltas to this value; each time a message is added or
removed, a new line is added with a pair of positive or negative numbers
- once the file gets to 200 lines, it is replaced with a new file
So the quota sqwebmail displays is calculated by adding together lines 2..N
in this file. If you can demonstrate that sqwebmail displays a value which
is *different* from the sum of those values, then you have found a bug. If
you can demonstrate that some user action (such as deleting a mail) does not
correctly append the right new line to maildirsize, then you have also found
a bug.
Brian.
Brian Candler writes:
>On Sun, Dec 07, 2003 at 09:58:32AM +0100, Peter Nilsson wrote:
>>My users get wrong quota info in the front page when they are logged in >>sqebmail....it seems like sqwebmail is slow to update it to the corret >>value. >
>It gets updated when a new message is delivered from an MTA which properly
>supports the 'maildir++' extensions. >
>If you are delivering mail into the mailbox with a Maildir but not >Maildir++
>application (such as qmail), then try configuring it to deliver using the
>external program 'deliverquota' (part of courier-imap) or 'maildrop'
>(separate package from the same author) >
>>How does sqwebmail get its quota info? >
>See the file maildir/README.maildirquota.txt in the source, which also
>explains how to configure qmail to use deliverquota. >
>Regards, >
>Brian.
