[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here 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:

  • The configuration option Ignore-Mail11-Headers is set to True or is not defined. (See the HP TCP/IP Services for OpenVMS Management guide.)
  • The message text starts with SMTP headers.

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 host name is the same as the substitute domain specified in the SMTP configuration.
  • The host name is found in the TCPIP$SMTP_LOCAL_ALIASES.TXT file.

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:

  • GENERIC
    The entire address is changed to the SMTP format. For example, from host widgets.xyzcorp.com , the message header From: ORDERS::J_SMITH becomes:


    From: "ORDERS::J_SMITH"@widgets.xyzcorp.com
    

    In this example, instead of widgets.xyzcorp.com , the value of configuration option Gateway-Node (described in the HP TCP/IP Services for OpenVMS Management guide) is used if it is defined; if not, the value of the SMTP substitute domain is used. Only if both of these options are undefined is the host name widgets.xyzcorp.com used.
  • NONE
    The From: line is sent unmodified to the IMAP client. For example:


    From: ORDERS::J_SMITH
    

    You cannot reply to this type of message from an IMAP client because the SMTP server does not accept an address in this form.
  • TRANSFORM
    The IMAP server attempts to translate the DECnet node name to a TCP/IP host name. If the name can be translated, the IMAP server checks whether the translated host name is local. If so, the From: header becomes an address in the format user@substitute-domain. If not, the From: header becomes an address in the format user@hostname. Note that the IMAP and SMTP servers call the same routine to determine whether a host name is local.
    The following examples show some ways the IMAP server translates DECnet node names to TCP/IP node names. In these examples:
    • The local host name is orders.acme.widgets.com .
    • ORDERS translates the name to "orders.acme.widgets.com" .
      • The message header From: ORDERS::J_SMITH becomes:


        From: j_smith@orders.acme.widgets.com
        
      • For a substitute domain of acme.widgets.com , the message header From: ORDERS::J_SMITH becomes:


        From: j_smith@acme.widgets.com
        
      • If HOST12 translates to host12.acme.widgets.com , which is not local on host name orders.acme.widgets.com , the message header From: HOST12::J_SMITH becomes:


        From: j_smith@host12.acme.widgets.com
        
      • If HOST13 does not translate and host orders.acme.widgets.com has no substitute domain defined, the message header From: HOST13::J_SMITH becomes:


        From: "HOST13::J_SMITH"@orders.acme.widgets.com
        

        In this example, if the configuration option Gateway-Node is defined, then its value is used instead of orders.acme.widgets.com .

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:

  • The value of configuration option Gateway-Node, if defined
  • An SMTP substitute domain, if defined
  • The local host name

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:

  • GENERIC
    The address is changed to the SMTP format. For example, on host widgets.xyzcorp.com , the message header From: ORDERS::"j_smith@acme.com" becomes:


    From: "ORDERS::\"j_smith@acme.com\""@widgets.xyzcorp.com
    
  • NONE
    The From: line is passed unmodified to the IMAP client. For example:


    From: ORDERS::"j_smith@acme.com"
    

    You cannot reply to this type of mail message because the SMTP server does not accept an address of this form.
  • TRANSFORM
    The IMAP server uses the text inside the quotation marks. For example, the message header From: ORDERS::"j_smith@acme.com" becomes:


    From: j_smith@acme.com
    

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:

  • Quotation marks in the address are prefixed with the backslash (\) escape character.
  • The entire address is placed within quotation marks.
  • An at sign (@) is appended.
  • The value of configuration option Gateway-Node, if defined, is appended; if not, the value of the SMTP substitute domain is appended. If both are undefined, then the name of the local host is appended.

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