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:


       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

    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)

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.



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

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to