You can have more mail files than just mbox. MM will move all incoming mail only into your main mail file, mbox, but you can then copy messages into other mail files. You can also have copies of your outgoing messages written into another mail file.
If you don't keep many messages, you can keep them all in mbox without any real problem. If you have over 100, you will probably gain from setting up additional files. You can organize the messages by topic or sender, or just keep all older messages in another file. Aside from organizing your storage, you will find that MM runs faster with a smaller mbox.
The commands move and copy copy mail from the current mail file to any other mail file; they create the other mail file if it does not exist yet. The difference is that move marks the messages as deleted in the current mail file.
At the MM> prompt, type move or copy, then the name of mail file where the messages should go, and then a message sequence. You can also use the commands at the R> prompt, without a message sequence.
In the following example, you have decided to have just one more mail file, to hold your older mail. You call the mail file oldmail and start it by sending messages 1 to 50 to it. Since oldmail is a new file, you are asked to OK creating it by typing y for yes.
MM>move oldmail 1:50 File does not exist: /f/u1/d00000/yourid/oldmail Do you want to create it? y 1:50 MM>
In the following example, you add message 51 to the oldmail file. You also give a headers command before and after the move just to see what happens. (Note the use of p for previous-sequence to avoid retyping the message number.)
MM>h 51 51) 1-Aug Howie Kaye why we use email (1170 chars) MM>move oldmail p 51 MM>h p D 51) 1-Aug Howie Kaye why we use email (1170 chars) MM>
Note that move is marking the moved messages as deleted. As usual, they are not removed until you give an expunge or exit command at the MM> prompt, so you could possibly undelete some or all of them if you change your mind. If you know you do not want to delete, use copy instead of move.
The question about whether to create a new file is controlled by the variable auto-create-files, normally set to ask. Since you might mistype the name of an existing file, being asked Do you want to create it? gives you a chance to fix it. If you prefer to skip the question, type set auto-create-files yes and then save-init. Setting it to no would prevent MM from creating any files (it would only append to ones you set up ahead of time), if you want a really controlled environment.
Files created by MM have the mbox format, unless you specify otherwise. MM can also read and write the babyl format used by Emacs rmail, and the mtxt (Tenex) format; for an existing file MM will retain the existing format. To make a new file be babyl, for example, either specify it, like move /babyl oldmail 1:50, or set default-mail-type babyl and save-init to make all new files be babyl format.
The file protection is specified by the variable new-file-mode, normally set to 600, read-write by owner (-rw-------). You can reset this if you like with set new-file-mode and an octal number, and then save-init.
The commands get and examine let you visit a different mail file. For example, once you've created oldmail, you can use command get oldmail to make it the current mail file. You can then use headers all to see what messages are in oldmail, and read to read any message you like. You can even move or copy messages to still another file. To go back to your main mail file, mbox, type get mbox, or just get with no file name.
Mail files are usually arranged in chronological order. If a series of move or copy commands gets a mail file out of order, you can use the sort command, if you like, to put the mail file into chronological order. First get the file, and then sort:
MM>sort MM>
You can keep copies of mail you send in another mail file. One way is to place an fcc field in the outgoing message: use the fcc command at the S> prompt, like fcc mymail. To save all your outgoing mail, you could set the variable saved-messages-file, like set saved-messages-file mymail.
To copy an entire mail file, use the write command with a filename to copy to, so write backup would create a copy of the current mail file and name it backup. This differs from the command copy backup all in that copy omits deleted messages. Instead of write, you could also use the command cp at the UNIX shell prompt.
If you want to eliminate an entire mail file, one way is to get it, then delete all and expunge. When a mail file becomes totally empty, MM removes the file itself (exception: the main mail file is left as an empty file). You can also just use the rm command at the shell prompt: rm oldmail, although please kill the MM process first (the bye command).