On Fri, Jul 06, 2001 at 06:00:20PM +0300, Cristi Costea wrote:
> 
> 
> > 
> > da de ce scrii matale din root?
> 
> Pai asa eram intrat si de nervii ce-ai aveam nu m-am chinuit sa dau mail 

pai fa si tu ceva de genul
        chfn -f "System Administrator" root
si o sa le vina mailu de la
From: System Administrator <root@blabla>

> de pe alt user. Faza e ca am vrut sa pun ceva mai mare pe server si am 
> vazut ca n-am loc. Din obisnuinta nu ma uit ce e in /var/spool/mail, dar 
> azi m-am shucarit rau cand am vazut la unii (vreo 10 conturi) mbox-uri 
> de peste 300 M.

wanna script?

/etc/cron.daily/disk_hog

-- 
        ___
       <o-o>    Viorel ANGHEL <vang @ lug.ro>
       [`-']    
       -"-"-    In Linux We Trust.


-- Attached file included as plaintext by Listar --

#! /bin/sh
# -*- sh -*-

# vang

#set -x

MAILSPOOL="/var/spool/mail"
MAX_MBOX=30000  # KB
DOMAIN="auctionwatch.ro"
ADMIN="vang"

# check mbox size
/bin/ls -s -1 -k $MAILSPOOL | sed 1d | while read l
do
        set -- $l
        user=$2
        size=$1
        if [ $size -gt $MAX_MBOX ]
        then
                if id $user >/dev/null 2>&1
                then
                        (date; hostname; /bin/ls -l $MAILSPOOL/$user) | \
                        mail -s "$user: your mailbox is very big..." 
"$user@$DOMAIN","$ADMIN@$DOMAIN"
                else
                        (date; hostname; /bin/ls -l $MAILSPOOL/$user) | \
                        mail -s "$user ?? mailbox is very big..." "$ADMIN@$DOMAIN"
            fi
        fi
done




---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui