COMPACTMAIL

Section: User Commands (1)
Index Return to Main Contents
 

NAME

compactmail - expunge deleted letters from a Mail.app mailbox  

SYNOPSIS

compactmail [ -nruv ] [ -d days ] [ -f from-regexp ] [ -s subject-regexp ] [ -HV ] [ mbox ... ]  

DESCRIPTION

Letters deleted in Mail.app are only marked and hidden, but their contents remain so that the user can later undelete them again. Compactmail actually removes messages which have been marked as deleted and frees up the diskspace used by these messages. The effect is identical to the one achieved by the Utilities/Compact menu item in Mail.app itself.

Any number of existing mailboxes may be given as arguments. If the mailboxes are in the locations where Mail.app would look for them the pathname and the `.mbox' extension may be dropped.

If another program (typically either Mail.app or appnmail ) has locked a mailbox which the program tries to access, it will sleep for 10 seconds and try again until the mailbox has become available. If compactmail is invoked with the -n option a warning message will be given instead and the mailbox skipped. Adding the option -v causes compactmail to be more verbose about what it does. The -r option causes compactmail to expunge not only all deleted, but all messages which aren't unread. The -u flag goes even further and makes compactmail expunge all messages regardless of status.

Those wondering what possible use a flag to delete all messages could be will be relieved to hear that there are options to restrict this option to a subset of all messages. To restrict the operation of compactmail to only messages with a certain subject use -s regexp and only messages matching regexp will be compacted. The -f regexp option fulfills the same function for the `From' line of messages. Finally the -d days options restrict compactmail to only deleting messages at least days days old.

The -H option displays a summary of the options that appnmail responds to, and -V shows the program's version.  

EXAMPLES

Expunge all read or deleted message in the OldMail mailbox from cedman which are at least two weeks old.

        compactmail -r -d 14 -f cedman@ OldMail
 

SEE ALSO

appnmail(1), ed(1)  

DIAGNOSTICS

`Already locked by %s on %s (pid=%s)' if another process has locked a mailbox and the -n option is set.  

BUGS

This program by necessity depends on the internal format of Mail.app files. While it cooperates correctly with NS 2.x, 3.x and 4.[012] no guarantee can be made that this won't change in the future.

This program will remove EnhanceMail full-text indices, so you may not want to use it on EnhanceMail indexed mailboxes.  

AUTHOR

Carl Edman <cedman@lynx.ps.uci.edu>

The task was made considerably easier by Chris Paris <cap+@cmu.edu> decoding of the Mail.app transmission and storage formats.

Tom Hageman <mailapp-utilities@basil.icce.rug.nl> is the current maintainer.  

VERSION

Mail.app utilities version 2.1, February 1998.


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
SEE ALSO
DIAGNOSTICS
BUGS
AUTHOR
VERSION

This document was created by man2html, using the manual pages.
Time: 05:07:16 GMT, April 11, 2025