SUMMARY: giant mailboxes

Date: Tue Sep 20 1994 - 18:23:07 CDT

My query about giant mailboxes produced a giant response - lots of
useful suggestions and references. I'm looking at "mailclean" amd purge_mail
(perl) as referred to below.

Lots of people just move entire "old" mailboxes into the user's home directory
where it takes up space and consumes the users quota. There's then a motive to
clean up.

Thanks to all who responded.

From: (Phil Male)
From: (Pat Myrto)
From: Dan Schlitt <>
From: (Jim and Rita McLean-Lipinski)
From: (SrA Bruce R Baier)
From: Lenny Turetsky <>
From: (Dotty Pon)
From: bern@penthesilea.Uni-Trier.DE (Jochen Bern)
From: mills@CC.UManitoba.CA
From: (Brian White)
From: (Martin Achilli)
From: (J. Adams)
From: (Eckhard Rueggeberg)
From: Dan Schlitt <>
From: Harish Malneedi <>
From: Mr T Crummey (DIJ) <>
From: mills@CC.UManitoba.CA
From: Aydin Edguer <edguer@MorningStar.Com>
From: Tom Reingold <>
From: (Steven Ho)
From: (J. Adams)
From: Paul Quare <>
From: root@wisdom( (Mark Hargrave \(504\) 257-1242)
From: "Harry H. Sun" <>
From: (Michael Beirne)
From: (Suzanne Bryant)
From: Jieming Zhu <jzhu@helios.wichitaks.NCR.COM>
From: (Steve Ehrhardt)
From: swb5600@sudcv91( (Steven W. Bates \(508\)-440-3866)
From: Ian Reddy <>
From: Patrick O'Callaghan <>
From: Cheryl Williams <clwillia@denmisf01>
From: Mike Raffety <> (Pat Myrto)
There is a thing I got off the net (try archives) called 'em'
which expires mail by a number of criterea, including age, username, etc.
Users can use it to remove unwanted mail from their mailboxes, admins can use
it to place an age limit. It would be possible to run from a cron job, for

From: Paul Quare <>
Have a look at em from comp.sources.misc v26i074

Dan Schlitt <>
There was a program called cobwebs that I got from one of the comp.unix
source newsgroups that will give you a report on mailboxes of the sort
that you would find useful.

From: bern@penthesilea.Uni-Trier.DE (Jochen Bern)
(Commenting on use of disk quotas in the /var/spool/mail partition...)
It's useless. SUN sendmail keeps delivering, over Quota or not.

From: mills@CC.UManitoba.CA
From: Patrick O'Callaghan <>
"mailclean" in /src directory

From: (Brian White)
We use something called "mailclean" here, with some local mods I made and
can't remember the details of :^). It truncates a mailbox at a set limit
and moves the old mail messages inot the perpetrator's :^) home directory
where they count as disk space usage - makes them clean up quickly :^).

From: (Martin Achilli)
Referred to a previous Summary, as follows...
Date: Thu, 26 May 94 03:20:04 -0500
Subject: SUMMARY: Mail Quotas

From: Ian Reddy <>
"purge_mail" (perl)

From: (Phil Male)
Software to filter off old email enclosed :-) Has been running here for about
two years now with no problems.
Here are some bits of this to give you a flavour. I ( will forward this to anyone who wants the whole file.
# Perl mail expire.
# This program removes old messages from system mailboxes. It is site
# specific in that it assumes the format of mailboxes to be standard
# sendmail format mail with a blank line followed by a `From ' line
# starting each and every message. Mailbox locking is via flock.
# Options as follows:
# -v verbose output
# -V display version information and quit
# -d debug mode (no change to mailbox)
# -l display messages for crontab output
# -z do not delete zero length mailboxes
# -t do not reset access and modification times on mailbox
# -o always open mailbox, never just test modification date
# -M append a message detailing deleted messages for the user
# -T do not record delivery of mail summary on mailbox date
# -a days messages whose age is greater than days are expired
# -O days messages whose age is greater than days are expired
# -u user only consider messages from user (regexp)
# -S read|old only consider messages who status is `old' or `read'
# -s subject only consider messages with subject (regexp)
# Based on ideas in expire_mail by Steve Mitchell (

# usage message

sub usage
  print STDERR "usage: expire_mail [-vlV] [-zotTM] [-d] { [-O days] [-u user] [-S read|old] [-s subject] } mailbox...\n";
  exit 0;

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:10 CDT