This page provides more detailed information about using exmh, such as managing nested folders, filtering mail, and using an external editor. Other pages include our tutorial; information on customization, and reference documentation on all the buttons and menus of exmh.
Exmh uses the regular MH programs to manipulate your mail folders and messages. This means it is compatible with command-line use of MH programs, and its actions should be familiar if you are an experienced MH user. If you are a new MH user, then the details of running MH programs is hidden behind the graphical interface.
This documentation will occasionally make references to advanced MH features like scan formats and reply filters. If you do not know about these you can ignore that part. If you do know about them, however, you will see that exmh can be affected by settings for these features in your MH profile.
As well as providing basic MH functionality, exmh has a number of other features:
inc
periodically,
check for new messages arriving asynchronously in folders, run
the MH msgchk
program, or count up the messages in
your mail spool file. Additionally, exmh can periodically
retrieve NNTP news from specified newsgroups.
pick
lets you select messages by
patterns in the header fields, by date, or by sequence name. The
interface is similar, but not identical, to the xmh pick
interface.
exmh-async
script. Or, Tcl-based editors such as
mxedit
can interact with exmh directly. As
the default, a simple built-in editor named sedit is
provided.
Mostly likely you are already an MH user. If not, go through the tutorial.
If you previously used a mail reader like Elm or Sun's mailtool that manages mail folders in mbox-like files, then you can use the menu entry to copy your old folder contents into the folders manage by MH and exmh. This menu entry is under the folder More... menu.
There is an extensive system for exmh that lets you tune it in many ways. Throughout the man page, references to settings will be made when there are tunable parameters associated with a feature. A more complete description of the facility is given onn the custoization page.
Several of the folder and message operations have keystroke bindings so you can do much of your browsing with hands on the keyboard. The default bindings are defined with the Tk syntax that you'll need to use in the Bind dialogs. Capitalization is important. For more information, see here. You can browse, change, and define new command keystrokes via the Bind user interfaces available under the Bindings menu. There are two dialogs: one for editing commands in the built-in editor, and another for the command bindings described above.
At the top of the display is a sub-window that has a label for each of your top-level folders. In the middle there is a table of contents for the current folder. At the bottom the current message is displayed. Both the folder display and table of contents have some highlights that are described below.
The command buttons are grouped into three sets. The buttons along the top apply to exmh itself, such as Help..., , and . The buttons above the scan listing are operations on folders, like and . There is a menu there labeled More... that has several more folder-related operations like and Sort.... The row of buttons above the message display are for operations on messages, such as , , and . There is another menu here labeled More... that has several more operations on messages, such as , , and .
The version number of exmh is displayed next to the top row of buttons. The release cycle for exmh goes something like 1.5alpha, 1.5beta, 1.5gamma, ... 1.5, 1.6alpha, and so on. The unqualified versions are deemed "stable" enough for naive users.
Summary information for the current folder appears next to the folder buttons. This indicates the current folder and how many messages are in it. Just below the scan listing is a status line that provides some feedback about what exmh is doing. When a new message is displayed, the subject or Content-Description component is displayed there. Just to the left of this the folder and number of the current message is displayed.
To the left of the message buttons the EXMH logo appears. This is replaced with the facesaver image of the person, or their organization, that sent the current message.
The black diamond to the right of the status message area is a grip that you use to change the boundaries between sub-windows. The resize unfortunately depends on heuristics based on the size of text being displayed in the window, so you have to have a message displayed before the resize will work.
Press the first mouse button on the black diamond and a horizontal line appears. As you drag the line up and down, the status message indicates what boundary you are changing. Initially you are adjusting the scan listing (middle sub-window). If you drag the line off the top of the scan listing, the mode changes and are now adjusting the folder cache size, if it exists. If you drag the line above the folder cache, the mode changes again you are changing the main folder display area. As you drag the line down, the mode changes again. The main drawback of the automatic mode sensing is that you cannot grow the main folder display area by more than the size of the folder cache, if it exists.
There are also preference settings for each of the sub-window sizes. Look under Scan Listing, Folder Cache, and Folder Display .
The top sub-window has a label for each of your MH folders. The folder display is highlighted to reflect the state of folders. The menu item under the main Help menu will display a key for the highlights.
black - the current folder. bold outline - a folder with unseen messages. stippled background - the target folder for move and link operations.
On color displays:
Folders that have nested folders under them are highlighted by a shadow box.red - the current folder. blue - a folder with unseen messages. yellow - the target folder for move and link operations.
The mouse bindings for the folders labels are:
Left - Change to folder. Middle - View nested folders. Right - Refile current messages to the folder. Shift-Right - Link current messages to the folder. Shift-Middle - Drag a folder label to some drop target. Control-Right - Clear the current target folder.
Note that a right click does two things at once. It selects the target folder for refile, and it marks the currently selected message(s) for pending refile to that folder. This might seem over-eager at first, but it is quite useful once you get used to it. The currently selected target folder remains highlighted, and you can move a message to this folder by clicking the Move button or typing 'm'.
A middle click on the folder label displays a pop-up window with the folder labels for nested folders, and you can operate on these labels just like the top-level ones. The pop-ups work recursively for nested folders. When the mouse leaves the pop-up it is withdrawn. The Folder Display lets you adjust how the pop-up behaves.
Hint: If you change the pop-up-related settings, you'll have to resize the exmh window a bit to force it to redisplay the folder labels. Only then will the new bindings take effect.
You can make the folder display into a separate top-level window with a setting under the Folder Display . This means you can close the main window and still view the folder display to see what folders have new mail in them. When you click on a folder label the main window will be opened automatically.
Below the main folder display is a cache line of recently visited folders. If you have nested folders, their complete pathname is given in the cache window. Using the Folder Cache settings you can choose how many lines of folder cache. You can also put some folders into the cache permanently with the Sticky Folders preference item.
If you don't have many folders, the folder cache line is really just a waste of screen real estate. In this case, set the number of folder cache lines to 0 in the Folder Cache section to eliminate this part of the display altogether.
You can drag folders in and out of the folder cache. Use <Shift-Button-2> to drag a folder label. Drag a label from the main display into the cache to add it, or from the cache to the main display to remove it from the cache.
The middle sub-window lists the messages in the current folder.
The lines of the scan listing are highlighted to reflect the state of each message. On color displays:
Red - the current message. Blue - unread messages. Grey background - messages marked for deletion. Yellow background - message marked for refile to another folder.
On monochrome displays:
Reverse video - the current message. Underlined - unread messages. Cross-hatched background - messages marked for deletion. Stippled background - message marked for refile to another folder.
The mouse bindings for the scan listing are listed below. "Drag" refers to holding the mouse button down while moving the mouse.
Left - select and display a message. Left-Drag - select a range of messages. Shift-Left - modify the selected range. Middle-Drag - scroll the display. Right - select but do not display the message. Shift-Right - Drag folder/msgID to drop target.
Several of the operations on messages can be applied to a set of selected messages. You can create a discontinuous selection by using the Shift-Left (and Shift-Left-Drag) mouse actions.
Hint: The scan listing comes from both the MH
scan
and inc
programs, depending on
circumstance. If you define a custom scan format, set the same filter
in your profile for both inc
and scan
.
The current message, if any, is displayed in the bottom sub-window.
The uninteresting mail headers are scrolled off the top of this display
initially. You can control this with the Header-Display
and Header-Suppress
profile entries as described on
the customization page. That page also
describes how to colorize different mail headers.
Pressing the space bar will page you through the message, or take you to the next message if you are at the end of the current message. Backspace will go back a page. You can also scroll the message with the mouse by using the scrollbar or drag-scrolling.
MIME messages are indicated by displaying their content-description in the status line. The mouse cursor is changed to a watch while the MIME message is parsed and displayed. On a color display, a MIME message body is displayed in a slightly darker background. This shading is used to indicate the depth of nesting in a multipart MIME structure.
A pop-up menu is available to process MIME messages, such as saving their contents or processing the contents with an external viewer. Press the right mouse button in the message display area to obtain this menu. Make sure you press the mouse button over the message body, not the headers. For multipart messages, the menu changes depending on what part of the message you are looking at. See also the entry for MIME for some parameters you can adjust.
Every content type can be saved or printed, and other types can have additional options depending on entries in your site's mailcap file. The print function just prints the item as text using your Print command. The print-with-mailcap entry, if available, uses the print command as defined for the content-type in the mailcap file.
You can display a message in a new top-level window in order to save it around on your display. Use the Clip operation under the message More... menu. This will display the current message in a new, larger window.
Exmh can cooperate with a WWW browser to display web pages. If you get a URL in a mail message, then use the 'z' keystroke to highlight the URLs in the message. (This is ad-hoc and not %100 accurate.) The URLs are turned into active text buttons. Click on one and exmh asks your web browser to display the page. You can have exmh scan every message automatically for URLs, although this can be slow. Tune this with the settings under the WWW .
If exmh sees special X-URL (or X-URI) headers it will turn the facesaver area into an active button. It takes on a raised relief and when you click on the face (or exmh logo) then the web browser is asked to display the URL in the X-URL header. More and more folks are putting X-URL headers into their mail messages so you can find their home page.
If messages on a mailing list contains headers compatible with RFC2369, exmh will provide an additional menu called "List..." for the messages with mailing list specific options. These options may include (but are not limited to):
These options may bring you to a web site or may put you in email composition mode.
Evangelism about the usefulness of this functionality to mailing list managers would be appreciated.
There are three basic actions you can take with a mail message: leave it alone, delete it, or refile it to another folder. You automatically advance to the next message after you delete or refile the current message. This makes it easy to go through your mail messages, deleting and refiling as you go. There are several settings under the Scan Listing section that control the behavior of exmh when reading mail, and some of these will be mentioned below.
Like xmh, exmh does deletes and refiles in two steps. In the first step you mark a message as needing some action. Later on you commit these changes by pressing the Commit button, or by pressing <Control-Return>. Unlike xmh, however, exmh requires that you commit changes before you view a different folder. Marked messages are highlighted in the scan listing, as described above. If you reselect a message marked for refile, the destination folder for that message is shown in the Status line.
Deleting Messages. To delete a message, use the Delete button or press 'd'. Delete results in a call to rmm. If you want deleted messages to be refiled into a special folder (e.g. +wastebasket or +deleted), you'll have to define a shell script and register that as your rmmproc in your .mh_profile.
Trick: If you press 'D' to delete a message, then you advance to the next message without displaying it, so you can quickly go through a folder to clean it up.
Refiling Messages. To refile a message, right click on the destination folder. This marks the current message(s) for refile to that folder, and leaves the folder selected as the current target folder. If the right target is already selected, then you can use the Move button or type 'm' to refile the message and advance to the next message.
Trick: If you press 'M' to refile, you advance but do not display the next message.
Undo. If you make a mistake, you can unmark a message with the message More... menu entry. This operation applies to the currently selected message(s), not necessarily to the last message you marked for delete or refile. If you want to change the disposition of a message, like refile it instead of delete it, you do not need to unmark it first. Just select it and take the new action.
Trick: use '-' (minus) to back up to a message you just marked, and 'u' to unmark the message.
Linking Messages. To link the current message(s) into a folder, hold the shift key down as you right click the destination folder label. If the right folder happens to be selected as the target already, you can also use the button. If you use Link frequently, you should adjust the Scan Listing item for Advance after Link. If you turn this off, then the current message remains selected after a Link, which makes it easier to link a message into multiple folders.
Auto Commit. The Auto Commit Scan Listing item will let exmh commit your changes when you change folders, sort or pack a folder, or quit the program. Without auto commit, you will be prompted to commit when you try to take one of these actions and have messages still marked for delete or refile. In addition, auto commit will commit changes when you close the main window.
Implied Direction. The next message viewed after a or is usually the next message. However, if you set the Implied Direction preference item, then exmh will remember your last or action and move that direction after a or . This means you can just as conveniently go through a folder backwards as forwards, although it might catch you by surprise.
Skipping Marked Messages. The skip marked msgs item controls whether Next and Prev take you to a message marked for delete or refile, or whether you skip over these. Remember the handy '-' key binding, which takes you to the previous message even if it is marked.
Changing Folders Automatically. When you are at the end of a folder, exmh will be ready to take you to the next folder that has unseen messages in it. You can just press Next, and it will automatically change folders for you. If you have marked messages, however, you will be reminded of that. At this point you can press the button, or if you have auto-commit enabled, then you can press the button again to trigger the commit and folder change. If you always want to be warned before an automatic folder change, enable the Next Guard item. With this enabled you will have to click twice (or type 'n' twice) to get the automatic folder change. It will also tell you to which folder it is about to change.
The final twist on automatic folder changing is that, by default, exmh will automatically change back to your "first" folder if there are no more folders with unseen messages in them. You can disable this feature with the Cycle back to first item. The default Folder-Order profile component defines inbox to be the first folder, so ordinarily you will change back there. The Folder-Order profile component is described in the customization page.
Sending a New Message. Use the
message button to create
a new draft message. This runs the MH comp
command to set
up the template for the draft, so it is affected by your
components
file, if any, and your comp profile entry, if
any.
Replying to a Message. The Reply... menu has two entries:
and . These use the MH repl
command, so they are
affected by your replcomps file, if any, and your repl profile entry,
if any. The first entry uses -nocc to -nocc cc
so that
the reply just goes to the sender and you, while the other entry uses
-cc all
so that the reply goes to everyone in the To and
Cc headers of the original message. There is also an entry that
displays instructions for adding more entries to the
Reply... menu. This is described in more detail on the
customization page.
Forwarding a Message. Use the
button to forward the
current message, or messages. This uses the MH forw
command to set up the message, so it is affected by your forwcomps
file and your forw profile entry, if these exist.
Using an Existing Message as a Template. You can use an existing message as a template for a new message by using the menu entry under the message More... menu. In this case the message is copied into the draft folder first. You will also use this menu entry if you have to go back into your drafts folder to continue work on a message draft.
The built-in editor provides a handful of text editing commands and several operations that affect the formatting of a mail message.
Sending a Message. Usually all you need to do is fill in the headers of your message, type in the message, and press the Send button. When you start, the cursor will be positioned at the end of the first empty header line, or at the beginning of the message body if, as with reply, all the headers are already initialized. When entering the headers, <Tab> will take you to the next header line, and <Double-Tab> will position the cursor at the start of the message body.
The only important rule to remember about mail messages is that the header and body are separated by a blank line. In addition, MH supports a header separator line of all dashes, ------.
Saving a Draft. If you want to save a message draft and return to it later, use the Save&Quit button. If you want to send a message but save it for use as another draft, select the Keep on Send check-box item under the More... menu. In this case, when you click Send the editor will remain open and the message will remain in your drafts folder. Otherwise the draft message is removed from the drafts folder after it has been successfully sent. (Actually, it is renamed in the same fashion that rmm renames deleted messages.) If you quit exmh and you have drafts in progress, they are automatically saved and remain in your drafts folder.
Warning! the Save button under the More... just writes the editor's buffer to the file system. It does not imply that the draft will remain after it is sent. You probably want Save&Quit or Keep on Send instead.
Aborting a Draft. If you decide you do not want to send a message, you can delete it by pressing the Abort button. If you have not changed the initial template it will be aborted immediately. Otherwise it will prompt you for confirmation.
Trick: a second click on the Abort button is the same as clicking the OK button in the confirmation dialog.
Signatures. The editor supports signatures in two ways. If you
select Auto-sign from the Simple Editor
section, then
your .signature
file will be appended to the message when
you press
the Send button. Otherwise, you can use the Sign button to insert your
.signature
file at the end of the message.
If you have several files that match the pattern
~/.signature*
, then you will have a menu of signature
options available under the Sign... menu, which replaces the Sign
button. You can define the default choice with a Preference setting
under the Simple Editor section. With auto-sign, the Sign... menu has
a set of check box items that determine which signature file will be
used. Otherwise, the menu simply selects which signature you want to
insert at the end of the message, and the signature is inserted when
you select the menu entry. If you are composing a multipart MIME
message, your signature is added as another MIME part.
When auto-sign is enabled, a further option on the Sign... menu allows "intelligent" signing of messages. This means that messages which are sent solely to addresses within the local domain can be signed differently from messages being sent outside of it. The Intelligent Signatures section allows you to specify two different files, one as the local signature file and one as the external signature file, along with a list of domains to be considered "local", and the default state of the intelligent sign menu option.
Trick: if your signature file has the execute permission set, then exmh will try to execute it and use its output for the signature. (If you accidentally have the execute bit set, the error that occurs may not be that clear). In this case, three arguments will be passed to your signature file (in this order): the composition method used for that message (i.e. one of [comp, repl, forw, dist, unknown]), the name of the current MH folder when composition was started, and the absolute pathname of the draft message. You can then use these to decide on a suitable signature to output.
Hint: If you change the line length, you should also resize
the editor window to match the width (e.g. 72) so your message will
look right as you type it in. Set the following resource in your
~/.exmh/exmh-defaults
:
*Sedit*Text.width: 72
Changing Fonts. You can use the Text... menu to change the font of the selected text. This promotes your message to a MIME content-type of text/enriched. The encoding of these text looks is also done when you press the Send button. You may see the encoding after clicking Send as a side-effect of the way this is implemented.
The Insert File... menu entry is used to insert a file as-is, with no MIME structure. The file is inserted at the current insert point in the editor.
The Quote... menu is used to quote the message you are replying to. This menu is only enabled when you are replying to a message.
The Quote menu entry formats the replied-to body a little, just by prefixing each line of the message body with a string. The default is "> ", and you can change this via the Simple Editor section.
The Quote menu entry produces a mime attachment which contains the replied-to message.Note: it is apparently not possible to define a repl prefix with leading spaces. This is a side effect of storing the prefix in the X resources database.
The Cite Selection menu entry formats and inserts selected text. It is assumed that the text is from the current message, and the sender of that message is identified just before the inserted text. You can use this feature to insert text from several different messages.
The Crypt menu provides access to the Pretty Good Privacy public key system. With this you can send messages with a digital signature that certifies that you sent the message. You can also encrypt and decrypt messages with PGP. A complete discussion of PGP is far beyond the scope of this page. However, if you know PGP, you will find the PGP features of exmh useful.
Hint:. The Insert PGP Keys menu entry is hiding over in the Sedit More... menu. Use this to insert your public key or other public keys into a mail message. By default, only your keys are listed in the key chooser. Just type in part of the key ID of any key you want to choose and matching keys are displayed. Try '*' to list all keys.
Warning! The line-break formatting described above can interact poorly with the formatting described next. This is one of the roughest spots in the exmh implementation. For example, if you include a file in your message that has important formatting, like a Postscript file or some program code, you will want to disable the line-break formatting. You can do this by turning off the Format mail check-box item under the More... menu.
If you are familiar with MHN directives, you can enter them into your message. In this case, you will want to select the Attempt MHN check-box menu item under the More... menu. Again, you will probably want to disable Format mail to make sure that long MHN directives are not chopped into multiple lines at the wrong place.
You can create a multipart MIME message by using the Insert Part... menu item. This adds another part to your message, promoting it to MIME content-type multipart/mixed if necessary. The first time you add a part, you have the option of preserving the existing message body or completely replacing it. When the file is inserted you are asked to choose its MIME content-type and content-transfer-encoding.
The Insert External... menu entry is used to create a MIME part of Content-Type message/external-body. This is an indirect reference to a file, which is either a local file or a file available via anonymous FTP. A dialog lets you fill in the various parameters to the indirect reference. For an anonymous FTP pointer, the Site is the Internet host name and the Directory and File name determine what file it is. The Transfer mode is either "text" or "image". Use "image" to ensure that all 8 bits of each byte get transferred. The Description is for the benefit of the receiver of the mail message and should describe what the pointer references.
Trick: A file section dialog appears first, but this is not always appropriate if you are making an external reference to a non-local FTP site. Just hit cancel on the file selection dialog. Then, when you enter the file name, the content-type will be inferred from the name. You can always override the content-type if exmh guesses wrong.
The built-in editor supports 8-bit characters found in European character
sets. Insert an 8-bit character by pressing the Compose key and then
two other keys to get the special character. For example, Compose,
then e
and '
creates an accented e
character. All the vowels can be composed with ' ` and " to get
accents, and there are several more bindings. The complete table of
compose key sequences is given by the
entry in the
Bindings... menu.
When you compose a mail message that contains 8-bit characters you need to be careful when sending it. Some mail gateways do not like 8-bit characters and will bounce the message or corrupt it. The Quoted-Printable encoding will protect 8-bit characters. The built-in editor will do this quoting for you if it detects input of an 8-bit character. The quoting is done when you press Send. You can control whether or not this happens with a combination of the Quote Printable menu entry (for per-message control) and the Quoted Printable default preference item for the Simple Editor.
The built-in editor handles the special coding required when including 8-bit characters in mail headers.
When you are replying to a message that contains 8-bit characters, it may be encoded, too. The Quote operation will first decode the message so that the true 8-bit characters are inserted into the editor buffer. This works better than the repl filters that include the message body. If you use one of those, then you'll see the quoted-printable encoding instead of the 8-bit character.
You can use your favorite editor with exmh by specifying an Editor command in the Editor Support section. This command has the complete pathname of the draft message appended to it before it is executed. Several examples of editor commands include:
The built-in editor is called sedit. Mxedit and tkvi are Tcl-based editors that know how to communicate with exmh about draft messages. emacsclient is a program that is used to communicate with a running emacs in order to get it to edit a specified file. You will need the "server.el" package for emacs in order to set up your emacs as a server for this arrangement. There is more information about this in the misc directory of the exmh distribution. emacsclient can used in two ways. If you can post the message directly from emacs, then just use "emacsclient &" and exmh forgets about the draft and assumes emacs will take care of it. Otherwise, use the exmh-async wrapper that is described below.sedit mxedit emacsclient & gnuclient & exmh-async emacs exmh-async emacsclient exmh-async gnuclient exmh-async xterm -e vi
After the editor exits you are presented with a What Now dialog that gives you several options: Send, Abort, Save, Re-edit, and More... Under the More.. menu you can apply MHN, run a spell checker, or run the MH whom program to verify the addresses you have specified. You can also invoke the built-in editor, sedit, in case you want to use its MIME composition features.
There is an "Alternate Editor" setting. The built-in editor has a menu entry that saves the draft and starts the alternate editor. The What Now dialog also has a menu entry to do this.
In most cases you will use the exmh-async
wrapper script to
run an external editor. This is a short Tcl/Tk script that runs your
editor and then communicates with exmh when your editor exits.
This means the exmh user interface can remain active while you
compose your message. You can even compose several messages at once.
You will get a different What Now dialog for each message draft.
The exmh-async
wrapper tries to pass through all the
arguments to the editor command you specify. However, a couple
arguments are picked up by the Tcl/Tk shell (wish). Some tricks are
played, however, so you can protect arguments. For example, the
following works:
This protects theexmh-async xterm {-geo 80x40+0+0} -e vi {+c /: *$}
-geo
argument from
exmh-async
, and it protects the complex format of the
vi
search command from interpretation by the Tcl parser.
As a final note, if you try to test exmh-async from the command line, you need to execute it like this:
The first argument is the name of the exmh application, which is needed for the Tk-based communication betweenexmh-async exmh xterm -e vi &
exmh-async
and exmh. This argument does not appear when you define the command in
.
One of the strong points for exmh is its support for mail filtering
systems that file messages into different folders as they are delivered.
The filtering is done by looking for patterns in the mail headers.
For example, you can put all the mail from your boss into one folder,
and all the mail from a mailing list or digests into another folder.
Exmh visually highlights the folders that have new mail. This
depends on the definition of the Unseen-Sequence profile component,
and the support of this sequence by the mail filtering system. Both
the slocal
and procmail
filtering systems
use the rcvstore
program that takes care of these
details. The inc
program also adds messages to the unseen
sequence, so even if you do not filter mail the new messages in inbox
will be highlighted by exmh.
The standard filter used with MH is described in the
mhook
(or slocal
) man page. Below is a quick
summary of how it works. You must maintain a file named
~/.maildelivery
that has your mail filter
specifications. The contents of the file are explained below. If you
can forward mail into programs at your site, then put this into your
.forward
file to get filtering:
| /usr/local/mh/lib/slocal -user yourname
Alternatively, if you select the "presort" inc-style described below,
then exmh will run slocal
for you each time you say
.
If you use the procmail
system, or perhaps supply your
own, use the MH rcvstore
program to put messages into
folders. This program updates the unseen sequence so exmh can find the
new mail. Unfortunately, the rcvstore
program is in the
MH library, so you must reference it with a long pathname, (e.g.,
/usr/local/mh/lib/rcvstore
.)
A sample .maildelivery
filter file is shown below. Note:
this file is ignored if it has group or world write permission. It
uses the rcvstore
program to refile messages into
different folders. The first field is the header to match, and the
second is the value to look for. This is a case-insensitive
string. The third column specifies an action. In this case | says to
pipe the message into the program in the last column. The fourth
column provides limited decision making. In this case the ? means to
try and match this filter if the message has not already matched a
previous filter. The complete syntax of the filters is given in the
mhook
man page.
subject exmh | ? "/usr/local/lib/mh/rcvstore +exmh" subject mxedit | ? "/usr/local/lib/mh/rcvstore +mxedit" subject book | ? "/usr/local/lib/mh/rcvstore +book" to journalclub | ? "/usr/local/lib/mh/rcvstore +journal" from footbag-digest" | ? "/usr/local/lib/mh/rcvstore +footlist" default - | ? "/usr/local/lib/mh/rcvstore +inbox"
Warning! If you use the .maildelivery
file to
filter messages, you should always have a default action in the file
that refiles the messages into your inbox (or some catch-all
folder). Depending on your local configuration, there might not be a
good pre-default default action. If there is no default action, mail
that does not match a filter will be discarded!
A patch for the slocal program is distributed with exmh. It adds an additional syntax to the maildelivery file that makes it simpler to use rcvstore. Use the + operation instead of | (pipe) to specify a refile action. The above example looks like this:
subject exmh + ? "exmh" subject mxedit + ? "mxedit" subject book + ? "book" to journalclub + ? "journal" from footbag-digest" + ? "footlist" default - + ? "inbox"
Incorporating Mail. The filtering support affects the way you incorporate mail from your system spool file. Exmh supports several different styles: inbox, multidrop, presort, presortmulti and none. Use the Incorporate Mail preference section to choose one. You may also want to enable periodic inc under the Background Processing section.
.forward
file to process mail
through an external program in order to deliver messages into
various folders, then you don't need Inc in the user
interface. Selecting "none" will eliminate the
button altogether and
disable the internal Inc procedure. A background "flist" task is
a nice complement to this setting so that you can see what
folders are getting mail.
.forward
file at my site.) The way
presort works is to inc from your spool file into a temporary
folder (MyIncTmp
). Then, the MH filtering hook
slocal
is run on each message. In this mode, it is
expected that the filtering action is to put the message into a
folder. You do this by specifying an action that is to pipe the
message into the MH rcvstore
program. See the MH
man page for mhook
for details.
mhook
) to put new messages into a set of
drop-boxes (inbox-like files). You set up the correspondence
between POP hosts and folders, or between inbox files and
folders with your ~/.xmhcheck
. file.
moves messages from the POP
server or drop-boxes into folders. The format of each line of
~/.xmhcheck
file is shown below. In the first case,
the file name must be an absolute pathname (i.e., has leading
/
). In the second case (POP), the third field is an
optional user ID.
MyIncTmp
folder gets
filtered just as with presort.
The .xmhcheck
file. The following shows the format of the
.xmhcheck
file. If the folder_name is
MyIncTmp
and you use presortmulti inc style, then
messages are filtered after they are fetched from the dropbox.
folder_name /filename/of/dropbox or folder_name POP_hostname [POP_user_name]
Exmh has support for retrieval of unread news messages from
user-specified newsgroups via NNTP (Network News Transfer
Protocol). It does not have the full functionality provided by a
threaded news-reading program such as trn
or the
gnus
package for emacs
; however, it can be
useful to download news periodically from a small number of low-volume
groups within exmh's mail-reading environment. There is also an
item on the More... message menu to allow the current message to be
posted to a newsgroup.
News retrieval is configured using the NNTP Support
section. The
machine running your local NNTP server (often called "news") can be
specified, along with the port it uses to listen for connections (this
is almost always port 119). If your news server requires
authentication, you can also specify your username and password. You
can specify a whitespace-separated list of newsgroups which should
periodically be checked for new news, and you should give the pathname
of a file which will be used to store a record of the messages you
have already read. Most news-reading programs use the
.newsrc
file in your home directory for this purpose, so
if you want to use exmh as well as another news-reader you
should use this filename. Two options are provided for newsgroup
moderators to ease the process of posting a moderated message to the
group.
In order to enable background news processing, two options in the Background Processing section must be set; one of these enables background news retrieval, and the other specifies the interval at which this should be performed. News retrieval is a relatively time-consuming business, so it is recommended that this interval be no shorter than 60 minutes, and 120 or 180 minutes would be quite reasonable. Note that background news retrieval can be enabled and disabled independently of any background mail-processing option you have selected.
When retrieving news, exmh uses a method identical to the
"presort" inc style described in the Filtering Mail section above, i.e. news articles are
downloaded into a temporary folder and then the slocal
program is run on each one. For more information, see the
mhook
or slocal
man page.
One of the more fun features of exmh is its ability to display the facesaver bitmap of the person that sent you mail. There are three sources of the images: the facesaver database, inline X-Face mail header fields or inline X-image-url mail header fields. These sources can be used independently, but the main trick is getting exmh configured properly to use them.
Facesaver Database. The exmh installer asks for two pieces of
facesaver-related information: the root directory of your faces
installation and a search path of faces directories. This assumes that
you have retrieved the faces software and associated databases and
installed them under on directory, which is referred to as its root
directory. The default is facesaver
,
logos
, and a local database, which is called
parc
at my site. The first two databases come from the
facesaver.tar.Z
and logos.tar.Z
files,
respectively. The default values are:
Faces Root Directory /usr/local/faces Faces Search Path parc logos news facesaver
If you are setting up your own database, you need to understand how it
is organized. It is easiest to demonstrate by example. For myself,
welch@parc.xerox.com, my
facesaver image is found as
com/xerox/parc/welch/face.xbm
. Exmh will look for
this file under each of the directories named by the faces search
path. The complete pathname might be
/usr/local/faces/parc/com/xerox/parc/welch/face.xbm
. If a
bitmap is not found, then the search algorithm trims off trailing
components in an effort to find a more general bitmap, typically a
company or organizational logo. At your site, for example, you might
only have /usr/local/faces/logos/com/xerox/face.xbm
,
which contains the Xerox corporate logo.
If your exmh installation is not correct, or if you have a personal faces database that the exmh maintainer doesn't know about, then you can also override the install-time settings with the FACEPATH environment variable. This is a more traditional search path of colon-separated directory names.
X-Face headers. The X-Face header contains a compressed version of a facesaver bitmap, which is a 48x48x1 (monochrome) bitmap. The faces software comes with some filters and scripts to generate these and decompress them. The original purpose of the X-Face header is as a way of distributing your facesaver image so that folks can update their database. However, at the moment exmh just decompresses the bitmap and displays it. It requires a Preference setting for the X-Face pipeline for this to work. If the pipeline is blank (the default), no processing is done. To decompress and display the header, use a pipeline setting like this:
Theuncompface | ikon2xbm
uncompface
program comes with
the faces software. It also has a version of ikon2xbm
,
but a faster version of this program (a C program instead of some
scripts) is distributed with exmh in its misc directory. Future
versions of exmh will cache the results of decompressing the
X-Face line in a personal faces database, but in the current version
it just writes the file to /tmp/FACES.[pid]. If you are inspired you
could add a Hook_MsgDisplay to stash this file into a real facesaver
database. More information on hook procedures
can be found here. If you do this, please post your inspiration
to
exmh-workers@redhat.com.
X-image-url headers. The X-image-url header contains a URL referring to an image. These should be icon-sized.
~/Mail/.glimpse
directory. This lets you
limit the search to the current folder, or to the current folder
and its sub-folders.
msgchk
or
count messages in your spool file, but the disadvantage of doing
this is that there is no audible or icon feedback when it sees
mail waiting in your spool file. Instead, there is just a status
message that you might not notice. Choose what background action
is taken and how frequently it is done with the Background
Processing
section. (Background NNTP news retrieval can also be enabled via
the Background Processing
section, independently of which of the above background actions
you have chosen).
exmh does not like really big folders. If you have more than several hundred messages in a folder you will notice that folder change times get pretty slow. Take this as a nudge to reorganize things into sub-folders. Every three months I move saved messages into sub-folders with names like 94Q2, 94Q3, etc. I understand the performance problems involved, and plan to overhaul some of the exmh internals to improve this situation. In the meantime...
Really big folders with lots of messages in the unseen sequence are really slow. Use the folder More... operation to clear the unseen sequence. You probably want to do this when you import mail from other systems mailboxes.
This puts up a dialog box that lets you patch various file system specific pathnames and enable or disable features that your system cannot support (e.g., facesaver, sound). Read the info in the dialog box and enter the appropriate file system pathnames. Click Patch to sed the exmh.MASTER script and create the main exmh file, then click TclIndex to generate the library index, and click Test to try it out. If you are satisfied, click Install to copy the main script and the supporting libraries into their destination directories.wish -f ./exmh.install
Note: the "Script Library" and the "Install lib directory" are usually the same place. The script library is the run-time value of the library directory, while the install lib directory is the install-time value. During the Test run, the Script library is automatically set to "./lib" so you can run without installing. When you hit the Patch button, some consistency checks are done and a relative pathname will trigger a warning. You can ignore this when you are testing, but you should install a working copy that only references absolute pathnames.
NOTE: Currently you cannot leave the script library where it gets unpacked. The installation procedure really assumes that the Install Directory is a different place than ./lib. You'll get an error during the install, and in fact, background.tcl will get removed as it tries to copy it onto itself.
The original motivation for install-directory vs script-directory was AFS installations in which writable volumes have different names than their read-only, replicated volumes. In this case you want to install to the writable volume, but run from the read-only replicas.
If you get the Script library wrong, it will be manifest as a Tcl error about an undefined procedure named Exmh.
Upon startup, the install will look for ../*/.exmhinstall so you can retrieve configuration information from previous versions installed in peer directories. You can also maintain configuration information via the "Conf" button, which looks for ../*/.exmhinstall*.
A patch to the MH slocal
program is included as
misc/slocal.patch
. The patch adds a "+" syntax to your
.maildelivery file that results in messages being filed into a folder
by means of the MH rcvstore
library program. You can keep
your patched copy of slocal
distinct from the installed
version because exmh runs slocal
directly. The
installation dialog lets you set up the pathname for your custom
copy.
There is also a patch for the MH folder.c program. The patch makes
folders -recurse
run much faster because it avoids
directories that do not have sub-folders. The patches apply to MH
6.7.
There are usually patch files to go between releases (e.g. from 1.6.4
to 1.6.5). The best way to use these patches is to patch your 1.6.4
source
directory and then reinstall using the procedure described
above. This has the benefit of fixing the version number in the main
script. Finally, this is how the patches are generated, so if you apply
them to your installed directories they might not work properly.
The thing that causes the most trouble with new exmh users is the Tk
send facility and the Xauthority mechanism. This matters if you use
the detached background process or the exmh-async
editor
wrapper.
The send facility is used for communication between Tk interpreters. The most recent releases of Tk require that you have your X environment set up to use Xauthority. The details for doing this vary from X server to X server. The basic idea is that, before you start the X server you create a file, ~/.Xauthority, that contains a random bit string. The file is only readable by your user account. You pass the name of this file to the X server when you start it up. Then, each time a window is created, the client programs read this file and pass the random bit string to the server. The idea is that only programs run from your account can read the file to get the right bit string. For the details, read about the -auth or -xauth argument to your server.
Even if you get this right, you must also make sure that the old
xhost
security system is not used. That is, the xhost
list must be empty. To do this, run the following command:
xhost -
With release 1.6.4 and later you can have exmh police your xhost list. It can clear out any hosts that creep onto the list. This typically happens with wrapper scripts used to run other programs. If you use Xauthority properly, the additional use of xhost is completely bogus and insecure. Not to mention that it breaks Tk send. Under Background Processing , select "Keep xhost list clear".
The other alternative is to recompile the Tk library with the
-DTK_NO_SECURITY
compile flag. This is appropriate if
your X server just cannot do the Xauthority protocol, or you think
your environment is safe enough. That is, you don't have to worry
about other users popping up rogue windows on your display.
Exmh is available via FTP on ftp.sunlabs.com in the pub/tcl/exmh directory.
MH is available as pub/mh/mh-6.8.tar.Z from ftp.ics.uci.edu. Lately there is a new version of MH called "nmh" by Richard Coleman. You can find that at http://www.mhost.com/nmh/.
Tcl and Tk are available in the pub/tcl directory on ftp.sunlabs.com
Expect is available as pub/expect/expect.tar.Z from ftp.cme.nist.gov
Metamail (for MIME support) is available in thumper.bellcore.com:pub/nsb
Faces are available from cs.indiana.edu:/pub/faces. The individual databases are located under /pub/faces/picons/db, and they include .xbm, .xpm, and .gif representations. I recommend getting domains.tar.Z, misc.tar.Z, and unknown.tar.Z. If you have room, also get usenix.tar.Z and users.tar.Z.
Glimpse is available from the University of Arizona: http://glimpse.cs.arizona.edu:1994/ or ftp://cs.arizona.edu/glimpseDatabase Date Bytes Description domains.tar.Z 95.12.06 1356923 Company, Country and Univ Logos misc.tar.Z 95.11.12 58991 Things like root and postmaster news.tar.Z 95.12.06 372765 For newsgroup (not mail) unknown.tar.Z 95.11.12 19074 Default images usenix.tar.Z 95.04.13 19472394 The USENIX database users.tar.Z 95.12.08 2012905 Other personal faces weather.tar.Z 95.11.12 146329 For weather (not mail)
To get PGP, send mail to pgp-bugs@mit.edu.
Your mail is collected under a directory usually called Mail. If you are using another mail system that uses that directory, set your Path MH profile entry to something else. The current folder and other information is stored in a file named "context" in your Mail directory. Your mail is stored as one message per file in directories that correspond to your mail folders. Nested folders are supported, up to the maximum depth supported for directories in your file system. Information about message sequences is kept in a file named .mh_sequences in each mail folder directory. The current message is in the sequence named "cur", for example. New mail is in the sequence named "unseen". You can define more sequences, up to 10 per folder.
Exmh adds a few more files for its own purposes. It uses an alternate context stored in .exmhcontext so that command line MH programs and exmh do not interfere with each other. The .folders file lists all the mail folders you have. Each folder has a .xmhcache file that has a cache of the scan output.