Subject: Re: Mail and quotas
To: None <perry@piermont.com>
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
List: current-users
Date: 11/27/1995 09:35:39
-----BEGIN PGP SIGNED MESSAGE-----

> Kevin Sullivan writes:
> > On my NetBSD-current machines I have strict quotas in /var/mail.  (The
> > users tend to leave things in their mail spool, so this encourages them
> > to clean up often.)  However, people's mailboxes still grow past their
> > quota.  I believe this is because mail.local runs as root and thus
> > doesn't care about quotas.
> > 
> > I'd call this a bug in mail.local.  Is there a way to fix this besides
> > hacking mail.local?
> 
> No, but wouldn't a simple mail.local hack to check the size of the
> mailbox and return an appropriate error to sendmail be better than
> having it die with a quota problem?

What we did at MIT-Athena back in 1985 or so was to have /bin/mail
(then used as the mail.local equivalent) set it's uid to the
delivered-to user before opening & writing to the mailbox; that way,
the quota was enforced.

In the event of a write failure, it would exit with one of the
well-known exit codes in sysexits.h so sendmail would clean up
sensibly.  I think we used EX_TEMPFAIL, but it's been a while...

For various reasons, I don't think this actually got deployed before
Athena switched to using POP exclusively.

						- Bill

-----BEGIN PGP SIGNATURE-----
Version: 2.6.1

iQCVAwUBMLnMuLT+rHlVUGpxAQGaPAQAm51GluGJHimyqr5A+AnJvZ2CqBbDVKka
gNTfq13UFcf5vgHqSrMux1F4BnJ1BM1oZlcpIlRiHqu5J9iSlvIqeRD27iebVi5W
zxArF2XjK0Qf6+fAXP+u1UXmtRRTm7wqsTCvcuNkPtg9TTIPi1cWtbGkZaE9ZEga
2NW/axAmVj0=
=z3DN
-----END PGP SIGNATURE-----