hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
User's Guide


Previous Contents Index

5.12.2.3 Mapping OpenVMS Mail Folder Names to IMAP Mailbox Names

OpenVMS Mail folders are presented to the IMAP client as IMAP mailboxes. All mailboxes are presented to the client in lowercase characters, beginning with an initial capital letter, and with capital letters following each space, at sign (@), opening parenthesis ( "(" ), underscore (_), and hyphen (-).

The NEWMAIL folder requires special treatment . Because the IMAP protocol requires a top-level mailbox called Inbox, the NEWMAIL folder is mapped to Inbox. When the user opens the mailbox called Mail (which maps to file MAIL.MAI), the NEWMAIL folder is not listed so that the user is not confused by seeing the same folder listed twice.

OpenVMS Mail folder names are usually in all uppercase characters but can contain lowercase characters. Any lowercase characters are mapped to an underscore (_) followed by the character's uppercase equivalent. Underscores are mapped to double underscores (__), and dollar signs are mapped to double dollar signs ($$).

Table 5-3 shows the effects of folder-name mapping.

Table 5-3 OpenVMS Mail Folder-Name Mapping
OpenVMS Mail Folder Name IMAP Mailbox Name
HELLO Hello
Hello H_e_l_l_o
HELLO-ALL Hello-All
HELLO_ALL Hello__All
HELLO$ALL Hello$$All

5.12.2.4 Foreign Message Formats

The IMAP server determines the correct format for common file types. It does this by checking the beginning of the file for a recognizable file header that matches a set contained in the configuration file TCPIP$IMAP_HOME:TCPIP$IMAP_MAGIC.TXT (analogous to the magic files found on UNIX systems). If a matching file header is found, the server can let the client know the MIME type and subtype of the file.

Though most common file formats are included, it is possible to add other formats if the structure of the file header is known.

Table 5-4 describes the format of file-header recognition records.

Table 5-4 IMAP File-Header Recognition
Field Description
Type The type of the data to be tested. Possible values are:
  • byte: A 1-byte value
  • short: A 2-byte value
  • long: A 4-byte value
  • string: A string of bytes
  • integer: An integer can be used indicating a number of bytes (30 or fewer) to allow for long matches. Examples in the configuration file are the two RIFF format files of WAVE and AVI.
Optionally, types can be followed by an ampersand (&) and a numeric value (mask), expressed in hexadecimal, to specify that the value is to be AND'ed with the numeric value before any comparisons are done. Examples in the configuration file are the two RIFF format files of WAVE and AVI.
Test The value to be compared with the value from the file. The rules for the value depend on the type:
  • Numeric type: The value is specified as octal or hexadecimal in the C programming language form where, for example, 013 is octal, and 0x13 is hexadecimal.
  • String type: The value is specified as a C programming language string with the usual escapes permitted (for example, \n to indicate new line.)
Type The Content-Type type to use in the MIME version of this message.
Subtype The Content-Type subtype to use in the MIME version of this message.
Format Either "text" or "foreign," indicating what sort of OpenVMS Mail message will be tested for this match. A test with "foreign" in this field is performed on messages only if they are sent using the /FOREIGN qualifier. Note that this implicitly advertises whether base64 or quoted-printable encoding will be used for a given bodypart type; base64 is used only if the message was sent using the /FOREIGN qualifier.

5.12.2.5 IMAP Message Headers

Mail message headers sent by the IMAP server must conform to the standard specified in RFC 822. Because many of the messages received on an OpenVMS system are not in the RFC 822, or Internet, format (for example, DECnet mail or mail from another message transport system), the IMAP server builds a new set of headers for each message that is not RFC 822 format and is based on the OpenVMS message headers.

Table 5-5 describes the headers on mail messages that are forwarded by the IMAP server.

Table 5-5 Mail Message Headers
IMAP Message Header Obtained From
Date: Arrival date of message. Changed to Internet format, which shows the day of the week, the date, the time, and the time zone offset from Greenwich Mean Time (GMT). An example of the format is Wed, 30 May 01 16:19:53 +0100 .
From: OpenVMS Mail From: field. Rebuilt to ensure RFC 822 compatibility. (See Section 5.12.2.6.)
To: OpenVMS Mail To: field. Rebuilt to ensure RFC 822 compatibility. (See Section 5.12.2.6.)
CC: OpenVMS Mail CC: field. Rebuilt to ensure RFC 822 compatibility. (See Section 5.12.2.6.)
Subject: OpenVMS Mail Subj: field. Accented characters are RFC 2047 encoded, but the change is not visible to users because IMAP clients reverse the encoding.
X-VMS-From: OpenVMS Mail From: field. Not rebuilt.
X-IMAP4-Server: Server host name and IMAP version information. Sent only if configuration option Send-ID-Headers is set to True.
X-IMAP4-ID: Message UID. Sent only if configuration option Send-ID-Headers is set to True.

The IMAP server sends these message headers to the IMAP client unless both of the following conditions are true:

5.12.2.6 OpenVMS Mail Address Fields

The IMAP server rebuilds the From: header. This header can be used as a destination address if a reply is requested from the IMAP client. The same is true for To: and CC: headers, if you request that a reply be sent to other listed recipients. Therefore, the IMAP server rebuilds these fields in compliance with RFC 822 before sending the header to the IMAP client.

Table 5-6 describes the different types of addresses that can appear in the OpenVMS Mail address fields.

Table 5-6 OpenVMS Mail Address Fields
Address Type Address Format
SMTP SMTP%" legal-address", where legal-address is an address that is compliant with RFC 822 and is commonly in the format user@domain.
DECnet node::username
User name username
DECnet address containing quotation marks node::"user@host"
Cluster-forwarding SMTP address node::SMTP% "user@domain"

A host name is local if one of the following conditions is true:

The following sections describe how IMAP rebuilds an address field for each type of address.

5.12.2.6.1 SMTP Address

The IMAP server uses the SMTP address within the quotation marks to rebuild the address field of an SMTP address. For example, message header From: SMTP%"john.smith@federation.gov" becomes:


From: john.smith@federation.gov 

SMTP hides nested quotation marks by changing them to cent sign (¢) characters before passing them to OpenVMS Mail and then changing them back after a reply. The IMAP server removes any cent signs that designate double quotation marks. For example, the following message header:


From: SMTP%"¢ABCMTS::MRGATE::\¢ABCDEF::VIVALDI \¢¢@xyz.org" 

becomes:


From: "ABCMTS::MRGATE::\"ABCDEF::VIVALDI\""@xyz.org" 

5.12.2.6.2 DECnet Address

The value assigned to the configuration option Decnet-Rewrite defines how the IMAP server rebuilds a DECnet address. The following list describes the possible values:

5.12.2.6.3 User Name-Only Address

If the address under consideration is a recipient address, and the From: address is a DECnet address, then the recipient address is prefixed with the same routing information as that of the From: address. Then it is processed as if it were a DECnet address, as shown in Section 5.12.2.6.2.

Otherwise, the IMAP server appends the at sign (@) to the user name, and then appends one of the following, in order of preference:

For example, with an SMTP substitute domain defined as acme.widgets.com , the message header From: Smith becomes:


From: smith@acme.widgets.com 

5.12.2.6.4 DECnet Address That Contains Quotation Marks

The values assigned to the configuration option Quoted-Decnet-Rewrite define how the IMAP server rebuilds a DECnet address that contains quotation marks. The following list describes the possible values:

5.12.2.6.5 Cluster-Forwarding SMTP Address

With a cluster-forwarding SMTP address, the IMAP server uses the SMTP address within the quotation marks. For example, the message header From: ABCDEF::SMTP%"james.smith@federation.gov" becomes:


From: james.smith@federation.gov 

5.12.2.6.6 All Other Addresses

For all other address formats, the IMAP server changes the entire address to the SMTP format:

For example, if the substitute domain is xyz.org , the message header From: ABCMTS::MRGATE::"ORDERS::SPECIAL" becomes:


From: "ABCMTS::MRGATE::\"ORDERS::SPECIAL\""@xyz.org 

If the configuration option Ignore-Mail11-Headers is set to True and the address is an SMTP address, the rebuilt From: field is not displayed to the user. In this case, the IMAP server sends the actual headers from the body of the mail as the mail headers.

5.12.2.7 Uploaded Messages

You can copy mail messages stored on the local client system to OpenVMS Mail. This action is termed uploading and involves the creation of a new OpenVMS Mail message.

When a message is uploaded, OpenVMS Mail treats it as a new mail message, and a "New Mail" broadcast message is issued. You see this message if you also have an OpenVMS VT session open with receipt of broadcast messages enabled.

When a message is uploaded, the entire message is copied along with the header information described in Table 5-7. Note that the additional header information is visible only if you read it with MAIL or if the configuration option Ignore-Mail11-Headers is set to False.

Table 5-7 describes the typical headers in an uploaded message.

Table 5-7 Header Information in Uploaded Messages
Header Value
Body: The entire SMTP message, including headers.
From: The underscore character (_), followed by the name of the user who is uploading the message
To: The underscore character (_), followed by the name of the user who is uploading the message
Subj: The subject of the uploaded message.


Previous Next Contents Index