Format: SHOW option Displays information about the MIME environment, depending upon what option is specified. Possible options are CONTENT_TYPE, FILE_TYPES, and VERSION.
1 – CONTENT_TYPE
Displays a table of message Content-Types/subtypes that MIME recognizes for viewing with the READ command, and their associated application viewer to invoke. Other MIME content types and subtypes can be configured in the optional MIME$MAILCAP.DAT file.
1.1 – Examples
MIME> SHOW CONTENT_TYPE Known Content-types: Content-Type: text/html Content-Type: text/plain Edit Command: EDIT/TPU Content-Type: message/rfc822 Content-Type: image/* View Command: $SYS$SYSTEM:XV.EXE %s This example shows there are four "Known Content-types" or types of MIME messages the MIME utility can read. Three are of the type "text" and one is of the type "image". Their respective subtypes are "HTML," "PLAIN" and "RFC822". The fourth type is "image" and the wildcard (*) indicates that any subtype of image, (for example, .JPEG or .GIF), can be displayed on this system using the X-Viewer application ($SYS$SYSTEM:XV.EXE). The editor is set to EDIT/EDT for the text/plain MIME messages. This is the default MIME editor unless specified within MAIL, defined by MAIL$EDIT logical, or set in the MIME$MAILCAP.DAT file. Refer to the NEW or EDIT command /EDIT qualifier for further information about setting the editor. See MIME$MAILCAP.DAT and the examples for more information.
1.2 – MIME$MAILCAP.DAT
The Content-Type table defines how an attachment is read, and optionally, how its output is converted when extracted with the X-FDL=file option. It is constructed from program built-in types and is read from the optional MIME$MAILCAP.DAT configuration files (if they exist). SYS$MANAGER:MIME$MAILCAP.DAT SYS$LOGIN:MIME$MAILCAP.DAT System-wide Content-Types are specified by the file SYS$MANAGER:MIME$MAILCAP.DAT and can be supplemented with additional entries found in the SYS$LOGIN:MIME$MAILCAP.DAT file. These files are not created by default for customization on a per system/site basis. The MIME$MAILCAP.DAT file follows the general format of (Request for Comments) RFC 1524. TYPE/SUBTYPE VIEW_COMMAND The Content-Type table is constructed beginning with the built-in types, then adding the system definitions from the system manager's MIME$MAILCAP.DAT file, and ending with data from the user's default login directory MIME$MAILCAP.DAT file. The entries are displayed in order of the most recently defined (LIFO) entries. In the case of duplicate entries, the first entry is used. This allows a user to customize their own environment while the system manager defines a default system or site environment for all users. Note that by default, only the minimal ASCII types and subtypes are defined. This allows customizing MIME to the system, and for security reasons, allows a regulated site environment. Consider the effect of a malicious user mailing a harmful image (.EXE) file that is executed upon being read with the OpenVMS MIME utility. RFC 2046 lists certain security considerations that should be noted, such as PostScript files that include PostScript operators such as "deletefile" and others that can be used in a malicious manner. For more information, see Example_MIME$MAILCAP.DAT help section.
1.3 – Example MIME$MAILCAP.DAT
# # SYS$MANAGER:MIME$MAILCAP.DAT - system wide definitions # # SYS$LOGIN:MIME$MAILCAP.DAT - user specific definitions # # FORMAT: # # TYPE/SUBTYPE; VIEW_COMMAND; options # # # Netscape handles .HTML, .HTM (and others if you want) # ---------------------------- # - for URL - # text/html; netscape -remote "openURL(%s,new-window)" # - for file - # text/html; netscape -remote openfile(%s) # text/html; netscape -remote "openURL(%s,new-window)" # # A continuation line character '\' # text/htm; \ netscape -remote \ "openURL(%s,new-window)" # # X-View handles images ('*' = wildcard subtype) # --------------------- # image/bmp; xv %s image/*; xv %s # # CDA Viewer handles DDIF, PS, # ---------------------------- # application/ddif; view/select=x_display/FORMAT=ddif %s # # ! Note: There are security considerations with # .PS (and .EXE) files - (file access, write...) # Refer to RFC 2046 # # application/ps; view/select=x_display/FORMAT=PS %s # # X-PDF handles portable document format # -------------------------------------- # # Note: The following definition specifies extracting a PDF # subtype file attachment and to CONVERT the output file # characteristics and record attributes using the FDL # PDF_FILE.FDL file. This definition can be overridden # with the qualifier /FDL=filename for the EXTRACT command. # # This can be used with any subtype. # # application/pdf; XPDF %s; x-fdl=SYS$MANAGER:PDF_FILE.FDL # application/pdf; XPDF %s # # # DECsound # -------- audio/x-aud; sound -volume 100 -speaker -play %s # # Applications we do not have # --------------------------- #application/doc; #application/msword; #application/xls; #application/msexcel; #application/vnd.ms-excel; #application/ppt; #application/vnd.ms-powerpoint; # # In-Line Text - No scroll support, allows query by page and quit # ------------ message/rfc822; TYPE/PAGE=SAVE %s # # # Text - Change the default as above, override the default mail editor # ---- text/plain; TYPE/PAGE=SAVE %s; edit=lsedit %s
2 – FILE_TYPES
Displays the table of file name extensions and the associated Content-Type and Content-Transfer-Encoding that is employed when files of each type are attached to an outgoing message using the ADD command. Like the CONTENT_TYPE table, the FILE_TYPES are defined by built-in entries, followed by system-wide entries, followed by local user-defined entries. File type definitions are found in the configuration file MIME$FILETYPES.DAT, which is found in the SYS$MANAGER: directory and in the user's SYS$LOGIN: directory.
2.1 – Examples
MIME> sho file Known File Types: Extension: HTML, Content-Type: text/html, Encoding: 7bit/8bit This example shows "Known File Types" for MIME as defined in the MIME program, and any others configured in the MIME$FILETYPES.DAT file. When composing a MIME message, the ADD command uses these corresponding settings when given only the file name and extension, (or file type), for example: MIME> add myfile.html This would add the file "myfile.html" with the content type set to "text/html" and an encoding of "7bit/8bit".
2.2 – MIME$FILETYPES.DAT
The FILE_TYPES table is constructed from program built-in types and is read from the simple comma separated list in the MIME$FILETYPES.DAT configuration files, (if they exist). System-wide FILE_TYPES are specified by the file SYS$MANAGER:MIME$FILETYPES.DAT and can be supplemented with additional entries found in the SYS$LOGIN:MIME$FILETYPES.DAT file. The table is constructed beginning with the built-in types, then adding the system definitions from SYS$MANAGER:MIME$FILETYPES.DAT, and ending with data from the SYS$LOGIN:MIME$FILETYPES.DAT file. The entries are displayed in order of the most recently defined (LIFO) entries. In the case of duplicate entries, the first entry is used. This allows a user to customize their own environment while the system manager defines a default system or site environment for all users.
2.3 – Example MIME$FILETYPES.DAT
These following file and its two entries define how to add .JPG and .JPEG files with a "Content-Type" of image/jpg, and an "Encoding" of Base64. # MIME File Type Information File # # These entries are used when adding MIME attachments. # # '#' is a comment delimiter # # Example: # # File Extension: Content-Type: Encoding: # --------------- ------------- --------- # # jpg, image/jpg, Base64 # jpeg, image/jpeg, Base64 # # Other examples can be copied from Netscape's MIME.TYPES # # # DECsound aud , audio/x-aud , base64 # # WAV wav, audio/x-wav, Base64 # # JPG jpg, image/jpg, Base64 jpeg, image/jpeg, Base64 # # # CDA Viewer ps, application/ps, Base64 ddif, application/ddif, Base64 # # PDF pdf, application/pdf, Base64 # # For PC applications we don't have # --------------------------------- doc, application/msword, Base64 xls, application/xls, Base64 ppt, application/ppt, Base64
3 – VERSION
Displays the MIME utility's version number.
3.1 – Examples
MIME> SHOW VERSION MIME Version: Vn.nn This example displays the major version "n" and minor version ".nn" of the OpenVMS MIME utility. The DCL ANALYZE/IMAGE command can also be used to display the identity and linkage date of the MIME executable image: $ ANAL/IMA/SEL=(FILE,ARCH,IMAGE_TY,NAM,ID,BUILD,LINK) SYS$SYSTEM:MIME.EXE SYS$COMMON:[SYSEXE]MIME.EXE;1 Image OpenVMS Alpha Executable "MIME" "Vn.nn" "PCSI-0060000000" DD-MMM-YYYY 23:17:12.88