From owner-freebsd-questions@FreeBSD.ORG Mon Oct 20 01:52:05 2003 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 B5CED16A4B3 for ; Mon, 20 Oct 2003 01:52:05 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F15F43FBF for ; Mon, 20 Oct 2003 01:52:04 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h9K8oajA016603 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2003 09:51:06 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id h9K8oZfB016602; Mon, 20 Oct 2003 09:50:35 +0100 (BST) (envelope-from matthew) Date: Mon, 20 Oct 2003 09:50:35 +0100 From: Matthew Seaman To: Matthew Faircliff Message-ID: <20031020085035.GE15500@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Matthew Faircliff , freebsd-questions@freebsd.org References: <20031020091501.GB628@databias.co.za> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EXKGNeO8l0xGFBjy" Content-Disposition: inline In-Reply-To: <20031020091501.GB628@databias.co.za> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: courier-imap + exim quotas 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, 20 Oct 2003 08:52:05 -0000 --EXKGNeO8l0xGFBjy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 20, 2003 at 09:15:02AM +0000, Matthew Faircliff wrote: > Can somebody please tell me how to implement quotas using courier-imap an= d exim. The docs on this seem quite lacking! Quotas aren't provided by the mail software -- they are a function of the filesystem that you store the mail on. To set up quotas: i) Make sure quotas are enabled in your kernel configuration: options QUOTA It's not in the GENERIC kernel for 4.x. If you don't want to rebuild your kernel, you may be able to kldload(8) a quota module -- see loader.conf(5). ii) Enable quotas on boot up. Add: enable_quotas=3D"YES" check_quotas=3D"YES" to /etc/rc.conf iii) Mark the file systems you want to use quotas on in /etc/fstab by setting the appropriate options in the mount flags. /dev/ad0s1e /var ufs rw,userquota=3D/var/quota/var.user,groupquota= =3D/var/quota/var.group 2 2 See fstab(5) for details. iv) Now either reboot or run the following commands while the system is fairly quiescent: # quotacheck -a # quotaon -a This will scan the disk partition (can take some time) and make a table showing how much space is being used by each user and group. It will then enable, at the system level, hooks into the low level filesystem calls that updates that table whenever the filesystem is written to. See quotaon(8) and quotacheck(8). v) Now the quota system is up and running, and you can use the quota(1) and repquota(8) commands to see how much disk space is being used by each user. However, you haven't actually set up any limits for any users yet. To do that, use the edquota(1) command. Your mail programs will automatically operate within the quota settings you set up, and handle the EDQUOT errors the system will generate if the user receives over-much mail. 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 --EXKGNeO8l0xGFBjy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/k6HbdtESqEQa7a0RAm6hAJ0X6zYo5TcWqWuDcukHZ5D5kQXgJACfaOh/ ZjbBG9eqnXQ2S2yH5QVzQBk= =xrLM -----END PGP SIGNATURE----- --EXKGNeO8l0xGFBjy--