procmail
[Top] [All Lists]

Mailbox limit

2001-08-04 01:14:45
here is the final version of procmail's recipe, which limits the mailbox
size to 1Kb. Thank all of you who helped me with it. Any more comments
will be appreciated.

MAXSIZE=1024
BOXSIZE=`[ -f $DEFAULT ] && ls -l $DEFAULT | while read a b c d e f; do
echo $e; done || echo 0`

:0
* $ $MAXSIZE^0
* $ -$BOXSIZE^0
{
    :0
    * > $=
    {
         :0
         * ! ^Subject.*mail delivery
         | (formail -r -I"From: postmaster(_at_)geo(_dot_)net(_dot_)ge" \
                              -I"Subject: mail delivery" \
                              -I"Return-Path: 
postmaster(_at_)geo(_dot_)net(_dot_)ge"; \
                              echo "Mailbox full") | $SENDMAIL -t
         :0 E
         /dev/null
    }
}



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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