cleanmbox is a small utility program for managing your mail boxes.
By default, it looks at your mail spool, the reception area for incoming mail. If you allow POP mail (e.g. Eudora, Outlook) to leave your mail on the server, this area can become very full. IMAP mailers (again, Eudora, Outlook) and UNIX mailers (Pine, Elm and others) always show you the material in your mail spool (usually referred to as your Inbox by those mailers), but once your've seen the mail with a POP mail client, you no longer have access to those messages on the server via that POP client on that computer. You can see them in your local inbox, and can delete them there, but unfortunately, they may never get cleaned out from the mail spool. This creates problems for the mail system and for other users. cleanmbox is designed to help you clean your mail spool. It can also clean any other arbitrary mailbox (mail folder) in your UNIX account in the same way.
This small program is really just a wrapper - a program that makes it easy to use a series of other programs. In this case, cleanmbox provides a nice interface to the mail management tools provided with the MH and/or NMH mail reading/sending programs. These tools are rather nice, but not easy for the novice, and since they keep mail in a different format from what all other mailers use, very few individuals use NMH/MH. MH does provide the right set of tools for the tasks at hand though, and can convert between mailbox formats.
This means that you really need to run cleanmbox on a UNIX system that has a good version of NMH or MH. This excludes the older SunOS systems that are still around, and most of the SGI IRIX systems. cleanmbox should complain and refuse to run if you try to run it on one of those systems. Linux systems may or may not have the NMH package installed. If the package is not installed, cleanmbox will not work.
You also need sufficient work space. By default, cleanmbox creates a work/scratch directory for you in /var/tmp. That area must have enough space available to hold a copy of the mail folder (e.g., your mail spool) that you are cleaning. You will also need sufficient space in the archiving area, which is by default a directory Pack in your home directory. The work directory and the archiving directory can be set to other locations if /var/tmp and/or your home directory have insufficient space.
Here is the basic usage message from cleanmbox:
Usage: cleanmbox [-V] [-help] [-cnv] [-a dir] [-d date] [-f mbox] [-w dir]
We have said that cleanmbox needs sufficient space for tis work, and that you should determine ahead of time if sufficient space is available, and if not direct cleanmbox to use alternate work areas. So how do you then determine the space needed and the space available?
There are several tools that you can use:
and we will see
we see in this example
We see that the disk containing /var/tmp has 5133442Kb total
space, 1776464Kb are in use, and 3305644Kb are available. Our du
example showed we (minimally, more is better) need 53720Kb, so we have
more than enough space in our work area. To check our archive area - by
default in our home directory, we'd simply use
df -k ~/
and to check an alternate area, e.g., from our earlier example,
df -k /home/projects/bubba
Last modifed: Monday, 12-Oct-2009 11:43:44 EDT