[Contents] [Prev Chap] [*] [Next Sect] [Next Chap] [Index] [(i)]

8    Using Advanced Mail Features

This chapter describes how to use advanced features of Mail (dxmail) which include the following:


[Contents] [Prev Chap] [*] [Next Sect] [Next Chap] [Index] [(i)]

8.1    Changing Editors

Use the DECwindows editing commands, described in Chapter 4, or a text editor to create messages. The vi text editor is the Mail program's default editor. If more than one editor is available on your system, for example, emacs, you can change editors as follows:

  1. Copy the /usr/lib/X11/app-defaults/DXMail file to your home directory. This file lists available editors in choiceEditor: statements.

  2. Remove the comment symbol before the choiceEditor: statement that corresponds to the editor you want to use. Such editors as emacs, vi, and dxnotepad are available. For example, to change the default editor to the Notepad, remove the comment character (!) that appears in the following line:

    !*choiceEditor:   dxnotepad -geometry 600x400-0+20  %s
    

    Then, add a comment character to the following line:

    *choiceEditor: xterm -geometry =-0+20 -title \
    dxmail-vi -e vi %s
    

    If you have a private text editor, add a choiceEditor line in your DXMail file similar to the entries provided and add comment characters to the other choiceEditor lines.

  3. If you are currently running mail, exit and restart mail. This will ensure that Mail uses the new editor specification.

Note that editor customizations in your login script (for example, your .login, .profile, or .cshrc file) are not in effect when the editor is used from Mail. Customizations must appear in the .xsession file in your home directory. For more information about the .xsession file, see the X Window System Administrator's Guide.


[Contents] [Prev Chap] [Prev Sect] [Next Sect] [Next Chap] [Index] [(i)]

8.2    Picking Messages

Mail can search the open or selected folder for messages that have something in common. For example, you could pick messages that were sent by a specific user on a specific day, or messages that contain a specific word in the subject line.

Once it finds messages that meet your criteria, Mail displays a list of these messages. You can then perform tasks such as copying, moving, extracting, or reading on this set of messages.

To pick messages:

  1. Open or select the folder containing the messages. If you selected multiple folders, the first folder is used for the pick operation.

  2. Choose the Pick from opened folder... or the Pick from selected folder... menu item from the Main Inbox window's Pick menu.

    Mail displays a dialog box.

    [Figure]

    The dialog box lets you specify the criteria for picking messages.

  3. Click on the pick criteria text-entry boxes, as explained in the following table, and type in your message pick criteria.

  4. After you have entered your pick criteria, click on the OK push button to pick the designated messages, or click on the Cancel push button to cancel the pick operation.

The following table describes the options in the Pick dialog box:

Option Description
From: The user name of the sender whose messages you want to pick.
To: The user name of the addressee, or the name of an alias list whose messages you want to pick.
Cc: The user name of the addressee (or the name of a distribution list) who received courtesy copies of messages you want to pick.
Date: The messages received on the date you specify.
Subject: Any text included in the subject line of messages you want to pick.
Search: Any text in the message body.
Pick from folder: The name of the folder from which you want to pick.
Create sequence: The sequence name you want to use.
With msgs from sequence: The different sequence name if you would also like to include information from another sequence.
Date range: The from date and the before date shown in dd-mmm-yyyy format, for example, 02-Sep-1992. The before date specifies all messages received before a particular date. The from date specifies the starting date to pick messages.
Date field: The field that you want the date ranges to search on, such as the Date: field, the Forwarded: field or the Replied: field.
Merge with old entries in sequence: The sequence messages that are merged into the new sequence.

When you enter text in any of the first five text-entry boxes in the dialog box, Mail searches for matching text anywhere in the corresponding fields of all messages in the open or selected folder.

Search text is case sensitive and is considered a search text string. That is, entering the text John in the From: text-entry box will pick messages from Jane Johnson and John Doe, but not Olav Bejohnesson or JOHN::Smith.

The leftmost column of the screen lists a set of Skip toggle buttons. Enabling these buttons will have these fields skipped during the search process. The rightmost portion of the display lists a set of Or toggle buttons. Enabling these buttons generates another field in the corresponding category that allows you to further define the search process.

Below the row of Skip toggle buttons on the left side of the screen is the -Or- toggle button. Enabling this button causes Mail to produce another set of fields for further defining the search process.

Once you have defined a set of pick criteria, the message list is updated to list only the picked messages. When you close the folder, Mail discards the picking criteria and all messages are again available for reading.


[Contents] [Prev Chap] [Prev Sect] [Next Sect] [Next Chap] [Index] [(i)]

8.3    Autosorting Incoming Mail

This section describes how to modify your Mail environment so that Mail automatically places incoming messages into other folders and drawers besides the inbox folder.

You can use the slocal function of mh mail with Mail to automatically sort incoming mail and to highlight different folders, depending on the type of message received. To do this, set up slocal to filter incoming mail. The slocal function will, in turn, spool the mail messages into different files, anywhere you specify under your home directory. Mail will also associate each of these spool files with a particular folder. Thus, when the spool files have messages in them, Mail will detect and highlight the corresponding folder to that file.

Setting up your mail environment to automatically sort messages requires that you know how the slocal function works. The following example explains how to set up the maildelivery file, which is used by slocal. Another file called decxmailcheck is needed by Mail to map folders with spool files.

Assume that you want to receive mail from a mailing list called mail_list. To automatically sort the messages to mail_list from the rest of the incoming mail and to specifically highlight a folder named MailList perform the following steps.

All "." files are to be created in the user's home directory only.

  1. Create a .maildelivery file in your home directory with at least the following entries:

    From   mail_list        >       ?       path/mail_list
    default -               >       ?       path/inbox
    

    The path is the absolute pathname to a private spool area under your home directory.

    For more details on setting up the .maildelivery file, refer to the slocal(1) reference page.

  2. Create a .decxmailcheck file in your home directory with at least the following entries:

    inbox         path/inbox
    MailList      path/mail_list
    

    The path is the absolute pathname to the spool files created by slocal.

  3. Create a .forward file in your home directory with the following line, including the quote marks:

    "| /usr/lib/mh/slocal -user username"
    

    The username is your login name.

To sort your incoming messages, restart Mail. You must restart Mail after every modification to either file.

You should be aware that highlighting of folders works well with top-level folders, but not with subfolders.


[Contents] [Prev Chap] [Prev Sect] [Next Sect] [Next Chap] [Index] [(i)]

8.4    Customizing Your Mail Environment

You can customize many Mail features to suit your working environment. For example, you can specify where to put deleted messages; how to handle carbon copies; and what window display style you want Mail to present. You can also add or remove commands to Mail menus and buttons.


[Contents] [Prev Chap] [Prev Sect] [Next Sect] [Next Chap] [Index] [(i)]

8.4.1    Modifying Your Mail Profile

To make changes to your Mail environment, choose the Modify mail profile... menu item from the Customize menu in the Main Inbox window. The Modify mail profile... menu item is the only menu item. Mail generates the Mail Customizations dialog box where you can make the following changes:

Skip to next message upon deleting current one.
With this option enabled, mail proceeds to the next message in the current folder when you delete the message you are reading. Disable this setting if you want to specify which message to open next after deleting the current one.

Skip to next message upon moving current one.
With this option enabled, mail proceeds to the next message in the current folder after you complete a move operation. Disable this option if you want to specify which message you want to open next after moving the current one.

Commit changes in a folder upon closing it.
With this option enabled, Mail performs all changes you have made such as deleting, moving, and copying messages to other folders when you close the current folder. Disable this option if you want to explicitly commit changes by clicking on the Commit changes button.

Renumber messages in a folder after every commit (Slow).
With this option enabled, Mail renumbers all of the mail in the current folder whenever a Commit changes function occurs. If the folder has many messages, this becomes time-consuming.

Digital recommends that you disable this setting if you have numerous messages in your folders. With this option disabled, you must choose the Renumber messages menu item from the Main Inbox window's Maintenance menu to renumber the messages in a folder.

Put deleted messages into wastebasket instead of deleting immediately.
With this option enabled, Mail moves deleted messages to the wastebasket folder, allowing you to retrieve them if you deleted them by mistake. Disabling this option causes Mail to irretrievably delete messages.

Buttons affect the current message if no messages are selected.
With this option enabled, Mail highlights all buttons on a selected message whether the button function is available or not. With the button disabled, Mail highlights only those buttons that are functionally available. Normally, this button is disabled.

Open Subfolders when drawer is open.
With this option enabled, Mail opens all folders in a drawer when you open the drawer. Disable this option if you want to open a folder by clicking on the folder name.

Close Subfolders when another folder is opened.
With this option enabled, Mail closes all of the folders in a drawer and removes them from the display when you close the drawer. Disable this option to leave all the folders displayed.

Having all folders displayed can become confusing if you have many folders in several drawersthere is no way to distinguish which folders belong to which drawers.

Beep instead of putting up a No New Mail dialog box.
Mail sounds a beep when you click the New Mail button and there is no new mail. When you disable this option, Mail instead displays a dialog box indicating that no mail arrived.

Select who to carbon-copy on replies:
You can set only one of the three options in this group at a time.

The Carbon-copy only to sender setting causes Mail to reply only to the originator of the message.

The Carbon-copy to everyone who received original message setting causes Mail to reply to the originator and everyone else who received the original mail.

The Act according to mh_profile, or system default setting causes Mail to send mail according to instructions in your .mh_profile file.

Select whether to send yourself a carbon-copy of your replies:
You can set only one of the three options in this group at a time.

The Don't send carbon-copies to yourself setting causes Mail to send a copy of your reply to the originator without sending a copy to yourself.

The Do send carbon-copies to yourself setting causes Mail to send you a copy of your reply.

The Treat yourself just like everyone else setting causes Mail to send only copies of your reply to those addresses specified in the cc: field of the message envelope.

Start dxmail as an icon.
Enable this setting to start Mail as an icon. Disable this setting to cause Mail to automatically display the Main Inbox window when it starts.

Annotate messages that have been replied to.
Enabling this option causes Mail to time-stamp and to identify to whom the reply was sent. Mail also denotes that the message was replied to in the folder message list.

Annotate messages that have been forwarded.
Enabling this option causes Mail to time-stamp and add a forwarding identifier. Mail also denotes that the message was forwarded in the folder message list.

Select Main Window Style.
You can specify which style of window you prefer: Paned window or Outline Style. When you change window styles you must restart Mail to see the changes take effect.


[Contents] [Prev Chap] [Prev Sect] [Next Sect] [Next Chap] [Index] [(i)]

8.4.2    Adding Commands to Menus and Button Boxes

To add or delete commands from pull-down menus and button boxes on any window, edit the DXMail resource file as follows. (For information on specifying resources in resource files, see Chapter 9.)

  1. Rename the DXMail resource file located in your home directory.

  2. Copy the default resource file that exists in /usr/lib/X11/app-defaults as DXMail into your home directory.

  3. Retain only the menu or button box entries that you want to modify.

  4. Append the contents of the renamed customized DXMail resource file to the end of the new DXMail file you are creating.

  5. Add or delete entries as described in the following example and then restart Mail after saving the changes.

For example, to add a "rescan" option to the lower button box in the Main Inbox window, look for the following entry in the DXMail file:


 
"messageCommandBar: buttonbox"

Then add the following information before the endbuttonbox line:


 
"rescan: rescan() \n\"

The edited part now looks like this:

  messageCommandBar:    buttonbox       \n\
      deliverMail:          incorporate()           \n\
      reply:                reply-selected(send)    \n\
      forward:              forward-selected(send)  \n\
      printNow:             print-selected()        \n\
      move:                 move-selected() \n\
      delete:               delete-selected()       \n\
      rescan:               rescan() \n\
  endbuttonbox

 

Use function names already defined within dxmail. You cannot introduce a new function. If you add a function that does not exist, the button appears, but it is dimmed (inactive) and unusable. For example, specifying the following button causes a dimmed (inactive) button:

printNow:               print-selected()        \n\


[Contents] [Prev Chap] [Prev Sect] [*] [Next Chap] [Index] [(i)]

8.4.3    Improving Mail Startup Performance

Mail's startup performance is improved by using a cache file feature. Mail uses a cache file to store the names of your drawers and folders so that it can use this information at startup instead of rescanning the $HOME/Mail directory hierarchy. You will only see a performance improvement after the second or subsequent restart of Mail. During the first start and in the absence of the cache file, Mail must scan the $HOME/Mail directories. The time needed for this is proportional to the size of the directory tree.

If Mail terminates abnormally, it invalidates the cache file and must rescan the $HOME/Mail directories upon restart. Mail gives you a menu option to invalidate the cache when exiting the application, if there appears to be an inconsistency between the cache file and the actual layout of the folders in the directory tree. To invoke this option, choose the Invalidate cache on exit menu item from the Maintenance menu in the Main Inbox window.