procmail
[Top] [All Lists]

checking a mailbox quota

2000-03-29 07:13:48

I'm considering implementing a mailbox-quota check in
/etc/procmailrc and thought I'd flash my suggestion to this list.

In the recipe below, `mailquota' is a program that takes a
username as argument. It checks the size of the users mailbox and
exits 0 if he is below his quota, otherwise 1.

Does this look ok?

   :0
   * !? mailquota $LOGNAME
   {
        # Exit here and bounce the message if the mailbox was full.

        EXITCODE = 69
        HOST
   }

   # Continue processing the procmailrc here if below quota.


I suppose the mailquota program could also write something like
"mailbox quota exeeded" to stderr to appear in the bounced message,
but in this situation it would perhaps be nice if procmail had an
`echo' builtin command?

-- 
Gjermund Sorseth

<Prev in Thread] Current Thread [Next in Thread>