procmail
[Top] [All Lists]

Re: quota approaching

2006-06-18 23:07:49
At 10:55 2006-06-19 +1000, Paul Matthews wrote:

Hi there,

I'm wondering if i can get procmail to do this.

I want procmail to check the file size of my users mailbox found in

/var/spool/mail/$username

and if it is over a set limit say, '51200000' then I want procmail to send
an e-mail to the recipient saying, 'you are approaching your mail box
limit, please acrhive your e-mails or delete some'

Can someone tell me if procmail can do that?

Uhm, why not do this in a shell script invoked from cron?  Even for 
procmail to do the check, it would have to rely on external facilities 
('test' and the like), PLUS would have to be invoked - either by a crontab 
(heh), or as new mail arrives.

procmail wouldn't actually be sending the mail either - the MTA would, say, 
via a series of echos to sendmail...

Really, you're better off just writing a shell script.

One thing to consider: how to determine you've already pestered the 
user.  It's kind of suck to get a notice every 30 minutes (and no other 
mail), or even to get a notice EACH time a new message arrives.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • quota approaching, Paul Matthews
    • Re: quota approaching, Professional Software Engineering <=