Update:

Well, that was an easy fix..  All I had to do was reverse the order in this
IF statement.

/* If the message is greater than 1000 bytes and
             * the user is over thier quota, return it back
             * to the sender. We allow messages less than 1000 bytes
             * to go through. This is so system admins can send a
             * user over quota message
             */
from        -->             if (message_size>1000 &&
user_over_quota(address, quota)==1) {
change to -->             if (user_over_quota(address, quota)==1 &&
message_size>1000) {
                                  printf("user is over quota\n");
                                  return(-1);

cool stuff.  I've been enrolled at the "C" school of hard knocks all
weekend...  I've learned A LOT!

I'll update this list and Ken when I get the over_quota message stuff
done...  It should be today.

Chris Bunnell


----- Original Message -----
From: "chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 9:56 AM
Subject: FYI: .current_size fails to update


> Just an FYI:
>
>
> While working on mods to vdelivermail for "user over quota messages," I
> discovered a bug.  It seems that due to the way checks are made for
messages
> under 1000 bytes, the .current_size file in each users mailbox isn't
getting
> updated for all messages.  Any message under 1000 bytes gets delivered
> without updating the .current_size file.  Once you send a message >1000
> bytes, the file gets updated, but only with the current messages size!  It
> doesn't "catch up" with all the smaller message sizes...
>
> I'll look at fixing this while I work on my over quota message part of the
> code...
>
> Chris Bunnell
>
>

Reply via email to