Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2000 13:03:15 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Lanny Baron <lnb@FreeBSDsystems.COM>
Cc:        Mike Meyer <mwm@mired.org>, questions@freebsd.org
Subject:   Re: limiting the amount of per user in /var/mail
Message-ID:  <14894.36211.52541.452113@guru.mired.org>
In-Reply-To: <Pine.BSF.4.21.0012061055030.81374-100000@satan.freebsdsystems.com>
References:  <14893.62436.574538.602466@guru.mired.org> <Pine.BSF.4.21.0012061055030.81374-100000@satan.freebsdsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
First, please leave mail going to questions@freebsd.org, so that the
answers wind up in the archive, and so that others can provide answers
I can't.

Lanny Baron <lnb@FreeBSDsystems.COM> types:
> As to your answer, the file system is /var in which mail exists. So are
> you saying dump /var then boot -s delete the /var slice and recreate both
> like /var and /mail or make /var and /var/mail slices? In this scenerio
> one must rm -rf /var/mail or there is two /var/mail.

/var shouldn't be a slice, it should be a partition. Slices are called
partitions in the DOS world, and you get four per disk (unless you put
logical ones inside of an extensions slice). BSD file systems are
mounted on partitions.

If /var is a single partition, you can boot to single user mode, mount
/var, use tar to save everything on it to different partition (you may
need to mount another partition for that), use disklabel to create two
partitions where there was once one, use newfs to make them file
systems, then mount one as /var, do a "mkdir /var/mail", mount the
second as /var/mail, then use untar the backup copy into place.

> And as your question goes, there is one server with all users on it. It is
> for an ISP and they dial-in and get mail via POP, I don't think they have
> anyone who knows what a shell is anyway. So forget /home/user/mbox or
> /home/user/Mail 

Sounds like disk quotas could solve your problem, depending on how
your MTA deals with being out of disk space.

	<mike

>  On Dec 6, 2000, Mike Meyer in vogue yet hillarious wrote:
> 
> >Lanny Baron <lnb@FreeBSDsystems.COM> types:
> >> Hi Mike,
> >> I don't use this windows mail program often, but when I do, it grabs 
> >> all the mail. Hence the long delay in writing back.
> >> 
> >> Thanks first of all for replying in the first place.
> >> 
> >> I have quota's running on the system. The problem is maybe better 
> >> put this way. If you say for example, you will only grant users on 
> >> your system to have a total of 3 MB of mail, how would you stop 
> >> more mail from going into the users mailbox?
> >
> >Ok, there are *two* places that users can have mail on your
> >system. One is in their mailbox. The other is in the system mail
> >queues. Soft errors mean you either keep the mail in the queues, or
> >manage to signal the error to the remote machine before it gets put
> >the mail queues on your machine.
> >
> >> In your mail below, it would appear that I must have a seperate 
> >> drive (as the disk in question is fully allowcated) and put in 
> >> something like /mail and then run quota's on /mail. But then that to 
> >> me means that /mail itself could only hold x MB of whatever before 
> >> the quota would block it and not /mail/$USERNAME. 
> >
> >Well, you could avoid a new disk by going to singlue user, dump the
> >file system holding /var/mail, split it into two partitions in the
> >same space, mount the "new" partition as /var/mail, then restore
> >everything.
> >
> >And yes, that would mean that user couldn't have more than x MB in
> >/mail, as opposed to /mail/$USERNAME. On the other hand, if the only
> >thing there are their mailboxes, that's what you want.
> >
> >> Have you ever sent mail to someone and got a reply like...returned 
> >> mail..mail box full??
> >
> >Yup. That's option #3 below in my mail - a hard error on the mail. You
> >can certainly use procmail to do that, but as I said, I'm not a
> >procmail person, so I can't provide details. Just the general idea
> >below.
> >
> >	<mike
> >
> >> Hope you get what I am trying to say.
> >> 
> >> Regards and thanks for your help :-)
> >> 
> >> Lanny
> >> On 19 Nov 2000, at 5:00, Mike Meyer wrote:
> >> 
> >> From:           	Mike Meyer <mwm@mired.org>
> >> Date sent:      	Sun, 19 Nov 2000 05:00:08 -0600 (CST)
> >> To:             	Lanny Baron <lnb@FreeBSDsystems.COM>
> >> Copies to:      	questions@freebsd.org
> >> Subject:        	Re: limiting the amount of per user in /var/mail
> >> 
> >> > Lanny Baron <lnb@FreeBSDsystems.COM> types:
> >> > > Hello,
> >> > > Can someone plz point me in the right direction of how to implement
> >> > > a size in MB for any user on a system, that can stop incoming mail
> >> > > until the user has downloaded thier mail.
> >> > > 
> >> > > One person told me procmail. Having gone to www.procmail.org I
> >> > > cannot see where it talks about size of mail boxes.
> >> > 
> >> > I got questions - have you got answers?
> >> > 
> >> > What do you mean by "stop incoming mail"? The options are 1) that it
> >> > stays on your system, but is kept in the mail queue until either
> >> > timeout or they drop below the limit; 2) that it is refused as a soft
> >> > error, meaning it stays on the *other* ISPs system until either
> >> > timeout or they drop below the limit; 3) or that it is refused as a
> >> > hard error, meaning it's bounced immediately back to the user.
> >> > 
> >> > To use procmail for this, you need to configure your sendmail so that
> >> > local deliver is done by procmail, and arrange to have procmail run a
> >> > command that reports whether or not their mailbox is over limit. It's
> >> > been years since I used procmail or sendmail, so I'm going to defer to
> >> > others.
> >> > 
> >> > A much simpler idea - if their mailboxes are stored on a different
> >> > file system from anything else they are liable to own - is to use disk
> >> > space quotas.  This will make the writes to their mailbox (or possibly
> >> > the queue) fail, which will report as either a hard or soft error,
> >> > depending on your MTA. Try "man -k quota" to get started.
> >> > 
> >> >  <mike
> >> > 
> >> > 
> >> 
> >> 
> >> Lanny Baron
> >> 
> >> Microsoft: "Where would you like to go today"
> >> Linux: "Where would you like to go tomorrow"
> >> FreeBSD: "Hey,when are you guys going to catch up"
> >> 
> >--
> >Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
> >Independent WWW/Unix/FreeBSD consultant,	email for more information.
> >
> 
> 
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Unix/FreeBSD consultant,	email for more information.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14894.36211.52541.452113>