From owner-freebsd-questions@FreeBSD.ORG Mon Mar 1 07:20:43 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72CD616A4CE for ; Mon, 1 Mar 2004 07:20:43 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2614643D46 for ; Mon, 1 Mar 2004 07:20:42 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i21FKTQ3022202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Mar 2004 15:20:29 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i21FKSDA022201; Mon, 1 Mar 2004 15:20:28 GMT (envelope-from matthew) Date: Mon, 1 Mar 2004 15:20:28 +0000 From: Matthew Seaman To: flux Message-ID: <20040301152027.GA21932@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , flux , freebsd-questions@freebsd.org References: <1016503305.20040301175026@hotbox.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <1016503305.20040301175026@hotbox.ru> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: mailbox quota X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 15:20:43 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 01, 2004 at 05:50:26PM +0300, flux wrote: > How do I define mailbox quota in my FreeBSD system running sendmail > and using procmail for local mail delivering? By setting up filesystem quotas on the /var partition -- assuming your mailboxes are in the default place in /var/mail. procmail understands how to deal with the EQUOTA error and causes sendmail to bounce over-quota messages with an appropriate error message. To set up quotas: i) Compile kernel with 'options QUOTA' added to the config file. Reboot with new kernel. ii) Add: check_quotas=3D"YES" enable_quotas=3D"YES" to /etc/rc.conf iii) Edit /etc/fstab to tell the system to enforce quotas on the /var partition: /dev/da0s1e /var ufs rw,nosuid,userquota 2 2 See fstab(5) for details of the userquota and groupquota options. iv) Reboot -- quotacheck(8) will be run to count up how many files and bytes are owned by each of the different userids, and the quota system will be enabled by running quotaon(8). v) Running repquota(8) will now give you a nice little report showing how much space each userid is using up on the partition: % repquota -av vi) However, no usage limits have yet been set. Use edquota(8) to set them: # edquota username This will put you into the $EDITOR editor (or vi if $EDITOR is unset) showing how many files and how many bytes are in use for that username on each of the partitions with quota limits. Fill in appropriate numbers in the 'limits' sections: anything you leave at '0' will be unlimited. Save the file, and then check that the settings were registered OK: # quota -v username And that's all there is to it. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAQ1S7dtESqEQa7a0RAlcoAKCWJM/FC+9DHOytQfb+klBa5tOHPQCffOA2 LtDbvPjWAvqhVAnmOwsS7ao= =fAzw -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--