Columbia MM
MM Manual

DELETING MESSAGES ON FILE

Removing a message is a two-step process. First, mark the message as deleted; then, expunge all messages marked deleted. Until the message is expunged, you can change your mind and remove the deleted status.


MARKING MESSAGES AS DELETED

Use the command delete or just d to mark messages as deleted. At the MM> prompt, supply a message sequence, or omit it to delete the current message.



MM>d 3
 3
MM>


MM responds to the delete command by listing, by number, which messages were marked as deleted. If you want to use a message sequence that is not a number, you might want to use headers first to verify that the message sequence picks the right messages. If it is correct, you might then use the message-sequence previous-message, abbreviated to p, to avoid retyping:



MM>h subj october
      21) 19-Sep Sue Zayac           october meeting (317 chars)
      28) 22-Sep Maurice Matiz       meeting, october (1620 chars)
      30) 23-Sep Lynn Jacobsen       idea for october meeting (285 chars)
MM>d p
 21, 28, 30
MM>


At the R> prompt, delete acts on the message you just read. There is no response, just another prompt. You can use the command kill to combine delete and next, that is, mark this deleted and move on to the next message.



R>d
R>



RECOVERING DELETED MESSAGES

Messages marked for deletion appear in headers command listings with a D in the status area on the left. The messages cannot be read, except by the type command at the R> prompt.

Because the delete command only marks the messages as deleted, but does not actually remove them, you can undo a deletion. The command undelete works exactly like delete, and removes the status of deleted.

The move command, which copies messages to another mail file, marks the messages as deleted in the current mail file. This is the only command besides delete that marks messages as deleted. The deleted status can be undone with undelete as usual.


PERMANENTLY REMOVING DELETED MESSAGES

Use the command expunge to eliminate all messages marked deleted. It actually rewrites the whole mail file, omitting the deleted messages. Once a message is expunged, it is totally gone and you cannot undo the deletion.

The expunge command responds with Expunging deleted messages and there may be a short pause while MM rewrites the mail file. If there are no deleted messages, it responds No messages deleted. Here the command is given twice: the first expunge removes all deleted messages, so the second finds none:



MM>expunge
Expunging deleted messages.
MM>expunge
No messages deleted.
MM>


You should expunge regularly, to keep your mail file from growing too large. Remember that deleting by itself does not change the file size at all, but merely marks which messages should be removed when you give the expunge command.

The command exit stops an MM session temporarily and does an expunge. You will see one of the two expunge messages as above. If you use exit routinely, you do not need to use expunge.



MM>exit
Expunging deleted messages.
[1] + Stopped (signal)         /usr/local/bin/mm
$


The command bye stops an MM session completely, and asks you whether you would like to expunge deleted messages; you can respond y or n.



MM>bye
Expunge deleted messages? y
Expunging deleted messages.
$


You can make bye do an expunge every time by changing the variable expunge-on-bye, which is normally set to ask: type set expunge-on-bye always to change it and then save-init to save the change.


[ Columbia MM Manual ]