MH & nmh: Email for Users & Programmers

May, 2006
MH book cover

The book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, written by Jerry Peek, was published by and is copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. (now O'Reilly Media, Inc.). In June, 1996, O'Reilly made the book freely available under the terms of the GNU General Public License; please read the information about copying and distribution.

This is the fourth updated online edition. It originally came from the book's third print edition. The title is "MH & nmh" instead of "MH & xmh." But the book still covers MH, xmh and exmh -- as well as the new version of MH called nmh. The MH-E Manual is now a separate book.

The Road Map is a good place to start. Otherwise, jump to:


Finding Your Way Through This Book

Road Map (overview with suggested starting points)
What's in This Book (short summary of each chapter)
Changes to the Online Edition of MH & nmh: Email for Users & Programmers
Using This Book (terms for copying, distributing, modifying)
Structure of This Book (organization, files/directories)
Browsing Help
To-do List: Suggestions for Revising This Book

Brief Table of Contents

PART I: INTRODUCTION

Chapter 0: Preface
Chapter 1: Introduction
Chapter 2: Key Parts of the UNIX Filesystem
Chapter 3: Introduction to MIME
Chapter 4: Setting Up

PART II: USING MH

Chapter 5: Tour Through MH
Chapter 6: Reading Your Mail with MH
Chapter 7: Sending Mail with MH
Chapter 8: Finding and Organizing Mail with MH

PART III: CUSTOMIZING MH

Chapter 9: Making MH Work Your Way
Chapter 10: New Versions of MH Commands
Chapter 11: MH Formatting
Chapter 12: Processing New Mail Automatically
Chapter 13: Introduction to UNIX Programming with MH

PART IV: xmh

Chapter 14: Tour Through xmh
Chapter 15: Using xmh
Chapter 16: Customizing xmh

PART V: MH-E

Moved to The MH-E Manual

PART VI: exmh

Chapter 20: Introducing exmh
Chapter 21: Using exmh
Chapter 22: Customizing exmh

PART VII: APPENDICES

Appendix A: Where Can You Go from Here?
Appendix B: History
Appendix C: Reference List
Appendix D: Example Files and Programs
Appendix E: Reference Guide
List of Figures
List of Tables
List of Examples
List of Example Files
List of Sidebars

Table of Contents

PART I: INTRODUCTION

Chapter 0: Preface

0.0 Chapter Introduction
0.1 Why Choose MH?
0.2 Why Read This Book?
0.3 What's in This Book
0.4 New in the Third Edition
0.5 What Isn't in This Book
0.6 Conventions Used in This Book
0.7 Request for Comments
0.8 Acknowledgments
0.8.1 Third Print Edition
0.8.2 Online Edition
[Top]

Chapter 1: Introduction

1.0 Chapter Introduction
1.1 What is Email?
1.2 How UNIX Email Works
1.2.1 Email Transfer Agents
1.2.2 Email User Agents
1.3 Introduction to MIME
1.4 Addressing Email
1.5 MH Profile
1.6 What Computers Support MH?
1.7 Obtaining MH, nmh, xmh, exmh, and MH-E
[Top]

Chapter 2: Key Parts of the UNIX Filesystem

2.0 Chapter Introduction
2.1 UNIX Filesystem Overview
2.2 MH Programs (Binaries) Directory
2.3 Library and Etcetera Directories
2.4 System Mailboxes
2.5 A User's Directories
2.5.1 bin Directory
2.5.2 The MH Directory and Subdirectories
2.6 Special Files for xmh
2.7 Special Files for exmh
2.8 Links
2.8.1 What's a Link?
2.8.2 Technical Stuff About Links
2.9 Caution About MH Files and Newline Characters
[Top]

Chapter 3: Introduction to MIME

3.0 Chapter Introduction
Sidebar: ASCII, bits, etc.
3.1 Overview of MIME Messages
3.1.1 Purposes of MIME
3.1.2 MIME Header Fields
3.1.3 MIME Encoding
3.2 Multipart Messages
3.2.1 A Sample Multipart Message
3.2.2 Multipart/alternative Messages
3.2.3 Parts within Parts
3.3 More About MIME
[Top]

Chapter 4: Setting Up

4.0 Chapter Introduction
4.1 Getting Mail Ready to Read
4.2 Setting Up MH
4.3 Online Manual Pages
[Top]

PART II: USING MH

Chapter 5: Tour Through MH

5.0 Chapter Introduction
5.1 Getting Started
5.2 Sending Some Mail: comp, send
5.3 Reading Mail: inc, show, next, prev
5.4 Replying to Messages: repl
5.5 MH Command-line Switches (Options)
5.6 Forwarding Messages: forw
5.7 Find and Specify with scan, pick, Ranges, Sequences
5.8 Cleanup: rmm
5.9 Using MIME
5.9.1 Can You Use MIME?
5.9.2 Listing MIME Message Contents
5.9.3 Reading MIME Mail
5.9.4 Sending MIME Mail
5.9.5 Other MIME Operations
5.10 The -help and -version Switches
5.11 Other MH Features
[Top]

Chapter 6: Reading Your Mail with MH

6.0 Chapter Introduction
6.1 Showing and Printing Messages
6.1.1 The Current Message
6.1.2 Messages You Haven't Read
6.1.3 Weeding Out Before You Read
6.1.4 Where's the Next Message?
6.1.5 Changing Showproc for Viewing, Printing, and Editing
6.1.6 Using mhl
6.1.7 Without a showproc
6.1.8 Multiple MH Sessions
6.1.9 Custom Printing: showpr
6.1.10 Showing Multiple Messages
6.2 Reading MIME Messages
6.2.1 Getting Test MIME Messages
6.2.2 The mhnproc or showmimeproc
6.2.3 Showing MIME Messages
6.2.4 Partial Messages
6.2.5 External Parts
6.2.6 Cached Contents
6.2.7 Showing Part of a MIME Message
6.2.8 Decoding Messages with mimecat
6.2.9 Checking a MIME Message
6.2.10 Reading PGP Messages
6.2.11 Other MIME Handlers
6.3 Listing MIME Message Parts
6.4 More About scan
6.4.1 scan Format Files
6.4.2 Scanning Backward
6.4.3 Scanning a Mailbox File
6.5 Checking for Mail Waiting: msgchk
6.6 Other Features of inc
6.6.1 Logging New Mail with -audit
6.6.2 Not Using +inbox
6.6.3 Less-used inc Features
6.6.4 If New Messages Arrive
6.7 Using MH with POP
6.8 Batch-process New Mail: autoinc
[Top]

Chapter 7: Sending Mail with MH

7.0 Chapter Introduction
7.1 Overview: Sending MH Messages
7.1.1 Making the Draft from the Template File
7.1.2 Editing the Draft with prompter
Sidebar: When is a Backslash Not a Backslash?
7.1.3 What now? -- and the whatnow Program
7.1.4 Message Transfer; Sighted and Blind Recipients
7.1.5 Add Text to Drafts: mysend
7.1.6 Sending PGP Messages
7.2 Changing Default Editors
7.2.1 Editor-next
7.2.2 Replacing the prompter Editor
7.3 MH Aliases
7.3.1 Making MH Aliases
7.3.2 Naming MH Alias Files
7.3.3 Showing MH Aliases
7.3.4 Aliases in Your Transfer Agent
7.4 Header Fields and Addresses
7.4.1 Fields You Add to a Header
7.4.2 Signature and From:
7.4.3 MIME Fields in a Header
7.4.4 Editing the Header
7.5 Working with Draft Messages
7.5.1 Single Draft Messages
7.5.2 Draft Folder
7.5.3 Deleted Draft Messages
7.5.4 Aborted Draft Messages
7.5.5 Finish Draft Messages: recomp
7.5.6 Work on Draft Folder: scandrafts
7.5.7 Building MIME Drafts
7.5.8 Recovering MIME Drafts
7.6 Composing and Sending MIME Messages
7.6.1 Example Drafts with Directives
7.6.2 MIME Draft Directives
7.6.3 Partial Messages
7.6.4 Adding an Integrity Check
7.6.5 Choosing MIME Encodings
7.7 The comp Command
7.8 Replying to Mail with repl
7.8.1 Selective Replies with -query
7.8.2 Selective Replies with -nocc and -cc
7.8.3 Changing the Message Header with replcomps
7.8.4 Reading Original Message with an Editor
7.8.5 Including the Original Message with -filter
7.8.6 Displaying the Original Message
7.8.7 Annotating the Original Message
7.8.8 Replying to Messages with MIME
7.9 Forwarding Messages with forw
7.9.1 Formatting Forwarded Messages
7.9.2 Adding Text to the Draft
7.9.3 Leave My Dashes Alone
7.9.4 Make Your Messages burst-able
7.9.5 Formatting the Header
7.9.6 Annotating the Original Message
7.9.7 Creating Digests
7.9.8 Forwarding in MIME Format
7.10 Distributing Messages with dist
7.10.1 A distcomps File
7.10.2 Annotating the Original Message
7.10.3 distprompter Edits dist Drafts
7.11 Sending Files
7.11.1 Send Non-MIME Files: mhmail
7.11.2 Send Files with MIME: viamail
7.11.3 Add Files to Your Drafts: append
[Top]

Chapter 8: Finding and Organizing Mail with MH

8.0 Chapter Introduction
8.1 Folders
8.1.1 Your Current Folder: folder
8.1.2 Using the folder Command to Create and Change Folders
8.1.3 Changing to Another Folder
Sidebar: The Pluses of MH
8.1.4 Moving and Linking Messages: refile
8.1.5 Subfolders
8.1.6 Relative Folder Names
8.1.7 folder -fast
8.1.8 List of All Folders: The folders Command
8.1.9 List Folders in Columns with fols
8.1.10 Folder Stacks
8.1.11 Renumbering Messages in a Folder
8.1.12 Working in an MH Directory
8.2 Finding Messages with pick
8.2.1 pick Switches
Sidebar: Getting Picky About Date Searches
8.2.2 Passing Message Numbers with Backquotes
8.2.3 Storing Message Numbers in MH Sequences
8.2.4 Saving Time with Your MH Profile
8.2.5 Combining pick Switches
8.2.6 picking Miscellaneous Fields
8.2.7 How Searches Find Messages
8.2.8 Searching a Message Range or Sequence
Sidebar: Prehistoric pick-ing
8.2.9 Searching More Than One Folder
8.2.10 Easier Searches with a `Link Folder'
8.2.11 Finding Messages to Yourself with pick2me
8.3 More About Sequences
8.3.1 Adding Messages to a Sequence
8.3.2 Deleting Messages from a Sequence
8.3.3 Listing Sequences
8.3.4 Previous-Sequence, Sequence-Negation
8.3.5 The unseen Sequence
8.3.6 The cur Sequence
8.3.7 Public and Private Sequences
8.3.8 Searching for Sequences with flist
8.4 Storing Messages
8.4.1 Copying a Message to a File
8.4.2 Saving Filesystem Space
8.4.3 Decoding and Storing MIME Messages
8.5 Sorting Messages: sortm
8.5.1 Sort by Any Field
8.5.2 Date Limit
8.6 Removing and Recovering Messages
8.6.1 How rmm Removes Messages
8.6.2 Recovering a Removed Message
8.6.3 Changing Your rmmproc
8.6.4 Improve rmm: use rmmer
8.6.5 Delayed Removal: drmm
8.7 Removing Folders: rmf
8.8 Annotating Headers with anno
8.9 Using Links
8.9.1 Making Links
8.9.2 Are These Two Messages Linked?
8.9.3 A Folder Full of Links
8.9.4 Links Between Users
8.9.5 Using Symbolic Links
8.10 Bursting Messages
8.11 Files with Multiple Messages
8.11.1 MMDF Format
8.11.2 Mailbox Format
8.11.3 Joining Messages with rfl
Special subsection of 8.11.3: rfl Manual Page
8.12 MH Shell on a Mailbox File: msh
8.12.1 Overview of msh
8.12.2 Handling New Mail with msh
8.12.3 msh and Your MH Profile
[Top]

PART III: CUSTOMIZING MH

Chapter 9: Making MH Work Your Way

9.0 Chapter Introduction
9.1 Running an MH Command
9.2 MH and the Shell
9.2.1 Using Shell Aliases and Functions with MH
9.2.2 Using Shell Variables with MH
9.2.3 Using Environment Variables with MH
9.3 An MH Profile, in General
9.4 MIME Configuration
9.4.1 MIME Profiles
9.4.2 Making a MIME Profile
9.4.3 What Profile Entries Are There?
9.4.4 Showing MIME Contents
9.4.5 Displaying Other Character Sets
9.4.6 Composing MIME Content
9.4.7 Storing Content
9.4.8 Caching External Body Parts
9.4.9 Getting External Body Parts by FTP
9.4.10 Building MIME Drafts Automatically
9.5 International Character Support
9.6 Changing MH Directory Name
9.7 Setting Access Permissions for Other Accounts
9.8 Defining Alternate Mailboxes
9.9 Sharing Other Users' Folders
9.10 Draft Message Template Files
9.10.1 How the Draft Message is Built
9.10.2 The components File
9.10.3 The replcomps File
Special subsection of 9.10.3: replcomps lines 1-2 before MH 6.8
9.10.4 The forwcomps File
9.10.5 The digestcomps File
9.10.6 The distcomps File
9.11 Periodic Cleanup, Checking, etc. with cron and at
9.11.1 Caution
9.11.2 Starting cron Jobs
9.11.3 Starting at Jobs
9.11.4 Note about Times
9.11.5 Output and Errors
9.11.6 List Old Drafts
9.11.7 Remove Messages from rmmer
9.11.8 Cleaning Up Old Messages
9.12 Automatic Signature on End of Messages
9.13 Quick Folder Access
[Top]

Chapter 10: New Versions of MH Commands

10.0 Chapter Introduction
10.1 What's a New Command Version?
10.2 Making a New Command Version
10.2.1 Setup Before You Make First New Version
10.2.2 What to Do for Each New Version
10.3 Writing Command Versions as Aliases or Functions
10.4 Versions of repl
10.4.1 Including Original Message in Reply: replx
10.4.2 Standard Replies: thanks
10.4.3 Followup Mail Messages: foll, follx
10.4.4 Reply from Another Address: replb
10.5 Make Message Bookmarks with mark
10.6 msg: `While You Were Out' Messages with comp
10.7 Versions of forw
10.7.1 Use forw to Resend a Returned Message
10.7.2 Filter Forwarded MIME Messages: mforw
10.7.3 forwr: Format forw Headers using repl
10.8 Edit Messages with show: mhedit
10.9 Show MIME Message Parts with showpart
10.10 Append Text with prompter.nopre
10.11 Version of send: push
10.12 Versions of scan
10.12.1 Scanning Message Ranges: cur, c10, l5, etc.
10.12.2 Scan and Show Size of Message: sscan
10.12.3 Scan Messages Waiting: msgscan
10.12.4 Get Message Number List: msgnums
10.13 Fast Folder Changes with fo
10.14 Versions of pick: Repeatable Custom Searches
[Top]

Chapter 11: MH Formatting

11.0 Chapter Introduction
11.1 mhl
11.1.1 Formatting the Message Header
11.1.2 Formatting the Message Body
11.1.3 Default mhl Format File for show
11.1.4 forw Filter Files
11.1.5 Screen Size and moreproc
11.1.6 Summary of mhl
11.2 MH Format Strings
11.2.1 scan Format Strings
11.2.2 scan Format Files
11.2.3 The scan.answer Format File
11.2.4 The Default scan Format File
11.2.5 More Header Information: scan.hdr
11.2.6 scan Widths
11.2.7 The scan.dateparse Format File
11.2.8 The scan.more Format File
11.2.9 The replcomps.addrfix Format File
11.2.10 The rcvtty.format File
11.2.11 The rcvdistcomps File
11.2.12 Summary of MH Format Strings
[Top]

Chapter 12: Processing New Mail Automatically

12.0 Chapter Introduction
12.1 The .maildelivery File: Overview
12.2 The .maildelivery File in Detail
12.2.1 First .maildelivery Argument: Field
12.2.2 Second .maildelivery Argument: Pattern
12.2.3 Third .maildelivery Argument: Action
12.2.4 Fourth .maildelivery Argument: Result
12.2.5 Fifth .maildelivery Argument: String
12.2.6 Undocumented Arguments 6-8: select
12.2.7 Regular Expression Matching with rcvsearch
12.3 Running Your .maildelivery File
12.4 Experimenting? Make Backups!
12.5 New Message Notification: rcvtty
12.5.1 Where rcvtty Notifies You
12.5.2 How rcvtty Notifies You
12.5.3 Using a Message Preprocessor
12.6 Storing in Folders: rcvstore
12.7 Redistributing Messages: rcvdist
12.7.1 Running rcvdist from .maildelivery
12.7.2 Automatic Folder Copies
12.7.3 Watch Out for Mail Loops
12.8 Storing in Mailbox Files: rcvpack
12.9 Alternatives to mhook Programs
12.9.1 Replacing All of Your .maildelivery File
12.9.2 The vacation Mail Handler
12.9.3 Running Your Own Mail Handler
12.9.4 Replacing rcvtty with Pop-Up Windows
12.9.5 Processing with at or cron or by Hand
12.10 Practical Tips
12.10.1 Finding Mail from Mailing Lists
12.10.2 Handing Periodic Mail
12.10.3 Think About cc:, Resent-To:, ...
12.10.4 System Aliases, the to and addr Fields
12.10.5 Flagging Important Mail
12.10.6 Making Your Mail Follow You
12.10.7 Splitting Mail to Several Places
12.11 slocal Debugging Tips
12.11.1 slocal Documentation vs. Real Life
12.11.2 Catching slocal Errors
12.11.3 Even -debug Doesn't Show Syntax Errors
12.11.4 slocal Eats .maildelivery Errors
12.11.5 Most Environment Variables Hidden
[Top]

Chapter 13: Introduction to UNIX Programming with MH

13.0 Chapter Introduction
13.1 Writing Shell Scripts for MH
13.2 Using MH from Other Languages
13.3 How Does Your System Execute Files?
13.4 Shell Command Substitution
13.5 Using Exit Status
13.6 Looping Through a List of Arguments
13.7 Finding Program Name; Multiple Program Names
Sidebar: What Good is a File With 1000 Links?
13.8 A Test Mail Setup
13.9 Mailing Non-interactively: mhmail
13.10 The mhpath Command
13.11 Getting Message Numbers
13.12 Settings from the MH Profile
13.13 Settings from the Environment
13.14 Changing the MH Environment
13.15 Writing Your Own Draft Message Editor(s)
13.16 Get Information with scan Format Strings
13.17 Watch Out for the MH Profile
13.18 Problems with folder, inc, and refile
[Top]

PART IV: xmh

Chapter 14: Tour Through xmh

14.0 Chapter Introduction
14.1 Getting Started
14.2 Running xmh
14.3 What's in the xmh Window
14.4 Sending Mail
14.5 Getting New Mail
14.6 Replying to Mail
14.7 Changing Sizes of Each Area
14.8 Searching for Messages
14.9 Forwarding Messages
14.10 Removing Messages
14.11 Leaving xmh
14.12 More About xmh
[Top]

Chapter 15: Using xmh

15.0 Chapter Introduction
15.1 Sending Mail
15.1.1 Draft Messages and the drafts Folder
15.1.2 Changing the Draft Message Header
15.1.3 More About Forwarding
15.1.4 More About Replying
15.1.5 Resend Messages with Use As Composition
15.1.6 Aliases
15.2 Scrollbars
15.2.1 When They Appear
15.2.2 Length and Position of the Thumb
15.2.3 Moving the Thumb
15.3 Editing in xmh
15.3.1 Text Editing Commands
15.3.2 Search and Replace
15.3.3 Composition Window Buttons
15.3.4 Reformatting Paragraphs
15.3.5 Line Wrapping
15.3.6 Copy and Paste
15.3.7 Use Another Editor
15.4 Reading Your Mail
15.4.1 Incorporate New Mail
15.4.2 View Window
15.4.3 Line Folding
15.4.4 Message Number Limit
15.5 Printing Your Mail
15.6 Organizing Messages with Folders
15.6.1 Making a New Folder
15.6.2 Folders and Subfolders
15.6.3 Using Another Folder
15.6.4 Moving Messages Between Folders
15.6.5 Linking (not Copying) Messages Between Folders
15.6.6 Deleting (and Restoring) Messages
15.6.7 Rescan Folder
15.6.8 Viewed Message vs. Viewed Folder
15.6.9 Packing a Folder
15.6.10 Sorting a Folder
15.6.11 Deleting a Folder
15.7 Introduction to Sequences
15.8 Using Pick
15.8.1 A Pick Example
15.8.2 Using the Big -Or- Button
15.8.3 Find Other Fields, Skip Fields
15.8.4 Bottom Area of the Pick Window
15.9 Modifying Sequences
15.10 The Master xmh Window
[Top]

Chapter 16: Customizing xmh

16.0 Chapter Introduction
16.1 Command-line Settings
16.2 Command-line Options
16.2.1 MH Directory Path
16.2.2 Initial Folder
16.2.3 Toolkit Options
16.3 Changing How Commands Work
16.3.1 HideBoringHeaders
16.3.2 PrintCommand
16.3.3 ReplyInsertFilter
16.3.4 SendBreakWidth
16.3.5 SendWidth
16.3.6 SkipCopied, SkipDeleted, SkipMoved
16.3.7 TocGeometry
16.3.8 TocWidth
16.3.9 ShapeStyle
16.3.10 Summary of Resources
16.4 Changing Buttons; Accelerators
16.4.1 New Accelerator for Compose Message
16.4.2 Redefining Composition Window Buttons
16.4.3 A New Buttonbox for the Main Windows
16.4.4 Adding Color
16.4.5 Moving a Message to a Specific Folder
16.4.6 Changing Command Options with edprofile
16.4.7 Use an External Editor
16.5 Conflicts Between xmh and MH Customization
16.6 Template Draft Files Set Headers
16.7 Changing Table of Contents
16.7.1 Introduction
16.7.2 Using a Standard scan Format File
16.7.3 A Wider Table of Contents
16.8 Changing the Print Command
16.8.1 Grabbing Error Output
16.8.2 Printing with lpr and lp
16.8.3 Other Printer Commands
16.8.4 A Better xmh Printer: xmhprint
16.9 Snooping on xmh
16.9.1 Use the debug Resource
16.9.2 Use Accounting Information
16.9.3 Make a Front End Shell Script
16.9.4 Read the Source Code
[Top]

PART V: MH-E

Moved to The MH-E Manual

PART VI: exmh

Chapter 20: Introducing exmh

20.0 Chapter Introduction
20.1 Getting Started
20.2 Running exmh
20.3 The exmh Display
20.4 Sending Mail
20.5 A Note about Cut and Paste
20.6 Getting New Mail
20.7 Reading MIME Messages
20.8 Replying to Mail
20.9 Selecting Multiple Messages
20.9.1 Using the Mouse
20.9.2 Searching with Pick
20.9.3 Fast Search
20.10 Forwarding Messages
20.11 Deleting Messages
20.12 Preferences
20.13 Leaving exmh
20.14 More about exmh
[Top]

Chapter 21: Using exmh

21.0 Chapter Introduction
21.1 Mousing Around
21.2 Keyboard Commands
21.3 The exmh Display
21.4 Folder Display
21.5 Folder Cache
21.6 Table of Contents
21.7 Message Display
21.8 Managing Messages
21.8.1 Deleting Messages
21.8.2 Refiling Messages
21.8.3 Undo
21.8.4 Linking Messages
21.8.5 Auto Commit
21.8.6 Implied Direction
21.8.7 Skipping Marked Messages
21.8.8 Changing Folders Automatically
21.9 Sending Mail
21.9.1 Sending a New Message
21.9.2 Replying to a Message
21.9.3 Forwarding a Message
21.9.4 Using an Existing Message as a Template
21.10 Mail Aliases
21.11 The Built-in Editor
21.11.1 Editing Commands
21.11.2 Sending a Message
21.11.3 Saving a Draft
21.11.4 Aborting a Draft
21.11.5 Signatures
21.11.6 PGP
21.12 Mail Formatting
21.12.1 Line Breaks
21.12.2 Changing Fonts
21.12.3 Inserting Files
21.13 MIME Formatting
21.14 Faces
21.14.1 Facesaver Database
21.14.2 X-Face Header Fields
21.15 Using Another Editor
21.16 Filtering Mail
21.16.1 Filtering and the Unseen Sequence
21.16.2 Incorporating Mail
21.16.3 Mail Filtering File Examples
21.17 Tips
21.17.1 Background Processing
21.17.2 Scan Caches
21.17.3 Optimizing Message Display
21.17.4 More Keyboard Stuff
21.17.5 Large Folders
21.18 Tk Send and Xauthority
21.19 More Information
[Top]

Chapter 22: Customizing exmh

22.0 Chapter Introduction
22.1 Preferences
22.2 Preference Sections
22.3 Binding User Interface
22.4 MH Profile
22.5 X Resources
22.6 Widget Class Hierarchy
22.7 Resources for Buttons
22.8 Resources for Menus
22.9 Button Groups
22.10 Color Resources
22.11 Colorizing Header Fields
22.12 Geometry and Position Resources
22.13 Icon Positions
22.14 Folder Display Resources
22.15 MIME Resources
22.16 Programming exmh
22.17 Code Organization
22.17.1 Main Scripts
22.17.2 Library
[Top]

PART VII: APPENDICES

Appendix A: Where Can You Go from Here?

A.0 Appendix Introduction
A.1 MH BBoards
A.2 More Information About MH
A.2.1 Documents Distributed with MH
A.2.2 The MH Source Code
A.2.3 World Wide Web Pages
A.2.4 Usenet Newsgroup
A.2.5 Mailing Lists
A.2.6 The FAQ
[Top]

Appendix B: History

B.0 Appendix Introduction
B.1 History of MH
B.1.1 Overview
B.1.2 From Bruce Borden
B.1.3 From Stockton Gaines
B.1.4 The Original MH Proposal
B.2 History of xmh
B.3 The History of exmh
B.4 Early History of MH-E (see The MH-E Manual)
[Top]

Appendix C: Reference List

C.0 Appendix Introduction
[Top]

Appendix D: Example Files and Programs

D.0 Appendix Introduction
D.1 Obtaining Example Files From This Book
D.2 FAQ
D.3 RFCs and Internet Drafts
D.4 MH and nmh Source Code
D.5 MH Scripts and Examples
D.6 Metamail
D.7 Getting MH-E (see The MH-E Manual)
D.8 Getting exmh
D.9 Programs in This Book's Archive
D.10 Explanation of aligrep
D.11 Explanation of append
D.12 Explanation of autoinc
D.13 Explanation of automhn
D.14 Explanation of distprompter
Sidebar: The Ins and Outs of Redirected I/O Loops
D.15 Explanation of drmm
D.16 Explanation of edprofile
D.17 The execit Programs
D.18 Explanation of fols
D.19 Explanation of forwedit
D.20 Explanation of fpick
D.21 Explanation of mhprofile
D.22 Explanation of mimecat
D.23 Explanation of mk_fol_names Package
D.24 Explanation of mysend
D.25 Explanation of original
D.26 Explanation of pick2me
D.27 Explanation of pof
D.28 Explanation of rcvsearch
D.29 Explanation of recomp
D.30 Explanation of resend
D.31 Explanation of rfl
D.32 Explanation of rmmer
D.33 Explanation of scandrafts
D.34 Explanation of showpr
D.35 Explanation of storeparts
D.36 Explanation of xmhprint
[Top]

Appendix E: Reference Guide

E.0 Appendix Introduction
E.1 MH Reference Guide
E.1.1 ali Reference Guide
E.1.2 anno Reference Guide
E.1.3 burst Reference Guide
E.1.4 comp Reference Guide
E.1.5 dist Reference Guide
E.1.6 flist Reference Guide
E.1.7 folder Reference Guide
E.1.8 folders Reference Guide
E.1.9 forw Reference Guide
E.1.10 inc Reference Guide
E.1.11 mark Reference Guide
E.1.12 mhbuild Reference Guide
E.1.13 mhl Reference Guide
E.1.14 mhlist Reference Guide
E.1.15 mhmail Reference Guide
E.1.16 mhn Reference Guide
E.1.17 mhparam Reference Guide
E.1.18 mhpath Reference Guide
E.1.19 mhshow Reference Guide
E.1.20 mhstore Reference Guide
E.1.21 msgchk Reference Guide
E.1.22 msh Reference Guide
E.1.23 next Reference Guide
E.1.24 packf Reference Guide
E.1.25 packmbox Reference Guide
E.1.26 pick Reference Guide
E.1.27 prev Reference Guide
E.1.28 prompter Reference Guide
E.1.29 rcvdist Reference Guide
E.1.30 rcvpack Reference Guide
E.1.31 rcvstore Reference Guide
E.1.32 rcvtty Reference Guide
E.1.33 refile Reference Guide
E.1.34 repl Reference Guide
E.1.35 rmf Reference Guide
E.1.36 rmm Reference Guide
E.1.37 scan Reference Guide
E.1.38 send Reference Guide
E.1.39 show Reference Guide
E.1.40 slocal Reference Guide
E.1.41 sortm Reference Guide
E.1.42 viamail Reference Guide
E.1.43 whatnow Reference Guide
E.1.44 whom Reference Guide
E.2 xmh Reference Guide
Table 1. Folder (Menu of global commands)
Table 2. Table of Contents (Menu for handling viewed folder)
Table 3. Message (Menu for handling current or selected message)
Table 4. Sequence (Menu for message sequences and searching)
Table 5. View (Menu for handling viewed message)
Table 6. Options (Menu that may be longer some day)
Table 7. Composition window (Buttonbox for handling drafts)
Table 8. xmh Text Editing Commands (Adapted from xmh(1) manual page)
E.3 MH-E Reference Guide (see The MH-E Manual)
E.4 exmh Reference Guide
E.4.1 Command-line Options
E.4.2 Main Buttons and Menus
E.4.3 Folder Buttons and Menus
E.4.4 Message Buttons and Menus
E.4.5 sedit Buttons and Menus
E.4.6 What Now Buttons and Menus
E.4.7 External Editor Interface
E.4.8 Command Keys
E.4.9 Editing Keys
E.5 MIME Reference Guide
E.5.1 Some MIME Content Types and Subtypes
E.5.2 Syntax of MIME Draft Directives
[Top]

List of Figures

1-1 How a mail message gets from A to B
1-2 MH and front-ends
2-1 Important parts of a UNIX filesystem
2-2 Two linked messages
7-1 Sending a message. Step 1: Making draft from template
7-2 Sending a message. Steps 2-4: Draft message, before and after prompter edits it
7-3 Sending a message. Steps 5-6: After composing the draft
8-1 Message linked into three folders
8-2 A subfolder
8-3 Current folder and folder stack
8-4 After pushing reports/jan onto the top of the stack
8-5 After swapping current folder with top of stack
14-1 xmh first master window
14-2 Selecting a command
14-3 xmh message composition window
14-4 Composition window with finished message
14-5 Closing composition window without saving or sending
14-6 After incorporating new messages
14-7 Selecting a message to view
14-8 Composition window with reply
14-9 Master xmh window before using grips to change sizes
14-10 Master xmh window after increasing viewed message area
14-11 Pick window
14-12 After picking messages containing pizza
14-13 Selecting the all sequence
14-14 Forwarding two messages
14-15 Master xmh window with two messages marked for deletion
15-1 xmh main window with parts labeled
15-2 Working on several drafts at once
15-3 Recomposing a draft from a second main window
15-4 Resending a returned message with Use As Composition
15-5 Search and replace pop-up window
15-6 META-Q reformatting mistake
15-7 Two folders that can incorporate mail
15-8 A view window
15-9 Folder buttonbox with some long folder names
15-10 A folder with one subfolder
15-11 A folder with four subfolders
15-12 Two messages marked for moving
15-13 Recovering a message deleted by rmmer
15-14 Message and Table of Contents from different folders
15-15 Folder before sorting
15-16 Folder after sorting
15-17 Selecting a sequence (all)
15-18 Main and Pick windows
15-19 Main window after picking mailquestions sequence
15-20 Pick window after big -Or- clicked in top area
15-21 Example of Pick skip button
15-22 Adding a message to the mailquestions sequence
16-1 Old-fashioned xmh -flag mailbox icons
16-2 Original message and reply with special ReplyInsertFilter
16-3 Screen with new geometry settings
16-4 Default composition window buttonbox
16-5 Composition window New Headers changed to Send and Close
16-6 Composition window with two buttons redefined
16-7 Display (not customized yet) with *CommandButtonCount:5
16-8 Main window with new buttonbox
16-9 Table of Contents with default scan(1) format
16-10 Table of Contents with scan.timely format file
16-11 Wide main window (and normal composition window)
16-12 Making a notice box
20-1 Main parts of the exmh display
20-2 Highlighting Key
20-3 Displaying a MIME message
20-4 The Pick dialog
21-1 exmh display
21-2 Folder list
21-3 Alias interface
21-4 Built-in editor
22-1 A second-level preferences window

List of Tables

5-1 Examples of MIME draft directives
6-1 Some Changes to MH Under POP
8-1 pick Operator Precedence
9-1 Display String Escapes
9-2 Composition String Escapes
9-3 MIME Storage Formatting Strings
9-4 MIME Storage Escapes
9-5 Sample LANG settings
9-6 Draft Message Template Filenames
11-1 mhl Variables
11-2 MH Format Escapes
11-3 Argument Types for MH-format Functions
11-4 MH-format Function Escapes (1 of 3)
11-5 MH-format Function Escapes (2 of 3)
11-6 MH-format Function Escapes (3 of 3)
11-7 MH-format Special Component and Function Escapes
12-1 Variables Set for pipe and qpipe
13-1 Environment Variables that MH Sets
13-2 Environment Variables that MH Checks
15-1 xmh Text Editing Commands: Modifying
15-2 xmh Text Editing Commands: Moving
16-1 xmh Resources
16-2 xmh Release 5 Actions
21-1 exmh Keyboard Commands
21-2 Default Folder Highlights
21-3 Mouse Bindings for Folder Labels
21-4 Table of Contents Highlighting
21-5 Table of Contents Mouse Bindings
D-1 UNIX File Descriptor Numbers
D-2 Shell Evaluating showpr eval Command

List of Examples

1-1 Short MH profile
3-1 Encoded MIME message
3-2 Sample multipart message, encoded
3-3 Sample multipart message, decoded
5-1 Using the comp command
6-1 Automatic scan of unread messages
6-2 Finding and handling a group of messages quickly
6-3 Showing a message without mhl
6-4 Showing a message with default mhl formatting
6-5 Showing a message with customized mhl formatting
6-6 Separate MH sessions with different current folders
6-7 A second session with different current folder and sequences
6-8 Automatic mail check in shell setup file
7-1 An MH alias file with comments and real names
7-2 Workaround for vi editor problem: myvi
7-3 vi Macros for entering enriched text
8-1 Searching all top-level folders
8-2 Using shell loops to sort all folders
8-3 Linking existing messages into new all-message folder
8-4 Symlink causes double listing of read-only folder
8-5 packf file format
8-6 packmbox file format
9-1 Shell aliases for MH
9-2 A big MH profile
9-3 Server profile entry to handle audio on a remote client
9-4 Default MH replcomps file
9-5 Updated MH replcomps file
9-6 Default MH digestcomps file
11-1 Unformatted message with long lines in its body
11-2 Default mhl.format file and message formatted with it
11-3 Revised mhl.format file and same message reformatted
11-4 mhl.forward: Default forw format file
11-5 Four messages forwarded with mhl.prodsumry
11-6 mhl.prodsumry: forw filter file
11-7 Sample folder with two messages
11-8 Default scan format file
11-9 Default UK scan format file
11-10 scan.hdr format file
11-11 Date parsing demonstration: scan.dateparse
11-12 Lots of information: The scan.more format file
11-13 The replcomps.addrfix format file
11-14 The rcvtty.format file
11-15 The rcvdistcomps file
12-1 Simple .maildelivery file
12-2 Mail handler for debugging
12-3 .maildelivery that routes to several places
12-4 mhl.roady file filters junk before distributing mail
12-5 Running slocal -verbose interactively
12-6 Sample slocal -debug -verbose output
13-1 for loop parsing a command line
13-2 C shell loop to make 100 test messages
13-3 Bourne shell nested loop to make 100 test messages
15-1 A simple .xmhcheck file
16-1 Default message menu accelerators
16-2 Message menu accelerators with new ComposeMessage()
16-3 Defining two of the new command buttons
16-4 Changing sort order with edprofile
16-5 Button to edit a message with vi
16-6 scan.default format file
16-7 scan.xmhwide format file
21-1 .maildelivery file for multidrop inc
21-2 .xmhcheck file
21-3 .maildelivery file for presort inc
21-4 .maildelivery file for exmh-modified slocal
22-1 Finding an X keysym

List of Example Files

The aligrep Shell Script
The append Shell Script
The autoinc Shell Script
The distprompter Shell Script
The edprofile Shell Script
The execit.c C Program
The execit.include File
The execit.link Shell Script
The execit Makefile
The folder_table file for mk_fol_names
The fols Shell Script
The forwedit Shell Script
The fpick Shell Script
The getmsgs Shell Script
The getrich Shell Script
The incs Shell Script
The inmail-show Shell Script
The mhnftpmail Shell Script
The mhprofile Shell Script
The mimecat Shell Script
The mk_fol_names Shell Script
The mk_fol_names.install Shell Script
The mydist Shell Script
The mysend Shell Script
The myvi Shell Script
The newmsgs Shell Script
The original Shell Script
The pick2me Shell Script
The rcvtty.fixup Shell Script
The rcvxterm Shell Script
The recomp Shell Script
The resend.fixmsg Shell Script
The rfl Shell Script
The rmmer Shell Script
The scandrafts Shell Script
The showpr Shell Script
The storeparts Shell Script
The vidraft Shell Script
The xmhprint Shell Script

List of Sidebars

3-1 ASCII, bits, etc.
7-1 When is a Backslash Not a Backslash?
8-1 The Pluses of MH
8-2 Getting Picky About Date Searches
8-3 Prehistoric pick-ing
13-1 What Good is a File With 1000 Links?
D-1 The Ins and Outs of Redirected I/O Loops