From owner-freebsd-questions Tue Jul 21 06:14:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA17144 for freebsd-questions-outgoing; Tue, 21 Jul 1998 06:14:09 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dark.uwaterloo.ca (dark.uwaterloo.ca [129.97.50.72]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA17123 for ; Tue, 21 Jul 1998 06:14:03 -0700 (PDT) (envelope-from erick@dark.uwaterloo.ca) Received: from localhost (erick@localhost) by dark.uwaterloo.ca (8.8.7/8.8.7) with SMTP id JAA22023; Tue, 21 Jul 1998 09:10:00 -0400 (EDT) (envelope-from erick@dark.uwaterloo.ca) Date: Tue, 21 Jul 1998 09:09:59 -0400 (EDT) From: Erick Engelke To: Alberto de Poo cc: freebsd-questions@FreeBSD.ORG Subject: Re: quota and email In-Reply-To: <000701bdb460$fbccb940$02000003@alberto> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 20 Jul 1998, Alberto de Poo wrote: > I'm working with quotas, but > they do not work right. I have a test user with quota information: > > Filesystem blocks quota limit grace files quota limit grace > /mail 16118* 12000 15000 none 3 0 0 > > but that account continue to receive email without a problem. With quota -q it show this: > > Disk quotas for user saulb (uid 876): > Block limit reached on /mail > > I'm running FBSD 225. What can I do? > Quota works. The problem is that your sendmail is operating as root, so it has permission to exceed the quotas. At our site, we patched the delivery agent code to look up the quota for a user and do clever stuff like truncate the message when they get near to quota, or return failure (message gets returned) if the user exceeds quota. It's not hard, you have its source and the quota program source. Also, the 4.4 BSD design book explains quota if the source doesn't appear obvious. Some others have pointed to procmail which supposedly has quota stuff built-in. We chose to stick with sendmail for a variety of reasons, including the fact that we had it working the way we want and it is reliable. The fella who did all this is on vacation right now. But it was basically a day of effort. One hint he gave was to not start at the sendmail point which mentions quota could be inserted there. Instead, go directly to the delivery agent, and either deliver or return a hard failure. If you return a soft failure, sendmail will keep retrying in the hope that more space has become available. In other words, hard failures are necessary if you want to be rid of the overquota'd messages. Erick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message