Users may use mouse button actions in the (top) index window to select a message for further processing (by pressing the left mouse button), or automatically read the selected message (by pressing the right mouse button).
Folder specification is aided by a selection menu which can walk down through the user's folder directory hierarchy (by pressing the right mouse button in the Folder command button window).
A short description of each command button's function is presented in the status window whenever the mouse cursor enters any of the xmail command button windows. Additional help information is presented for any command button or other part of xmail by pressing the middle mouse button while the mouse cursor is within the window or command button. In the case of windows which normally accept the pasting of text via the middle mouse button, help is available while also holding down either Shift key. Those special case windows are so indicated by the message displayed in the status window while the mouse cursor is within those particular windows.
Message composition and modification are provided by the user's preferred editor (/usr/ucb/vi by default). Editor preference may be specified using either the user's process or Mail environment variable VISUAL, or the xmail command line or application resource editorCommand.
Support can also be provided for displaying the content of an X-Face mail header, should such a header string be present in the received message, and for adding your own X-Face header to outgoing mail, if available.
Almost all of the xmail functionality depends upon the existence and proper installation of the XMail default resources file (typically in the directory /usr/lib/X11/app-defaults). Functionality may be modified to some extent by the user's specification of some or all of those resources.
Immediately below the title bar, an index window displays header information for the current mail folder. Message selection is indicated by a greater-than ">" symbol located at the beginning of the header line for the particular message. New and unread messages are indicated by "N" and "U" characters respectively, preceding the message number. Deleted messages not yet removed from the index list have the letter "D" preceding the message number. Saved messages are now marked with the letter "S", to denote the fact that such messages in your system folder would normally disappear from that folder when you finally commit the changes. (Although messages in other folders that are saved will also be marked with an "S", they do not by default get removed from that folder when the changes are committed. Such messages must be explicitly deleted if so desired.) Messages that are marked for preservation in the system folder are now marked with the letter "P" until the folder changes are committed. Keyboard keys can be used to scroll the index window in much the fashion of text display programs such as more or less, in addition to the more traditional mouse on scrollbar mechanism.
Just below the index window, a status window displays information, status, and error messages. As the mouse cursor is moved between the various command button windows in the xmail program, a short description of the particular button's function(s) is displayed in the status window. Moving the mouse cursor out of that command button's window restores the default information about obtaining help on any part of xmail. Error and status messages are also displayed in this same status window. The terminal bell is usually rung to draw attention to these messages. The status bell can be disabled using a command line option or resource specification.
Immediately below the status window and attached to it, the xmail shell displays a panel with a selection of commonly used Mail commands. Pressing and then releasing (also known as "clicking") the left mouse button while the mouse cursor is within a particular command button box invokes that Mail command.
A grip at the top right corner of the command panel permits the user to slide the status window/command panel combination up and down in the xmail shell, to accommodate those times when the user is reviewing a short list of longer than average messages, or a longer list of relatively short messages.
Each button in the command panel also offers an expanded menu of choices related to that particular command. Pressing the right mouse button presents the user with the expanded menu. Dragging the cursor over one of these selections while still holding down the right mouse button causes the particular menu selection to highlight. A description of the highlighted command's function is also displayed in the status window. Releasing the right mouse button while a selection is highlighted invokes that particular command.
Keyboard accelerators for these actions are indicated by appropriate entries in the command menus. Users may take advantage of these accelerators by holding down the Shift and/or Control key(s) prior to clicking the left mouse button on the desired command, in lieu of raising the command popup menu.
Messages are displayed in the bottom text window of the xmail shell. Like the index window above, scroll bars provide easy access to any portion of the text. Keyboard keys can also be used to scroll the text window. If the displayed message contains an X-Face header string, the content of that string is displayed as a bitmap in the upper right-hand corner of the text window. (This feature is a compile time option, and requires the existence of the compface library routines, which are not supplied with the xmail sources. See the section on X-FACE HEADERS for details on acquiring this library.)
In addition, both the text window and index window have duplicate keyboard definitions to augment using the mouse on the command buttons for normal xmail command operation. Like many of the resources for xmail, these key bindings are now declared in the application resource file, to allow the user to modify them as desired.
Upon completion of the editing phase of a send/reply operation, the user is presented with a completion popup window which contains areas for specifying the message header addressees, subject, and carbon and blind carbon copy recipients. This information can now also be modified directly within the message composition, by specifying the editheaders Mail program option. This option is normally declared within the user's .mailrc file, but can be toggled on and off using the special Set option menu provided with the preserve command button. (See the section on CHANGING or the on-line help information for the preserve button for additional details.) Also present in the completion popup are command buttons to add one of two forms of user signature, Re-Edit the message composition, Cancel and save, Abort, or Deliver the message to the indicated recipients. The pressing of these command buttons using the mouse may also be simulated by using the keyboard meta keys and the first letter of the particular command, with the exception that the adding of autograph signatures is denoted by the use of either the "S" (for upper-case Autograph Signature) or "X" (for the lower-case version) keys, since the "A" key is used for effecting the Abort function. When either the Cancel, Abort, or Deliver function is executed, the composition popup is automatically removed from the display.
A modified mailWatch widget (ala xwatch) is used as the xmail icon window. The mailbox flag in the icon window will be raised and mail shown inside the box, whenever new mail arrives while the application is in its iconic state. In the non-iconic state, the Newmail command button is highlighted to signal new mail arrival. Clicking on the Newmail button will reset the flag and highlighting, and deliver the new mail to your display.
Pressing the middle mouse button while the mouse cursor is within any window or command button of the xmail shell (in some cases while also holding down either Shift key) will cause help information relating to that window (or button) to be displayed in the (bottom) text window. Releasing the mouse button will cause that help information to be removed. Pressing the "?" key in the text window will cause a second page of help information, relating to the default bindings for the keyboard keys, to appear. Pressing the "LineFeed" or Control_J key will cause that second help window to be removed.
During command execution, the cursor is changed to a watch face to indicate that xmail is busy. Upon completion of the activity, the cursor is restored to its previous value.
- DEAD
- Normally specified in the user's .mailrc file, this variable indicates the name of the file to use when storing dead or canceled letters. If unspecified, it defaults to "dead.letter" in the user's HOME directory.
- HOME
- Defines the path to the user's home directory, and is used in determining the complete path for mail folder and dead letter files. If unspecified, this information will be extracted from the user's entry in the password file.
- MAILRC
- If defined, denotes the full name of the user preferred Mail program startup file, used to define various mail state variables. By default, Mail (and xmail) will look for the file .mailrc, in the user's home directory.
- MBOX
- Normally specified in the user's .mailrc file, this variable denotes the preferred file to use when storing letters that are no longer to be preserved in the system mail folder, and letters copied or saved to no other specific file.
- VISUAL
- Normally specified in the user's .mailrc file, this variable denotes the preferred editor to use when composing messages in xmail. This information can be overridden by specifying a value for the editorCommand command line or resource declaration.
- XMAILER
- If defined, points to the particular executable to be used as the Mail program. Normally, xmail establishes connections with Mail in the default path of the process (assumed to be at least "/bin /usr/bin /usr/ucb"). If need be, this environment variable can be used to provide a specific path to the Mail or other named program. Note: xmail may not work correctly with any mail program other than the intended Berkeley Mail program.
Folders which are actually directories (that might possibly contain additional folder files) are displayed with a trailing slash (/) character. Clicking the left mouse button within a directory folder while still holding down the right mouse button (also known as "expanding") causes xmail to expand that directory and display (on a new menu level) any files found there. Dragging the cursor over one of these selections and releasing the right mouse button copies the complete folder path name to the file window. This nesting of folder names may be repeated as often as there are legitimate folder directories. Clicking the left mouse button on an empty folder directory rings the terminal bell. Dragging the cursor beyond one of these nested menu levels causes that menu to disappear, without making a selection. Re-clicking the left mouse button on the directory folder redisplays the nested menu.
Because of the methodology utilized in determining the folder list menu widget hierarchy, certain restrictions must apply when declaring folder directories. No folder directory name may contain an embedded period (.) or asterisk (*), since these items are utilized by the resource manager (and toolkit function XtNameToWidget) to indicate the potential widget hierarchy. If a folder directory name exists at any level with one or more of these characters embedded in its name, attempts to access that folder directory will result in a beep and no further expansion.
The first request for the folder menu extracts (from Mail or the system) the necessary information to create the menu. Subsequent requests simply redisplay that menu. To force xmail to recalculate the folder menu content, use the Newmail button option which causes xmail to destroy all current folder menus. This mechanism provides access to folders created since the startup of xmail. Pressing the right mouse button on the Newmail command box will present the Newmail command menu, which has a choice to drop the current folder list. This same option is also available using the designated accelerator key and left mouse button on the Newmail command button box.
As message are stored or otherwise delivered to one of the folder files, the accessed and modified time stamps for that folder file are updated by the system. xmail uses that information to indicate (via the addition of a hatching pattern to the background of a particular folder button label) when a folder has been modified since the last time it was accessed. This feature presents a method of indicating when new messages exists in a particular folder file. Reading the particular folder automatically resets this indicator, although in some instances remotely accessed folder files (such as those on an NFS mounted file system) may not properly or consistently update this time information.
The original folder being read by the user will be automatically reinstated as current whenever xmail is again deiconified. This action will flush any deleted messages from the index headers and renumber the remaining messages in the folder. The last message in the folder will then become the current message displayed (unless xmail was started with the *Show_Last resource option disabled, in which case the first message would be made current).
If the "current" folder was the user's system folder, any new mail received since the iconification would be automatically included by the re-access. If some other folder were current (or no folder, due to initial conditions of no mail for the user), deiconification would not cause the reading of any new mail. Under those circumstances the user must press the Newmail command button to change to the system mail folder (and read the new mail).
The icon window also supports an auxiliary identification mechanism, for users that might have more than one account, possibly on more than one machine, and that wish to be able to identify otherwise duplicate xmail icons. Pressing the "h" key while the mouse cursor is within the icon window will cause the icon to be tagged with the machine's hostname. Pressing the "u" key will cause the user's login name to be displayed. Pressing the "space" bar will clear the icon window of either name. Changing the tag space content of the icon will also change the title of the application for window managers. This allows the user to distinguish between several xmail invocations from the window (or icon) selection menus of the various window managers. The hostname or login name addition may also be pre-selected using either command line options or resource declarations if desired.
Iconification is typically promoted by user definable button events which are particular to the window manager in use at the time. Pressing the National Semiconductor Corporation logo displayed at the left of the title bar will also cause xmail to issue a window manager request for iconification. ICCCM compliant window managers should honor that request by iconifying the xmail application.
Pressing the "q" key while the mouse cursor is within the xmail icon window will cause xmail to terminate. xmail also honors the ICCCM Window Manager protocol request WM_DELETE_WINDOW to terminate the xmail application.
These keyboard accelerators will only be available if the resources are declared either in the application defaults file (which must be properly installed) or the user adds the necessary declarations to their local default resources.
The following table lists the key definitions and their respective actions. The abbreviation "Ctrl" means to press down and hold the Control key while pressing the specified letter key. "Meta" likewise refers to the meta keys (labeled "Left" and "Right" or with a diamond symbol on Sun type-4 keyboards).
Key Name Action Taken -------- ----------------------------- Ctrl V move to the next page space move to the next page Meta V move to the previous page b move to the previous page Ctrl Z scroll one line up Return scroll one line up j scroll one line up Meta Z scroll one line down k scroll one line down - scroll one line down ' move to the beginning of file Meta < move to the beginning of file Meta > move to the end of file Shift G move to the end of file
In addition to the scroll key definitions, both windows also support keyboard accelerators for most of the command buttons. Where possible, these keyboard keys replicate the actual commands that would be typed if the user were running the native mail program directly. Thus, to begin sending a mail message to some recipient, the user could press the "m" key, and to delete a current message, the user could press the "d" key. Certain exceptions and additions have been made, in order to avoid conflicts within the xmail program.
Key Name Command Action Taken -------- ----------------------------- Shift A reply to all, include the current message Shift C copy the message to the author's name Shift F forward the current mail message Shift M reply to a mail message Shift N bring new mail into your system folder Shift P send the current message to the printer Shift R include the current message in a reply Shift S save the message to the author's name a reply to all recipients of a message c copy the message to the indicated folder d delete the current message f read the full header of the message i incorporate new mail without commit m mail (compose) a new mail message n read the next mail message p read the previous mail message q quit xmail, committing any changes r read the current mail message s save current message in specified folder u undelete the most recently deleted message w writes the message to the indicated file x exit xmail, without committing changes ? displays help for these key definitions <LF> removes help for these key definitions
xmail recognizes resource definitions for each of its component windows and command buttons. Wherever possible, button resources have been named for the label (or first word in the label) of the command button. (The exception is the preserve "set" menu, whose resources are identified by the second word in each label.) Thus :
- *read
- specifies resources for the read command button
- *save
- specifies resources for the save command button
- *autoprint
- specifies resources for the set autoprint command button, and
- *noautoprint
- specifies resources for the set noautoprint command button.
Color may be added (on a color display device) to enhance the appearance of xmail. Example resources in the application defaults file have been left in a commented condition. They may be implemented by uncommenting the appropriate lines in the defaults file, or overridden by designations in the user's .Xdefaults file, or (in some cases) by command line options. Resources specified in the user's .Xdefaults file should be preceded with either the xmail application or XMail Class resource identifier.
In addition to those resources named for a particular xmail command button, the following additional resource names are recognized:
- *buttonFont: <fontname>
- denotes a preferred font to use when creating the command buttons. The width of the xmail shell, and thus its general appearance is controlled by the font specified for buttons. If different fonts are specified for buttons and text, and the font for text is of a larger point size than that specified for buttons, then text in the index and text windows will most likely wrap during display.
- *Bcc
- controls resources for the Bcc: entry window
- *bellRing: <boolean>
- Normally true, this boolean enables ringing of the terminal bell during status and error message display.
- *Cc
- controls resources for the Cc: entry window
- *commandPanel
- controls resources for the command panel
- *customHeader
- This resource can be used to specify additional mail headers to be included in the headers of all outgoing messages created by the user. The information contained in this resource MUST conform to the format of mail headers, namely a keyword, such as Organization: (which must include the trailing colon character), followed by a space character, and the text of the information. An example custom header resource declaration would be:
xmail*customHeader: Organization: Your_Company_Name
A set of default resource definitions are provided in the file /usr/lib/X11/app-defaults/XMail. User's may wish to include appropriate alternate definitions in their $HOME/.Xdefaults file, to tailor preferences for colors and/or fonts.
The editorCommand resource must define a string with two sprintf-able format declarations, one for the name of the X11 server display connection, and one for the name of the file to be edited. The editorCommand specification must also ensure the proper creation of an appropriate X11 window for completing the desired editing session.
The resource may be specified on the command line, either as an option, or as a resource manager string. It may also be specified in the user's applications default file as an xmail resource. Examples of editorCommand specification strings include:
xmail -editorCommand 'emacs -display %s -name XMail %s' xmail -xrm '*editorCommand: xterm -display %s -e vi %s' xmail.editorCommand: xedit -name XMail_Edits -display %s %s xmail.editorCommand: emacs -display %s %s xmail.editorCommand: xterm -display %s -name XMail -e vi %s
If the editorCommand resource fails to provide the required string declarations for the display and file names, or it is not defined, xmail will default to the older method of utilizing the information in the user or Mail process VISUAL environment variable. The default editor will be vi, if no VISUAL (mailrc or process) environment variable definition exists.
Upon completion of the send/reply editing session, a popup window will be displayed containing To:, Subject:, Cc:, and Bcc: fields for the current message composition. Help is available for each of these fields, as it is for all of xmail.
A menu of mail aliases (extracted from the user's .mailrc file) is available for access from any of the To:, Cc:, or Bcc: windows. Pressing the right mouse button while the mouse cursor is in any of these input fields causes the alias names menu to be displayed. If the user has not defined any mail aliases, the terminal bell will be rung instead, to indicate that no alias names menu is available.
Like the File: window used to enter file and mail folder names, the content of the send window popup fields may be modified by the user as needed. Backspace and delete keys remove the previous character, control_W deletes the previous word, and control_U deletes the entire line of information. Pressing the Return key in any of these four fields causes the cursor to automatically warp to the next field.
Users may append their Sign or sign autograph (see Mail(1) ) once only to the end of the composed message text. If the user does not set a [Ss]ign value in their .mailrc file, this version of xmail will also look in their home directory for either a .signature or .Signature file (depending on which of the two [Aa]utograph buttons was pressed) to append to the message text.
Pressing the Re-Edit button allows the message to be re-edited, while the Cancel button terminates delivery but saves any partial composition in your dead.letter file. Pressing the Abort button cancels delivery but does not save the composition, while the Deliver button causes the message to be delivered to the sendmail daemon.
The pressing of any of these command buttons may also be simulated while the mouse cursor is anywhere within the popup window, by using the keyboard meta keys and the first letter of the command, with the exception that the adding of autograph signatures is denoted by the use of either the "S" (for upper-case Autograph Signature) or "X" (for the lower-case version) keys, since the "A" key is used for effecting the Abort function.
When either the Cancel, Abort, or Deliver function is selected, the composition popup is automatically removed from the display.
If the user attempts to deliver a message with no designated recipient or no message body and no message Subject line specified, xmail will re-display the completion popup, to permit the user to Re-Edit the message body, add a Subject designation and/or recipient, or specifically Abort the message delivery.
Mail forwarded to another user will be bracketed by a "Begin Forwarded Message/End Forwarded Message" string pair when using the "forward message" Send command menu option. Also included will be a "Forwarded: Mail from ..." line in the mail header.
Reply messages will include a "In-Reply-To: Mail from ..." string in the mail header. Like the "Forwarded:" header described above, it will include the name of the original sender, as well as the date the original message was received.
If an X-Face header exists for the user, it will be inserted in the mail header section of the outgoing message. This header must be stored in the file .face located in the user's home directory.
Users may provide additional custom header information to be applied to all outgoing message compositions, by using the *customHeader xmail resource designation. Specified information must conform to the format of mail headers as noted elsewhere in this documentation.
The default VISUAL mechanism invokes the vi editor in an xterm window, using the xmail Class resource as it's name identifier. This allows message composition window resources to be declared using the xmail Class resource name followed by the xterm terminal resources identifier "vt100", as in "XMail*vt100.<resource: value>".
For example, the author uses the following resource definitions in his .Xdefaults file, to control the size and placement of message composition windows.
XMail*vt100.geometry: 80x27+30+100 XMail*vt100.font: fg-22 XMail*vt100.foreground: white XMail*vt100.background: blue XMail*vt100.mouse: white
- alwaysignore
- If set, causes xmail to ignore those header fields specified with the ignore .mailrc environment variable, when printing messages or when including message text in a send/reply composition. This variable can be altered during the execution of xmail. (See the section below on Changing Variables.)
- autoprint
- If enabled, causes the current message text to be displayed when deleting or undeleting messages. If not enabled, users must select or read the desired message. This variable can also be altered within the current xmail execution.
- bell=value
- If defined, determines the number of times the terminal bell would be rung to indicate the arrival of new mail. A minimum of once and a maximum of five times is the permissible range. Whether the terminal bell rings at all when new mail arrives is controlled by the "*icon*bell: <boolean>" resource (or -nb command line option) described above.
- editheaders
- Like Mail and mailtool, xmail permits the user to set and modify the outgoing messages mail headers while composing the message, if this variable is set. This variable can be toggled during xmail execution, using the capabilities of the Set menu provided under the preserve command button.
- hold
- Like mailtool, xmail sets "hold" on the user's system mail folder, unless "nohold" has been explicitly specified in the user's .mailrc file. This variable can also be altered during xmail execution.
- printmail=printer command
- This variable, originally created for the Sunview mailtool, allows the user to specify a preferred command to use when printing messages. The default command is "lpr -p". If the user is not using Sun's version of the mail handler, then the print mechanism will first copy the selected message to a temporary file before printing it. This implies that the printmail command must also remove this temporary file when the print job has been completed. This is typically accomplished by including the -r (remove) option when specifying the printmail command. This is the default for non-Sun specific printing in the xmail program.
- sendmail=shell-command
- If set, specifies an alternate procedure to use in lieu of the default /usr/lib/sendmail for delivering mail. User supplied procedures must be prepared to search the message file for recipients and ignore or process unexpected options (which ultimately must be passed on to the real sendmail program).
Some Mail variables have no effect on xmail operation, and are in fact ignored if found to be set.
- replyall
- has no effect on the meaning of commands within xmail. This prevents confusion due to a difference between how a command is labeled, and how it reacts in use.
- cmd=<value>
- is ignored, and is always defeated. This provides a mechanism to determine if the pipe command is supported in the user's mail environment, and determines the method to use when printing a message on the system printer (using the default or user specified printmail command).
- crt=<value>
- is ignored, and always defaults to nocrt. This prevents user specified paging mechanisms from interfering with full message delivery to xmail.
- screen=<value>
- The current release of xmail can safely handle up to a maximum of 10,000 mail message in any one mail folder. Users with more than 10,000 messages in any one folder should seriously consider either creating some additional sub-folders, or at least deleting older messages.
Pressing the right mouse button while the mouse pointer is within the preserve command button box presents a menu of "set" commands which indicate the state the variables would be changed to if the mouse button were released while one of these commands was highlighted.
Changing the state of the variable alters the next presentation of the menu, such that the opposite state will always be presented as the command option.
Send any bug reports or other requested changes to:
Michael C. Wagnitz M/S D3-677 National Semiconductor Corporation 2900 Semiconductor Drive Santa Clara, CA 95052-8090 Domain: michael@berlioz.nsc.com Phone: 408/721-3266 UUCP: {apple|decwrl|hplabs|sun}!nsc!berlioz.nsc.com!michael
RIGHTS RESERVED
Much of the original design and insight for the development of xmail was provided by contributions from the following authors:
The xdbx contribution by Po Cheung (po@volta.ece.utexas.edu)
Copyright 1989 The University of Texas at Austin
The mailWatch widget by Dan Heller (argv@sun.com) was used as the source for the xmail icon window.