How to make procmail reject if user over quota?

From: Paul N. Youngblood <youngbp_at_uahis1.uah.edu>
Date: Wed, 20 Mar 2002 18:49:48 -0600 (CST)

Hello Sys Admins,

I'm trying to get procmail and sendmail to reject mail messages
being sent to any user that is over quota on the /var filesystem
(where the user INBOXes live). Hopefully, the rejected mail will
be bounced back to the sender with some meaningful "user exceeded quota"
message. From what I've seen in the archives of this list, it must
be possible, but I've found no details. So far, the user still
receives mail, even if their quota is exceeded. If anyone can tell
me what I've left out, I would really appreciate it.

My server has this:

   Tru64 v4.0F
   All Advfs filesystems
   sendmail v8.11.2
   procmail v3.22

I've turned on user quotas (and verified they are in effect):
# showfsets var_domain
var
        Id : 3985e146.00028a60.1.8001
        Files : 15790, SLim= 0, HLim= 0
        Blocks (512) : 21119476, SLim= 0, HLim= 0
        Quota Status : user=on group=off


My osf1.mc file has this:
--------------------------------------------------------------------------
divert(0)dnl
VERSIONID(`$Id: generic-osf1.mc,v 8.11 1999/02/07 07:26:02 gshapiro Exp
$')
OSTYPE(osf1)dnl
DOMAIN(generic)dnl
FEATURE(local_procmail,`/usr/local/bin/procmail')dnl
FEATURE(`accept_unqualified_senders')dnl
FEATURE(`access_db',`dbm -o /etc/mail/access')dnl
define(`confMAX_MESSAGE_SIZE', `15000000')dnl
define(`confPRIVACY_FLAGS', `nobodyreturn')dnl
define(`_FFR_MILTER', `1')dnl
INPUT_MAIL_FILTER(`filter1', `S=local:/var/run/f1.sock, F=R')
LOCAL_CONFIG
# other names by which we may receive mail
Cw some.uc.fake.edu
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(`procmail')dnl
--------------------------------------------------------------------------


I don't know if that last line above ---> MAILER(`procmail')dnl
is required or not. (Does anyone know what it's for?)
I've tried it both ways, with and without, and
I still get the same result -- no bounced mail when user is over quota.


--------------------------------------------------------------------------
This FEATURE line:
FEATURE(local_procmail,`/usr/local/bin/procmail')dnl
in the above .mc file results in the following entry in my sendmail.cf
file:

Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|_at_qSPfhn9,
S=EnvFromL/Hdr
FromL, R=EnvToL/HdrToL,
                T=DNS/RFC822/X-Unix,
                A=procmail -Y -a $h -d $u
------------------------------------------------------------------------

Are these default flags and arguments not enough to tell procmail to
bounce mail destined to my "over-quota" users?

Thank you for your attention.

Paul Youngblood
youngbp_at_uahis1.uah.edu
Received on Thu Mar 21 2002 - 00:45:57 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT