Index Click this button to go to the index for this section.


mailcv(1)

NAME

mailcv - Converts MH (dxmail) style folders to UNIX style ``From'' folders

SYNOPSIS

mailcv [-adnv] -f filename [outfilename] mailcv [-adnv] -A directoryname outdirectoryname The mailcv command converts a dxmail/MH folder to a UNIX style ``From'' folder or converts a dxmail/MH mail directory hierarchy to UNIX style ``From'' folders and directories.

FLAGS

-f filename [outfilename] Specifies a dxmail/MH folder filename to convert to a UNIX ``From'' style folder named outfilename. If outfilename is not specified, the ``From'' style folder is called filename.mbx. -A directoryname outdirectoryname Specifies a dxmail/MH folder hierarchy, starting at directoryname, converting it to UNIX ``From'' style folders in a directory hierarchy starting at outdirectoryname. To convert a user's entire dxmail/MH default directory, use $HOME/Mail for directoryname. -a Aborts conversion of a folder if a corrupted message is found. A message is corrupted if it is missing one of the primary RFC 822 headers: From:, Date:, Reply-To:. An error message is displayed indicating the number and folder name of the corrupted message. No further messages are copied into the new mail folder. The -a flag overrides the -n flag. -d Deletes dxmail/MH folders and messages that have been converted. This flag should be used with caution (as explained in DESCRIPTION, below). -n Noforce. Skips any corrupted message and continues to convert the folder. A warning message is displayed. The -a flag overrides the -n flag. -v Writes to standard output the folder and message number being converted.

DESCRIPTION

The mailcv command converts dxmail/MH style folders to UNIX ``From'' style folders. In a UNIX ``From'' style folder, mail messages are separated with a ``From'' line at the beginning of each message. The standard directory /var/spool/mail contains mailboxes for each user in the UNIX ``From'' style. A user must specify either the -A flag to convert a directory hierarchy or the -f flag to convert a single folder. If neither is specified a usage error is given. The -A flag causes the mailcv command to read all the message files in directoryname and its subdirectories. It then converts the messages to UNIX ``From'' style folders and creates a new top level directory (outdirectoryname) and subdirectories that correspond to the dxmail/MH folder structure. Thus, when converting a directory containing a folder with subfolders, the folder becomes a directory under the main directory (outdirectoryname) and the subfolders become UNIX ``From'' style folders. If the converted folder also contained messages, a UNIX ``From'' style folder is created with the name of the converted folder concatenated with ``.mbe''. All created folders have the original folder name concatenated with ``.mbe''. When the -f flag is used, only the specified folder, filename, is converted. The messages in that folder are converted into a UNIX ``From'' style folder. Subfolders within the specified folder are not converted. The -v (verbose) flag lists on standard output each folder and message that is converted. A message in a dxmail/MH folder may not have the complete, standard mail message header as specified in RFC 822, and is termed ``corrupt.'' A user may wish to convert all messages, including any that are corrupt, or choose to convert only the correctly created mail messages. By default all message in the dxmail/MH folder, including any corrupt messages, are copied into the new ``From'' folder. The -n and -a flags override this default. The -n flag converts only messages with correct mail message headers and skips over any corrupt messages. The -a flag aborts the conversion of a folder if it finds a corrupt message. If a corrupted message is found during the conversion, and neither the -n nor the -a flag was specified, the message is converted and the missing headers are filled as follows: the From field is set to ``USER@UNKNOWN'' and the Date field to ``Mon, 01 Jan 1976 09:00:00 -000''. It is strongly recommended that the -v flag be used when using either the -n or -a flags so that there is a record of which messages get converted. The -d flag deletes mail messages and folders. If the folder has other files besides MH style messages, the folder will not be deleted. The -d flag is provided as a convenience but its use can complicate the conversion process and is not recommended. A safer procedure is to convert without the -d flag and subsequently remove the MH folders and messages using the rm command. When the -d flag is used with the -a flag, if the process is aborted in the middle of a mail folder, only the messages that were copied into the new mail folder are deleted. This may complicate the conversion of the rest of the folder. When the -d flag is used with the -n flag, if a problem is found with a message in a folder, and that message is skipped and not converted, the message is not deleted from the folder. The nonempty folder can not be deleted. This scenario could cause difficulties if the user wants to convert the skipped message and put it into the newly created mail folder.

EXAMPLE

mailcv -A $HOME/Mail $HOME/NewMail Converts all the messages found in the user's mail directory to the UNIX ``From'' format.

RELATED INFORMATION

Commands: dtmail(1), dxmail(1X), mh(1), sh(1)