Qmail has no inherent quota facility. In conjunction with file system
user
disk quota's you can setup basic quota's.

The message you are seeing is from vdelivermail.c around line 782

#ifdef HARD_QUOTA
    if ( pw_data != NULL && sstrncmp(pw_data->pw_shell, "NO",2)!=0 &&
         msg_size > 1000 && cur_msg_bytes + msg_size > per_user_limit )
{

        sprintf(tmp_file, "%s/.over-quota.msg", curdir);
        if ( (fs=fopen(tmp_file, "r"))==NULL){
            if ( strstr(curdir, "/users/") == NULL ) {
                sprintf(tmp_file, "%s/domains/.over-quota.msg",
VPOPMAILDIR);
                fs=fopen(tmp_file, "r");
            }
        }
        if ( fs == NULL ) {
            printf("User is over quota email returned\n");

/*
HERE        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Where the per_user_limit is set by:
        per_user_limit = atol(pw_data->pw_shell);

   and where the pw_shell is the last field in the password structure

*/

        } else {
            while( fgets( tmp_file, 256, fs ) != NULL ) {
                fputs(tmp_file, stdout);
            }
            fclose(fs);
        }
        unlink(mailname);
        exit(100);

        /*bounce_it_back( mailname );*/
    }
#endif

So the message is coming from vdelivermail as part of vpopmail and not
from the qmail source code.

I would follow these steps
1) Trace where the user ends up in the qmail system.
   a) /etc/passwd user
   b) vpopmail user?
   c) what Maildir directory is it attempting to deliver to
2) check size of Maildir directory
   du Maildir

   There are three directories in a Maildir to count for quotas:
   new cur tmp
3) Use your log files for clues.

Note: emails smaller than 1000Bytes will always be delivered. So..

4) Test sending a email smaller than 1000 bytes

Ken Jones



Kathleen Farber wrote:
> 
> If you have a quota set I believe this is already preset in qmail.  Since we
> never specifically wrote a message like this and we hve one customer that
> keeps getting User is over Quota but actually his box is empty.  Any idea's
> why we're getting this error anyone?  We've used vdeldomain and vadddomain
> to reset him and his quota is set to 10 megs but still getting this error
> even when his box is empty... any thoughts greatly appreciated.
> 
> Kat
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of teste do psi
> Sent: Thursday, September 07, 2000 12:20 AM
> To: [EMAIL PROTECTED]
> Subject: quota + postmaster + user
> 
> Hi,
> 
> I'm running a vpopmail 4.9.2 + qmail 1.03 system with quota support and
> my question is:
> 
> I need send message "User_is_over_quota_email_returned" to remote user
> AND local postmaster...
> 
> How make I do?
> 
> []'s
> 
> Ricardo

Reply via email to