There are a couple of soultions in place already on the qmail home page.
One option is to install user quotas on your machine. Basically this sets a
limit on the number of bytes of file space any user can use. This can be
customized on a per user basis. There is a patch to qmail local that will
check to see if the message to be delivered exceeds the available space for
the user in question. If so the message is bounced. Without this patch
(and after enabling quota) qmail would just defer delivery and that 20 Meg
message would just sit in your queue! Go here for the patch
http://qmail.valueclick.com/qmail/qmail-1.03-quotas-1.1.patch
Another option is to use Paul Gregg's script. It will check the size of all
incoming messages for any given user. It can bounce messages with
customized bounce messages and "user quota" does not need to be enabled in
the kernel for it to work. Find it at
http://www.tibus.net/pgregg/projects/qmail/mailquotacheck/
-David Cunningham
----- Original Message -----
From: Shakaib Sayyid <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 28, 2000 9:18 AM
Subject: Limit file size by user name
>
> Is there a way to limit the file size for attachments by
> user name. Currently I have
>
> # cat /var/qmail/control/databytes
> 5000000
>
> and there is one user who wants to send a file thats ~20M. Is
> there a way to do this?
>
> Thanks
>
> ===============================================================
> Shakaib Sayyid | Kodenet Inc.
> [EMAIL PROTECTED] | G-3163 Flushing Rd.
> | Suite 217
> | Flint, MI, 48504, U.S.A.
> ===============================================================
>
>