You can add new header fields to a message in your folder. Here's an example of where this could be useful.
Imagine that you're part of a group of people who maintain some products. When people in your group or in other parts of your company find a problem, they send mail to your group manager. Your group uses MH for a product problem-tracking system. The manager could use anno to add (or annotate) fields like X-found: and X-fixed: to the header fields.
NOTE: To be sure that your field name is legal, it's a good idea to put the characters X- before it. The name should have only letters, digits, and dashes in it. (For regulations about mail headers, see the document "RFC 822 - Standard for the Format of ARPA Internet Text Messages" Or, ask your computer's Postmaster for help.)
Look at the following example commands. Here, I'll use anno to add the following field to the current message header:
X-fixed: Linda FarpelNext, I display the message with show -- notice the other X-fixed: field, which anno added with the current time. Also see the X-found: field that shows who found the problem. The annotation text has a space in it, so quotes are required when you type the anno command:
% date Tue Feb 02 13:14:05 CST 1993 % anno -component X-fixed -text 'Linda Farpel' % show (Message server:234) X-fixed: Tue, 02 Feb 93 13:14:29 -0600 X-fixed: Linda Farpel X-found: Mon, 01 Feb 93 09:25:44 -0600 X-found: Jody Hammersmith From: andyb@field.bigcorp.com (Andy Bowman) To: bugtrack@sw.bigcorp.com ...(MH calls the parts of a message header "components." The term used in Internet standards documents like RFC 822 is "field." I use that term in this book. Unfortunately, the anno switch for adding header fields is named -component.)
Besides being able to keep the history of a problem report in the header, you can use pick to search for messages by the dates in any of the annotated fields. For example, if someone wanted to find all the problems fixed in January 1993:
% pick -datefield X-fixed -after 1-Jan-93 -and -before 1-Feb-93The -datefield switch tells pick to search X-fixed: field for its dates. (Without -datefield, pick would search the Date: field.) Be sure to put the -datefield switch before (to the left of) the -before and -after switches.
This kind of setup would be a good one for a read-only folder with bug reports that all the maintenance workers could read and that only the manager (the user who owned the folder) could modify. Here's more about folder sharing.
Here are five miscellaneous points about annotation:
% anno -text 'Linda Farpel' Enter component name: X-fixed
% anno -component xyz % anno -component xyz -text 'blah blah' -nodate
% anno -comp X-fixed % anno -comp X-fixed -text 'Linda Farpel' -nodate % show (Message server:234) X-fixed: Linda Farpel X-fixed: Tue, 02 Feb 93 13:14:29 -0600 ...The most recent annotation will be found first. In this case, pick and scan would find the text field instead of the date.
You might also decide to give the date and text fields different names.
[Table of Contents] [Index] [Previous: Removing Folders: rmf] [Next: Using Links]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>