Columbia MM
MM Manual

SAVING A MESSAGE YOU RECEIVED INTO A SEPARATE FILE

You can copy a message into a regular file with the list command. The message might be something that you want to edit, or data you want to work on. You might also be preparing to take a second step to print or download the resulting file. (The copy command also creates a file and you may want to compare the results.)


THE LIST COMMAND

The command list copies a message into a regular file. Type list followed by your choice of filename. At the MM> prompt, also specify a message sequence.



MM>list meetingdate 73
 73
MM>


Any text file can be seen with the UNIX shell command more. The file created by the list command in the example looks like this:



$ more meetingdate
-- Messages from file: /f/u1/d09200/mm33/mbox --
   Monday, 7 Sep 1992 4:10PM

R     16)  3-Sep Joseph Brennan  Meeting on Sept 21

^L
Message 16 -- *********************
Return-Path: <jb51>
Received: by cunixf.cc.columbia.edu (5.59/FCB)
        id AA01344; Monday, 7 Sep 92 10:50:29 EDT
Date: Monday, 7 Sep 92 10:50:28 EDT
From: Joe Brennan <jb51@cunixf.cc.columbia.edu>
To: fb2
Cc: mm33, hk12
Subject: Meeting on Sept 21
Message-Id: <CMM.0.90.2.673023028.jb51@cunixf.cc.columbia.edu>


Let's meet on Sept 21 at 2:00 to go over plans for this semester.

Joe

$



FILE CREATION

If there is already a file with the name you chose, it will be wiped out and replaced by the file that list creates. The command does not append to an existing file. To check on a name, use the UNIX shell command ls, which can be run within MM by preceding it with an exclamation point. To check the name meetingdate, type !ls meetingdate, and if the response is meetingdate not found, the name is not in use.

MM's current working directory is used if you do not specify a directory. You can specify another directory with the filename.


FORMAT

The preceding example shows the usual format of a file created by the list command. The first page contains two parts: a header messages from file... and the date and time the list command was run, and then message headers (like the headers command) for each message. The first page ends with a page break character, control-L, shown as ^L, which pauses the display on most terminals and sends a form feed (start a new page) on most printers. The messages start on the second page. If you specified a message sequence of more than one message, the messages are printed one after another without any further page breaks.


Header Fields and Page Breaks

You can cut down the header fields visible in the messages by setting one of the variables dont-print-headers or only-print-headers. For example, in some cases only the From and Subject fields are significant, and it looks better if you hide the other fields. In that case, set the variable only-print-headers to the fields you want. If you want to save the setting, use the save-init command also. To reset to nothing, type set only-print-headers with nothing else.

If you specify more than one message in the list command, you may want page breaks between messages. One way is to use the switch /separate-pages in the command.

In the following example, the messages should each start on a new page, and only the From and Subject fields should appear at the top of each message.



MM>set only-print-headers from, subject
MM>list /separate-pages meetingdate 5,16
 5, 16
MM>


Another way to get separate pages is to set the variable list-on-separate-pages to yes instead of the normal no. You can save the setting with the save-init command so that list will always put in the page breaks.

The command literal list overrides the variables dont-print-headers and only-print-headers, and all header fields are included.


The Message Headers Page

The first page(s) of list output has the Messages from file title and lists the message headers of each message. Headers in this instance refers to the output like that of a headers command.

To print only the headers page, without the messages, use the switch /headers-only, like list /headers-only 1:50. This is a way of capturing a headers display to a file. One purpose might be to create an index file to a compressed mail file.

The variable list-include-headers can be set to no if you don't want the message headers printed on the first page. The rest of the first page still appears. Save the setting with the save-init command.


[ Columbia MM Manual ]