PMDF User's Guide
OpenVMS Edition


Previous Contents Index

10.2.1 Folders

Selecting your mail file and folders

By default, the IMAP server serves out your default VMS MAIL mail file. Your IMAP client likely provides an option for selecting what mail file (and possibly folders) you really want to access. The name of such a client option can be something like "folder prefix" or the like.

The format that the PMDF IMAP server expects is


#mail-file#folder-pattern 
where either or both of mail-file or folder-pattern can be omitted. If no mail-file is specified, your default VMS MAIL mail file will be served out; if no folder-pattern is specified, then all folders in the selected mail file will be served out. You would specify a folder-pattern if you wanted to access only certain folders in your mail file; however, note that some IMAP clients will not properly handle specifications of particular folders.

For instance, a user wanting to access all the folders in a non-default mail file might specify:


#DKA1:[JOHN.MAIL]OLDMAIL.MAI# 

Subscribed folders

IMAP allows you to mark certain folders as being "subscribed"; your client can then either only show you your subscribed folders, or allow you to select whether to see all your folders, or only your subscribed folders The format to use when subscribing folders is the same as that shown above for selecting a mail file and folders; as above, note that some clients might not properly handle the case where you attempt to subscribe only folders of a certain name or pattern.

The list of "subscribed" folders is stored as the file PMDF_IMAP.MAILBOX 1 in your default mail directory, as specified by your VMS MAIL profile.

The INBOX and NEWMAIL folders

The folder name INBOX is treated as a synonym for the NEWMAIL folder in your default mail file.

Moving messages between folders

Note that unlike VMS MAIL behavior, the standard IMAP behavior is that messages moved are inserted at the end of the folder when moved.

Reading and deleting messages and folders

Messages marked for deletion are not actually moved or deleted until the client software sends an EXPUNGE command; the messages marked for deletion are then moved to the WASTEBASKET folder. Whether or not messages in the WASTEBASKET folder are actually deleted depends upon the setting of the VMS MAIL AUTO_PURGE option.

When a folder is deleted, its contents are moved to the WASTEBASKET folder; whether or not the messages are then deleted upon session termination depends upon your setting of the AUTO_PURGE option in VMS MAIL.

Hierarchical folders

Although VMS MAIL itself does not support hierarchical folders, the IMAP server effectively provides hierarchical folders to IMAP clients accessing a VMS MAIL mailbox.

The forward slash character, / , is used as the hierarchy separator.

A folder name can be any valid VMS mail folder name; note that such names are case sensitive and have a maximum length of thirty nine characters.

Each non-top-level folder in a mail file is implemented as its own separate subdirectory directly under the corresponding mail file directory. So note that the hierarchy of the folders in not reflected in a directory hierarchy; the subdirectory names themselves are random, unique names, and all the subdirectories are directly below the mail file directory. Instead, in the mail file directory itself is stored an auxiliary file PMDF_IMAP.MBXDIR which contains a mapping between the hierarchical folder names, and the corresponding subdirectories directly below the mail file directory. Do not delete the PMDF_IMAP.MBXDIR file. Each folder has its own subdirectory; in that subdirectory is a mail file always named MAIL.MAI containing the message files for the folder, and an auxiliary file HIERARCHY.NAME which is a single record file containing merely the name of the folder to which the subdirectory corresponds.

It is not necessary to create "intermediate" folders before creating a terminal folder; for instance, folder apple/banana can be created before folder apple has been created.

A folder can only be deleted if it has no subfolders.

Note

1 The format of this file is very similar to the .newsrc file on UNIX systems. The only difference is that the last character of an active mailbox is = instead of :. This is because : could be a valid character in the mailbox when a complete file name is specified.


Previous Next Contents Index