From owner-freebsd-isp Thu Oct 29 15:00:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA07834 for freebsd-isp-outgoing; Thu, 29 Oct 1998 15:00:10 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from ns1.cioe.com (ns1.cioe.com [204.120.165.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA07822 for ; Thu, 29 Oct 1998 15:00:06 -0800 (PST) (envelope-from steve@ns1.cioe.com) Received: (from steve@localhost) by ns1.cioe.com (8.9.1/8.8.5) id RAA15139; Thu, 29 Oct 1998 17:59:58 -0500 (EST) Date: Thu, 29 Oct 1998 17:59:58 -0500 (EST) From: Steve Ames Message-Id: <199810292259.RAA15139@ns1.cioe.com> To: dannyman@dannyland.org, freebsd-isp@FreeBSD.ORG, lambert@csw.net Subject: Re: Expiring old mail? In-Reply-To: <19981029151229.Y8390@enteract.com> Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Run 'cucipop'... it has some flags for dealing with this. Dunno how well they actually work :) -steve > > Hi, > > > > I recently ran into a problem with my mail server. The /var/mail disk filled > > up. (not good) > > > > Anyway after several hours of "mail -f username" and deleting 7 month-old un- > > read messages and > 1 month-old read messages, I freed up approximately 700MB > > of disk. (Why do people subscribe to every mailing list on the planet and > > not read their mail?) > > Heh, I have a little script I used to use for just this sort of situation, > which would write a script to move the largest spools into user home > directories. > > #!/bin/sh > echo "#!/bin/sh" > movemail > rm /home/`whoami`/mail-abusers > ls -ulsk /var/mail | sort -rn | head -25 | awk '$4==$10 { print "\n#"$4" size "$6" last mod "$8" "$7" "$9"\nmv /var/mail/"$4" /home/"$4"/INBOX\nchown "$4" /home/"$4"/INBOX\necho -n \""$4", \" >> /home/djhoward/mail-abusers" }' >> movemail > #echo "rm movemail" >> movemail > chmod 755 movemail > $EDITOR movemail > echo "Okay, now you can sudo ./movemail at your discretion." > > Not the cleanest or prettiest script, by any means, but that fouth line always > gave me a warm fuzzy feeling. > > HTH, > danny > > -- > // dannyman yori aiokomete || Our Honored Symbol deserves > \\/ http://www.dannyland.org/~dannyman/ || an Honorable Retirement (UIUC) > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message