From owner-freebsd-questions@FreeBSD.ORG Mon Oct 20 02:05:52 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 AC16E16A4B3 for ; Mon, 20 Oct 2003 02:05:52 -0700 (PDT) Received: from ctb-mesg3.saix.net (ctb-mesg3.saix.net [196.25.240.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56A6143FBD for ; Mon, 20 Oct 2003 02:05:50 -0700 (PDT) (envelope-from matt@databias.co.za) Received: from databias.co.za (wblv-241-89.telkomadsl.co.za [165.165.241.89]) by ctb-mesg3.saix.net (Postfix) with ESMTP id A00D71721; Mon, 20 Oct 2003 11:05:46 +0200 (SAST) Received: from matt by databias.co.za with local (Exim 4.20) id 1ABXr6-0000cP-JQ; Mon, 20 Oct 2003 11:05:44 +0000 Date: Mon, 20 Oct 2003 11:05:44 +0000 From: Matthew Faircliff To: Matthew Seaman , freebsd-questions@freebsd.org Message-ID: <20031020110544.GH628@databias.co.za> References: <20031020091501.GB628@databias.co.za> <20031020085035.GE15500@happy-idiot-talk.infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031020085035.GE15500@happy-idiot-talk.infracaninophile.co.uk> User-Agent: Mutt/1.4.1i 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 09:05:52 -0000 Hello Matthew, Thanks for the info. I am sorry I did not word my question properly - what I meant was: Can somebody please tell me how to implement quotas using courier-imap and exim with virtual user maildirs? OS quotas solve quota issues for real system users; but how do you enforce quotas for virtual mail users? Matthew Faircliff On Mon, Oct 20, 2003 at 09:50:35AM +0100, Matthew Seaman wrote: Date: Mon, 20 Oct 2003 09:50:35 +0100 From: Matthew Seaman To: Matthew Faircliff Cc: freebsd-questions@freebsd.org Subject: Re: courier-imap + exim quotas Mail-Followup-To: Matthew Seaman , Matthew Faircliff , freebsd-questions@freebsd.org 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 and 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="YES" check_quotas="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=/var/quota/var.user,groupquota=/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 -- 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