Subject: Sendmail and user quotas

From: Kenn Herman-Web/Net Admin <[email-masked]>
Date: Fri, 14 Jun 1996 15:47:48 +0000

Specs:
-------
  - Linux 2.0.0 (with all the proper upgrades!)
  - kernel compiled with quota support
  - merged/modified version of quota-1.33 and acct-1.1.18
  - Sendmail 8.7.3/8.6.9
  - Pine 3.91

User quotas work extremely well, both soft and hard limits.
My question is, (how) does Sendmail support user quotas.  When I
have tried to stress out the quotas on the mail partition, by slamming a
inbox, Sendmail appears to continue to deliver to a over-the-quota user.

Is there a setting in the sendmail.cf for quotas?  If so I can't find
it.

How have any of you handled when users have a _really_ big inbox?

Having Pine access a 12M inbox (for those that have learned about
attatchments but not FTP :) is not a great situation!

Thank you for any help,

Kenn Herman

p.s.  I have looked in the FAQ, on the Web and here in this newsgroup
for answers, so I am sorry if this has been brought up before...

---

From: [email-masked] (John Kennedy)
Date: 17 Jun 1996 15:03:34 GMT

In article <[email-masked]>, Kenn Herman <[email-masked]> wrote:

>  User quotas work extremely well, both soft and hard limits.  My question
>  is, (how) does Sendmail support user quotas.  When I have tried to stress
>  out the quotas on the mail partition, by slamming a inbox, Sendmail
>  appears to continue to deliver to a over-the-quota user. ...

  Normally you wouldn't alter sendmail to handle quotes.  Sendmail doesn't
really deal with users, it uses the local mail delivery program to do that.
If you slapped a quota on sendmail, the effect would be global and not
user specific (and probably only relate to the total queue size).

  Hacking your local mail delivery agent is much easier.  It gets the
data and makes the delivery (or not) and tells sendmail if it succeeded
or failed.  Right now, it is probably trying to deliver the mail as root
(which might be why the quota-check is failing), but you can fix that.

  One person I know hacked it so that senders would get a quota-specific
bounce message if the receiver was over their disk quota.

---

From: Erick Gonzalez <[email-masked]>
Date: Wed, 26 Jun 1996 17:02:02 -0500

Marcelo Zacarias wrote:
> 
> : My question is, (how) does Sendmail support user quotas.  When I
> : have tried to stress out the quotas on the mail partition, by slamming a
> : inbox, Sendmail appears to continue to deliver to a over-the-quota user.
> 
> Install procmail and replace the 'mail' command in the sendmail.cf
> with procmail. It's all explained in the procmail's docs...
> 
...

Nah. The problem is that deliver, the one that actually gets mails to a
user, runs suid root, so quotas won't do you any good here. Just look in
the sendmail.cf file, add an option to sendmail so it uses a system
delivery file other than the standard (look in the manual, I forgot the
option). When you do this, for security reasons, deliver drops its
privileges...and you are all set. As for the system delivery file...if
you don't wanna do anything fancy, just echo the users that should
receive the mail, which are given as parameters in the command line.
Look it up in the deliver man page, it's all there..

Erick

---

From: [email-masked] (Marcelo Zacarias)
Date: 21 Jun 1996 20:39:41 GMT

--

Marcelo Zacarias - USP/CIAGRI | Cx. Postal 9, CEP 13418-900,  Piracicaba/SP 
System & Network Admin.       | Fn: 0194-294373 / Pager: 0800-123124 (1022)
Divisao de Redes & Hardware   | Finger for PGP Public Key /// Running LINUX