This chapter provides information on
how to migrate mail and calendar to CDE.
Many people have mail folders and
calendar databases that they want to continue to use in their new environment.
Changing to a new application often means losing this information.
To ease
the complexity of migrating, you can use the tools described in this chapter
to convert your existing
dxmail
and
dxcalendar
folders and databases into a format that is understood by the CDE
mail and calendar applications.
The
Common Desktop Environment: User's Guide
provides details on using the CDE Mail and Calendar
applications.
See
Appendix A
for information on the differences
between the MH/dxmail
and
dtmail
mail
handlers.
This chapter describes how you can do the following:
The CDE mail application is completely integrated with the environment
and thus offers more flexibility than continuing to use the
dxmail
application.
For example, files can be dragged from other CDE
applications and dropped onto the mail application for further action.
The CDE mail application also supports Multimedia Internet Messages Extension (MIME). Support for MIME lets you send and receive mail messages in formats other than ASCII text. For example, you can send and receive messages that are in video format.
Before you convert your mail formats to a format that can be read by
the CDE mail application, you should understand how mail is stored by both
applications.
You can then convert your mail from the
dxmail
format to the
dtmail
format by using the
mailcv
utility or the CDE File Manager.
This section provides information on the following:
10.1.1 Understanding How Mail Is Stored
The
dxmail
and
dtmail
applications
store information differently.
For this reason, you must convert your
dxmail
folders to a format that can be read by the
dtmail
application.
10.1.1.1 Storing MH/dxmail
To store mail, the MH/dxmail
application
creates a mail hierarchy with a top level directory.
The location of this
directory is defined in your
$HOME/.mh-profile
.
This
profile not only specifies the location of your top level directory, it also
includes other information about the setup of your mail.
Usually, the path
for the top level directory is set to
$HOME/Mail
.
If
you changed this path, you can verify its location by using the
mhpath
command with the
+
flag.
You need to
know the location of your top level directory to convert mail folders.
Note
To use the
mhpath
command, the MH subsets must be installed on your system.
Under your top level directory
Mail
, you may have
several other directories (folders) or files.
Messages are stored in folders
numerically and in sequential order.
Each message corresponds to an individual
file as follows:
/inbox | /drafts | /meetings | /personal | ||
1,2,3 | 1,2 | /group | /unit | 1,2,3 | /gardening |
1,2,3 | 1,2,3 | 1,2,3 |
In the previous example, there are four folders directly under the top level
directory
Mail
.
Individual messages are stored numerically.
For example, under the folder
Inbox
, there are three
files that contain individual mail messages.
They are numbered
1
,
2
, and
3
.
Some directories
have subdirectories such as
meetings
, which includes
subdirectories for
group
and
unit
.
Mail messages are further grouped under these directories numerically.
10.1.1.2 Storing CDE Mail
The CDE mail application
dtmail
has no set structure for how messages are stored.
You can create mail folders
in any directory that you can access, and you can store more than one message
in a mail folder using the UNIX "From" format.
Mail messages stored
in the same mail folder are concatenated with each message separated by a
UNIX "From" header.
Mail utilities such as
mailx
use this format and can also read these messages.
The following is a sample
mail hierarchy that can be created with the
dtmail
application.
In this example, messages are stored into mail folders that have a
.mbe
extension.
MailBox |
||||
inbox.mbe |
drafts.mbe |
/meetings |
/status |
|
/group |
/unit |
jan.mbe
feb.mbe |
||
wkly.mbe |
mthly.mbe |
In
the previous example, the top level directory,
MailBox
,
is displayed.
Under this top level, there are both directories and mail folders.
The mail folders can contain one or more mail messages.
A mail directory
can contain both mail folders and other subdirectories.
Messages are concatenated
in the order they are saved.
10.1.2 Converting Mail Using the Mail Conversion Utility
The
mailcv
utility is a command line interface that you can use to convert
an entire directory or an individual folder.
There are several flags available
that you can use to control how mail is converted.
In addition, the
mailcv
utility can be used to detect errors that may have occurred
when you stored messages.
See the
mailcv
(1)
reference page for information about
the mail conversion utility.
By default, all messages created by the
dxmail
application
are converted, including any corrupt messages.
See
Section 10.1.2.4
for information on corrupt messages.
10.1.2.1 Converting an Entire Mail Directory
To convert an entire mail directory (folder) by using the
mailcv
utility:
Change to your top level mail directory.
By default, this
is
$HOME/Mail
.
Type the
mailcv
command with the
-A
flag to specify that you want to convert the entire directory
and subdirectories.
You must specify the current directory name and the name
of the new directory that is to be created as follows:
%
mailcv -A $HOME/Mail $HOME/NewMail
This example creates a new top level directory called
NewMail
.
It then creates the subdirectories that correspond to the
dxmail
folder structure and all mail messages are converted.
10.1.2.2 Converting an Individual Folder
To convert an individual folder using the
mailcv
utility:
Change to the directory that contains the MH folder and message files you want to convert.
Type the
mailcv
command with the
-f
flag to specify that you want to convert a folder to the UNIX
From format.
You must specify the current name of the folder followed by
a new name for the folder as follows:
%
mailcv -f inbox Inbox
This
example creates a new folder called
Inbox
.
If a new folder
name is not specified, a new folder is created using the name of the current
folder followed by the extension
.mbe
.
If the folder you are converting contains subfolders, the subfolders are not converted. Use the steps described to convert each folder or subfolder.
10.1.2.3 Using Flags to Control Mail Conversion
The
mailcv
command offers several command flags that
you can use when converting mail folders and directories.
The flags are described
in detail in the
mailcv
reference page.
Using the
mailcv
command, you can specify flags to:
Stops the 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 that include: From, Date, and Reply-To. An error message is displayed indicating the number and folder name of the corrupted message and no further messages are copied into the folder.
Delete MH/dxmail
folders and messages after
they have been converted.
However, if the folder contains other messages
not in MH format, the folder is not deleted.
Skip over any corrupt messages and continue with the conversion of messages that have the correct mail headers.
Write to standard output the folder and message number that is being converted.
10.1.2.4 Converting Corrupt Mail Messages
If you do not use the
mailcv
utility with the flags
that handle corrupted messages, the messages headers are converted as follows:
From field is set to
USER@UNKNOWN
Date field is set to
Mon, 01 Jan 1999 09:00:00 -000
10.1.3 Converting Mail Using the File Manager
The CDE File Manager provides a graphical display of directories and files. Using the CDE File Manager, you can convert the whole mail hierarchy or you can convert a single folder.
Although the CDE File Manager calls the
mailcv
utility
to complete the conversion, it does not provide you the option of specifying
flags to detect mail header errors.
To detect errors before converting your
mail directories, use the
mailcv
utility's command line
interface.
If you do not address corrupt files, the corrupt files are converted
as described in
Section 10.1.2.4
10.1.3.1 Converting the Entire Mail Hierarchy
To convert the entire mail hierarchy from the CDE File Manager:
Start the CDE File Manager.
Change to the directory that contains the MH folders to be converted.
Point to the MH mail folder icon, then click on mouse button 3 to display the Action menu.
Select the Mail Convert menu item from the Action menu. A dialog box appears. You must enter a new pathname for the new directory hierarchy. Click OK after entering the new directory name.
After you select a new location for the directory hierarchy,
the
mailcv
utility begins the conversion.
Depending on
the size of the mail
hierarchy, the conversion may take some time.
When it is complete, your mail
is accessible
from the CDE mail application.
10.1.3.2 Converting an Individual Folder
To convert a single folder from the CDE File Manager:
Start the CDE File Manager.
Set your path to the MH pathname where the top level mail
directory
is located.
Use the
mhpath
command with the
+
flag if you are unsure of the location.
Note
To use the
mhpath
command, the MH subsets must be installed on your system.
After setting your path, the CDE File Manager displays the Mail directories (folders). Each is represented by an icon.
Change to the folder that you want to convert.
Select the Mail Convert menu item from the Action menu. A dialog box appears. You must enter a new folder name for the new folder. Click OK after entering the new name.
After you select a new location for the folder, the
mailcv
utility begins the conversion.
Subfolders in the folder you
are converting are not converted.
Depending on the size of the folder, the
conversion may take some time.
When it is complete, your mail is accessible
from the CDE mail application.
10.2 Converting Calendar Databases
The
dxcaltodtcm
application converts a calendar database file that has
been created with the
dxcalendar
application to a format
that can be used by the CDE calendar application,
dtcm
.
To convert a
dxcalendar
database:
Invoke the
dxcalendar
command with the
-migrate
option.
$
dxcalendar -migrate
A text file called
$HOME/dwc_db_migration.data
is created.
This file contains your calendar entries.
Run the CDE Calendar application,
dtcm
,
and set the hour display to
12
.
Invoke the
dxcaltodtcm
application to read
the
created text file and add the entries to the CDE calendar database.
The
dxcalendar
command is in
/usr/bin/X11
and the
dxcaltodtcm
command is in
/usr/dt/bin
.
Note
Because some features of the DECwindows Calendar are not available in the CDE Calendar, some loss of information is possible in converting a calendar database. See the
dxcaltodtcm
(1) reference page for a list of restrictions.