Other ways than quotas to limit mail files size ??

Paul Chvostek paul+fbsd at it.ca
Sun Jan 11 23:47:16 PST 2004

On Sun, Jan 11, 2004 at 09:24:28PM +0100, Greg Bernard wrote:
> Is there another way to limit the amount of space occupied by mail files on
> a per user basis using another method than quotas ?
> I would like to limit the amount of space available for each user's e.mail
> so e.mail file size will not go crazy.

What exactly do you want to do?

Filesystem quotas will cause a bounce message to be returned to the
sender indicating that the recipient was over quota.  That's generally
the preferred way because the operating system takes care of most of it.
You could modify that bounce message to include "friendlier" text if the
default text is a problem for you.

Alternately, you could implement a solution using procmail, with a small
tool like http://www.it.ca/software/fsizecompare.c to determine existing
filesize and behave accordingly.  Or you could come up with other clever
behaviour based on whatever criteria you dream up.

But you have to dream it up first.  Figure out exactly what you want to
do with your users' mail.  Then try to write something that does it.
And if you have problems with that, come back to the list and ask for
advice.  :-)


  Paul Chvostek                                             <paul at it.ca>
  it.canada                                            http://www.it.ca/
  Free PHP web hosting!                            http://www.it.ca/web/

More information about the freebsd-questions mailing list