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="YES"
          enable_quotas="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

-- 
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