160: How do I recover my mail files after RMAIL munges their format? Users who just want to try RMAIL out to see how it works end up trapped using it because saved mail in their `mbox' file has been converted into an incompatible format (BABYL) that only RMAIL understands. RMAIL provides no obvious way to reverse this transformation. To convert a mail file back to standard Unix format, there are several methods: * Use the rmail-output ("C-o") command within RMAIL on each message in the file. First use M-x rmail or M-x rmail-input to visit the RMAIL file in Rmail mode. Type "1 j" to go to the first message. Use the C-o command to output the message to a Unix format file. Type "n" to go to the next message. Repeat. * If the file contains hundreds of messages, you may not want to repeat this for all of them. Instead of the above, after getting to the first message type this (where "mbox" is the file you want to put the messages in): C-x ( C-o mbox RET M-s ^From: RET M-0 C-x ) (The rmail-search command ("M-s") is used instead of just "n" because it is the only command which will cause an error when it reaches the last message in the file, which is necessary to terminate the keyboard macro. This will fail if there are messages in the file that don't have a `From:' header. This assumes rmail-delete-after-output is nil.) It is wise to save a copy of the RMAIL file first, in case you make a mistake. * There are software packages available for converting files or even entire directories of BABYL files to standard Unix format. These are helpful in this situation, but are intended mainly for people who have used RMAIL for a long time and are converting to some other mail reader. Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see question 91). You may wish to disable RMAIL to avoid accidentally destroying your mbox file (I have this in my .emacs): (put 'rmail 'disabled t) ; avoid mbox destruction