Added -nocontentid (and -contentid, for symmetry) switch to mhbuild. This allows...
[mmh] / docs / FAQ
1 Newsgroups: comp.mail.mh,comp.answers,news.answers
2 Subject: MH Frequently Asked Questions (FAQ) with Answers
3 Keywords: FAQ,mh,mail,question,answer,pop,slocal,letter,signature,
4           draft,message,folder,xmh,olmh,vmail,vmailtool,comp,repl,
5           forw,scan,SMTP,bind,MH-E,MIME,plum,exmh,nmh
6 Summary: This document answers Frequently Asked Questions about MH, a
7          sophisticated mail interface.  It should be read by new MH
8          users and comp.mail.mh readers and before posting to this group.
9 Followup-To: poster
10 Approved: news-answers-request@MIT.Edu
11 Reply-To: Bill Wohler <wohler@newt.com>
12 From: Bill Wohler <wohler@newt.com>
13 Organization: Newt Software, Menlo Park, California, USA
14
15 Archive-name: mail/mh-faq/part1
16 Last-modified: $Date$
17 Version: $Revision$
18 Posting-Frequency: monthly
19
20   This is a living list of frequently asked questions on the mailer
21   user interface, Mail Handler, or MH.  The point of this is to
22   circulate existing information, and avoid rehashing old answers.
23   Better to build on top than start again.  Please read this document
24   before ever posting to this newsgroup.
25
26   This article is posted monthly.  If it has already expired and
27   you're not reading this, you can hope that you saved the
28   instructions to retrieve the FAQ (see "Where can I get MH") so that
29   you can get a copy through other means.
30
31   Please do not post an answer when someone posts a frequently asked
32   question; rather, email the relevant section of the FAQ to eliminate
33   unnecessary traffic in this newsgroup.
34
35   This list depends on your comments, additions and fixes: please send
36   them to Bill Wohler <wohler at newt.com>.
37
38   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
39             2001, 2004, 2005 Bill Wohler
40
41   Permission to use, copy, distribute, and translate this document for
42   any non-commercial purpose is hereby granted, provided that this
43   copyright notice appears in all copies.  Commercial distributions
44   require prior written consent.
45
46   This article is distributed in the hope that it will be useful,
47   but WITHOUT ANY WARRANTY; without even the implied warranty of
48   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
49
50 ----------------------------------------------------------------------
51   
52 Subject: Table of Contents
53 From: Bill Wohler <wohler at newt.com>
54 Date: Sat, 3 Mar 2001 11:29:16 -0800
55
56 Legend: + new, - deleted, ! changed
57 __________________
58
59 01.00 Introduction
60
61  01.01 Why should I use MH?
62 !01.02 What is the current version/status of MH?
63  01.03 Where can I get MH?
64  01.04 What references exist for MH?
65  01.05 What other MH software is available?
66  01.06 How can I print a MH manual?
67  01.07 How should I report bugs?
68  01.08 How can I convert from my mailer to MH?
69 +01.09 What is the copyright status of nmh?
70 _________________
71
72 02.00 Building MH
73
74  02.01 What machines does MH run on?
75  02.02 How do I build MH?
76  02.03 What options should I use?
77  02.04 What do I need to do to use POP?
78  02.05 Does MH support IMAP?
79  02.06 Why does "mailgroup mail" only affect inc and not slocal?
80  02.07 How can I build MH on Solaris 2?
81  02.08 How can I build MH on Linux?
82  02.09 How can I build MH on IRIX?
83  02.10 How can I get MH to interpret the Content-Length field?
84  02.11 How do I build MH on HP-UX?
85  02.12 Can I prevent adding the local hostname to addresses behind firewalls?
86  02.13 Is there a patch to fix this or that?
87  02.14 How can I build MH on OS/2?
88  02.15 Do any POP/IMAP servers handle MH format?
89  02.16 How can I build MH on Windows?
90  02.17 How can I build MH on a Mac?
91 ________________________
92
93 03.00 Scanning & Reading
94
95  03.01 What do I do if scan shows the wrong date?
96  03.02 How would one go about reading Usenet with MH?
97  03.03 How can I search through multiple folders?
98  03.04 Why don't MH format commands such as %(friendly) work?
99  03.05 Why doesn't "show" display all of a MIME message?
100  03.06 Can I get show not to run "less" so much on MIME messages?
101  03.07 Why do I get "mhn: don't know how to display content"?
102  03.08 How can I automatically delete MH backup files?
103  03.09 Fixing "cannot fopen and lock /var/spool/mail/(user)"
104  03.10 Can I read my mail with a Web browser?
105  03.11 How can I run inc automatically with POP?
106  03.12 Why does inc hang (on Sun)?
107  03.13 How can I get POP to work?
108  03.14 How do I persuade mhshow (mhn) not to bring up a new window?
109  03.15 How do I turn off of all the mhshow (mhn) prompts?
110  03.16 Why is inc splitting messages improperly?
111  03.17 Can MH thread messages?
112  03.18 How can I avoid reading the HTML version of the message?
113  03.19 How do I view or save attachments?
114  03.20 How do I view HTML attachments with Netscape?
115  03.21 Fixing folders: unable to allocate storage for msgstats
116  03.22 How do I recursively list message attachments?
117 +03.23 Why do folder and flist overlook some of my sub-folders?
118 ____________
119
120 04.00 Filing
121
122  04.01 Can I append MH messages to a Unix mailbox format file?
123  04.02 Can I append MH messages to a GNU Emacs rmail BABYL-format file?
124  04.03 Why do I get ".../.mh_sequences is poorly formatted?"
125  04.04 How can you save News articles into an MH folder?
126  04.05 Are there any good tools to archive MH messages?
127  04.06 How can I remove duplicate messages?
128  04.07 How can I remove holes in numbering?
129 __________________________
130
131 05.00 Composing & Replying
132
133  05.01 Why does repl add a "Re:" to a message that already has one?
134  05.02 How do I include messages in repl with or without ">"?
135  05.03 How can I eliminate duplicate copies of letters to myself?
136  05.04 How can I include my signature?
137  05.05 How do I call my editor with arguments?
138  05.06 How can I digestify messages in a folder for mail to another user?
139  05.07 How can I change my return address?
140  05.08 How can I change my From header?
141  05.09 How can I save a copy of all messages I send?
142  05.10 Can the folder in Fcc: be dynamically specified?
143  05.11 Can I post secure/encryped mail?
144  05.12 How can I send multi-media (MIME) attachments?
145  05.13 What's the best way to send mail to a long list of people?
146  05.14 What is the Dcc header?
147  05.15 How can I make sense of the replcomps file?
148  05.16 How can I convert quoted-printable to 8bit in quoted text in replies?
149  05.17 Can I have aliases include aliases?
150  05.18 Why doesn't mhmail understand aliases?
151  05.19 How do I send blind carbon copies?
152  05.20 When I forward a message, can I use its Subject?
153  05.21 Why is the timezone field in my 'Date:' field wrong?
154  05.22 Can I automate the comp -editor mhn process?
155  05.23 How can I remove those "=20" characters when forwarding?
156  05.24 Can I use mh-format substitution with forw?
157  05.25 How can I keep repl from breaking long lines?
158 _____________
159
160 06.00 Posting
161
162  06.01 What to do with "Problems with edit - draft removed".
163  06.02 Can I run my message through a program (e.g., ispell) before sending?
164  06.03 What to do with "bad address 'xxx' - no at-sign after local-part".
165  06.04 Fixing "post: problem initializing server; [BHST] no servers available"
166  06.05 Fixing "post: problem initializing server; [RPLY] 503 Sender
167        already specified"
168  06.06 Fixing "post: unexpected response; [BHST] no socket opened"
169  06.07 How do I fix the "X-Authentication-Warning" header?
170  06.08 Fixing "post: unexpected response; [RPLY] 503 Need MAIL
171        before RCPT"
172  06.09 Fixing "post: problem initializing server; [BHST] premature
173        end-of-file on socket"
174  06.10 Fixing "Sender didn't use the HELO protocol"
175  06.11 Fixing "post: problem initializing server; [RPLY] 553 Local
176        configuration error, hostname not recognized as local
177 __________________
178
179 07.00 Mail Filters
180
181  07.01 What mail filters are available?
182  07.02 Why slocal writes messages to system mailbox that from(1) can't read.
183  07.03 Where can I read about slocal and the format of .maildelivery?
184  07.04 How do I debug my .maildelivery file?
185  07.05 Why isn't slocal working?
186  07.06 Are there any good biff applications for MH?
187  07.07 How do I read new messages filed by procmail?
188 __________
189
190 08.00 MH-E
191
192  08.01 I have a question about MH-E
193 _________
194
195 09.00 Xmh
196
197  09.01 How can I get xmh to use Emacs as the editor?
198  09.02 Does xmh support subfolders?
199  09.03 How do I precede included messages with ">" when replying in xmh?
200 ________
201
202 Appendix
203
204  Glossary & Acknowledgments
205  Switching xmh's editor
206  babyl2mh.pl
207  inco - babyl to MH converter
208  t2h - add hyperlinks to message viewed
209  srvrsmtp.c patch
210  IRIX config file
211  HP-UX 10.20 config file
212  Removing duplicate messages (Bourne)
213  Removing duplicate messages (Perl)
214  Removing duplicate messages (Perl)
215
216 ------------------------------
217   
218 Subject: Viewing This Article
219 From: Bill Wohler <wohler at newt.com>
220 Date: Mon, 27 Nov 1995 14:44:19 -0800
221
222   To skip to a particular question with Subject or number xx, use
223   "/^S.*xx" with most pagers.  In GNU Emacs type "M-C-s ^S.*xx", (or
224   C-r to search backwards), followed by ESC to end the search.
225
226   To skip to new or changed questions, use "/^S.*[!+]" with most pagers and
227   "M-C-s ^S.*[!+]" in GNU Emacs.
228
229   This article is in digest format.  nn may have already broken this
230   message into separate articles; if not, then type "G %".  In rn, use
231   ^G to skip sections.
232
233   This article is treated as an outline when edited by GNU Emacs.  Run
234   "M-x describe-mode" to see available outline-mode commands.  Useful
235   commands are "M-x hide-body",  "C-c C-s" (show-subtree) and "M-x
236   show-all"
237
238   Check out the Usenet Hypertext FAQ Archive (see "What references
239   exist for nn?"). Files available by ftp, man pages, and other Web
240   pages, as well as cross-references like the one in this paragraph
241   are just a click away.
242
243   A "Date" field whose time is 00:00:00 is approximate.  The month and
244   year in these fields represent the time they were added to the FAQ,
245   rather than when they were contributed by the author, as is the case
246   since November, 1995.
247
248   If you should need the Internet address, use nslookup or dig if you
249   have them, or send mail to <dns at grasp.insa-lyon.fr> with
250   "help" for a Subject.
251
252   References to $MHLIB refer to the directory that contains MH support
253   files and routines. This directory is usually /usr/lib/mh or
254   /usr/local/lib/mh (or /usr/local/nmh/lib or /etc/nmh for nmh). Do
255   not use $MHLIB literally; use the real, absolute path to your MH
256   library directory.
257
258   There are slight differences between the original MH and nmh. In the
259   text, the nmh command or filename is preferred, and the MH
260   equivalent is placed in parenthesis. For example, the MH
261   configuration is in $MHLIB/mts.conf (mtstailor); mhshow (mhn -show)
262   is used to view attachments.
263
264   Note that due to bottom feeding email address harvesting spam scum,
265   mailto links have been removed and @s in addresses have been
266   replaced by "at."
267   
268 ------------------------------
269
270 Subject: 01.00 ***** Introduction *****
271 From: Bill Wohler <wohler at newt.com>
272 Date: Fri, 1 Mar 1991 13:03:15 -0800
273
274 ------------------------------
275
276 Subject: 01.01 Why should I use MH?
277 From: Jerry Peek <jpeek at jpeek.com>
278 Date: Fri, 1 Mar 1991 13:03:15 -0800
279
280   The MH message handling system is a set of electronic mail programs
281   in the public domain.  If your computer runs Unix, it can probably
282   run MH.
283
284   The big difference between MH and most other "mail user agents" is
285   that you can use MH from a Unix shell prompt.  In MH, each command
286   is a separate program, and the shell is used as an interpreter.  So,
287   all the power of Unix shells (pipes, redirection, history, aliases,
288   and so on) works with MH--you don't have to learn a new interface.
289   Other mail agents have their own command interpreter for their
290   individual mail commands (although the mush mail agent simulates a
291   Unix shell).
292
293   Because MH commands aren't part of a monolithic mail system, you can
294   use them at any time; you don't have to start or quit the mail
295   agent.  Because you use them from a shell prompt, you can use all
296   the power of the shell.
297
298   If your shell has time-saving aliases or functions (and most do),
299   you'll be able to use them with MH, of course.  And because MH isn't
300   a monolithic mail agent, you can use MH commands in Unix shell
301   scripts, or call them from programs in high-level languages like C.
302
303   Unlike most mail agents, MH keeps each message in a separate file.
304   The filename is the message number.  To rearrange the messages, MH
305   just changes the filenames.  MH can use standard Unix file system
306   operations such as removing, copying and linking messages.  The
307   message files are grouped into one or more folders, which are
308   actually Unix directories.
309
310   MH is free, powerful, flexible--and the basics are easy to learn.
311
312 ------------------------------
313   
314 Subject: !01.02 What is the current version/status of MH.
315 From: Bill Wohler <wohler at newt.com>
316 Date: Tue, 28 Sep 2004 23:51:02 -0700
317
318   The current official version of MH is 6.8.3, although a beta of
319   6.8.4 is available.
320
321   This version includes MIME, a multi-media MH package that implements
322   the new IETF work on Multi-media 822 (MIME).  This allows you to
323   include things like audio, graphics, and the like, in your mail
324   messages.  --Marshall Rose <mrose at dbc.mtview.ca.us>
325
326   MH now works with Kerberos as well.
327
328   In addition, a new program called mhparam extracts arguments from
329   .mh_profile which is useful in shell scripts.
330
331   Please see the file CHANGES in the distribution for more details. 
332
333   Due to the languishing state of MH, Richard Coleman <coleman at
334   math.gatech.edu> created another version of MH called nmh based upon
335   MH 6.8.3. He added GNU autoconf to ease installation considerably
336   and fixed several bugs and inconsistencies. Doug Morris <doug at
337   mhost.com. hosted the web site, mailing lists, web pages, and CVS
338   repository for a long time. Ken Hornstein <kenh at pobox.com> picked
339   up the torch in 2002 and moved development to Savannah where Jon
340   Steinhart <nmh at fourwinds.com> joined him as a project maintainer.
341   See http://www.nongnu.org/nmh/. The stable version of nmh is 1.0.4,
342   but 1.1-RC4 is also available. The file DIFFERENCES in the nmh
343   distribution contains an ever-growing list of differences between
344   nmh and MH.
345
346   GNU mailutils (version 0.6) is a collection of mail-related
347   utilities. At the core of mailutils is libmailbox, a library which
348   provides access to various forms of mailbox files (including remote
349   mailboxes via popular protocols and MH). See
350   http://www.gnu.org/software/mailutils/.
351
352 ------------------------------
353   
354 Subject: !01.03 Where can I get MH?
355 From: Bill Wohler <wohler at newt.com>
356 Date: Thu, 19 May 2005 21:05:17 -0700
357
358   MH comes standard with:
359   
360         Berkeley Software Design BSD/386  . . . . MH 6.8.3
361         Control Data Corp. CDC4680-MP . . . . . . EMH 1.4.2 (modified MH)
362         Debian GNU/Linux 3.1  . . . . . . . . . . nmh 1.1-RC3
363         Debian GNU/Linux 3.1  . . . . . . . . . . mailutils 0.6.1
364         DEC Ultrix 3.1  . . . . . . . . . . . . . MH 6.5
365         DEC Ultrix 4.2A.4 . . . . . . . . . . . . MH 6.7.1
366         DEC OSF/1 . . . . . . . . . . . . . . . . MH 6.7
367         Evans and Sutherland ES/OS 2.3  . . . . . MH 6.6
368         FreeBSD . . . . . . . . . . . . . . . . . MH 6.8.4
369         IBM PS/2 AIX 1.3  . . . . . . . . . . . . MH 6.4
370         IBM RISC System/6000 AIX 3.x and 4.x  . . MH 6.6
371         MIPS RISC/OS 4.52 . . . . . . . . . . . . MH 6.6
372         Red Hat Linux (3.0.3, 4.0 and 4.1)  . . . MH 6.8.3
373         SGI Irix 6.2 Freeware 2.0 CDROM . . . . . MH 6.8.3
374         Sony NEWS-OS 4.3  . . . . . . . . . . . . MH 6.7.2
375         Tektronix UTek  . . . . . . . . . . . . . MH (Version Unknown)
376         Table maintained by: "James R. Hamilton" <jrh at interlog.com>
377
378   Download MH:
379
380     http://savannah.nongnu.org/download/nmh/nmh-1.1-RC4.tar.gz          761kB
381     ftp://ftp.ics.uci.edu/pub/mh/mh-6.8.tar.Z                           2MB
382     ftp://ftp.uu.net/networking/mail/mh/mh-6.8.tar.Z                    2MB
383     ftp://ftp.efd.lth.se/pub/mail/mh-6.8.3.tar.gz                       1.3MB
384     ftp://ftp.ics.uci.edu/pub/mh/updates/MH.6.8.4.Z                     46kB
385
386   Download GNU mailutils:
387   
388     http://ftp.gnu.org/gnu/mailutils/mailutils-0.6.tar.gz               2.7MB
389
390 ------------------------------
391   
392 Subject: 01.04 What references exist for MH?
393 From: Bill Wohler <wohler at newt.com>
394 Date: Wed, 29 Sep 2004 00:21:51 -0700
395
396   The Web:
397     http://www.ics.uci.edu/~mh/
398     http://www.nongnu.org/nmh/
399     http://www.gnu.org/software/mailutils/
400     http://mh-e.sourceforge.net/
401
402   Books:
403     MH & xmh: E-mail for Users & Programmers.  Third edition. Jerry
404     Peek, with Bill Wohler and Brent Welch.
405     ISBN 1-56592-093-7.  738 pages.
406     O'Reilly & Associates, Inc.
407     Out of print as of August, 1996.
408
409     References to "the MH book" in this document refer to the third
410     edition of this book (section numbers for the second edition
411     appear in parentheses).  Links to the online edition are to the
412     updated third edition at http://www.ics.uci.edu/~mh/book/.
413
414     This book is also available online in the following locations:
415     http://www.ics.uci.edu/~mh/book/ (western USA, Web)
416     http://www.tac.nyc.ny.us/mirrors/mh-book/ (eastern USA, Web)
417     http://www.fan.net.au/mirrors/freebooks/mh/ (Australia, Web)
418     http://www.huygens.org/~eijk/mh_book/ (the Netherlands, Web)
419     http://www.funet.fi/index/MH/book/ (Finland, Web)
420     ftp://ftp.ics.uci.edu/pub/mh/book/index.htm (western USA, FTP)
421     ftp://ftp.funet.fi/index/MH/book/index.htm (Finland, FTP)
422
423     Examples from this book are in:
424     ftp://ftp.uu.net/published/oreilly/nutshell/MHxmh/MHxmh3.tar.Z      114k
425     ftp://ftp.ics.uci.edu/pub/mh/book/download/MHxmh3.tar.Z  (updated)  115k
426
427     There is another book that contains a number of examples of
428     advanced mail handing using MH as the example message handler.
429     It's also quite a good reference on email in general.  
430
431     The Internet Message.  Marshall T. Rose
432     ISBN 0-13-092941-7.  396 pages.
433     P T R Prentice Hall
434
435   Papers:
436     MHN Tutorial by Jerry Sweet
437     ftp://ftp.ics.uci.edu/pub/mh/contrib/multimedia/mhn-tutorial.ps.Z   141k
438     ftp://ftp.ics.uci.edu/pub/mh/contrib/multimedia/mhn-tutorial.tex.Z  48k
439
440   Usenet:
441     comp.mail.mh
442     gmane.mail.exmh.devel
443     gmane.mail.exmh.user
444     gmane.mail.mh-e.announce
445     gmane.mail.mh-e.devel
446     gmane.mail.mh-e.user
447     gmane.mail.nmh.devel
448     
449   Mailing lists:
450     There are three mailing lists for nmh: nmh-announce, nmh-workers,
451     and nmh-commits. See:
452
453       http://savannah.nongnu.org/mail/?group=nmh
454   
455     The page for each list contains a link to the archives.
456       
457   MH-users archives:
458     The files are in packf(1) format, compressed with compress(1).  To
459     get them, use anonymous ftp and set "binary" transfer mode.
460
461       current archive, uncompressed:
462       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.mbox
463
464       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.95.Z               1724k
465       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.95.scan.Z          113k
466       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.94.Z               1669k
467       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.94.scan.Z          57k
468       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.93.Z               1507k
469       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.93.scan.Z          51k
470       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.92.Z               1251k
471       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.92.scan.Z          43k
472       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.91.Z               858k
473       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.91.scan.Z          36k
474       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.90.Z               393k
475       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.90.scan.Z          21k
476       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.89.Z               89k
477       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.89.scan.Z          5k
478       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.88.Z               178k
479       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.88.scan.Z          11k
480       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.87.Z               54k
481       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.87.scan.Z          3k
482       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.86.Z               8k
483       ftp://ftp.ics.uci.edu/pub/mh/mh-users/mh-users.86.scan.Z          771
484
485     There are directions in ftp://ftp.ics.uci.edu/pub/mh/mh-users/README.
486     Basically, you can use either "msh" or the individual commands
487     "inc -file" to get the messages into a folder, and then "scan",
488     "pick", "show", and so on (or your favorite commands in xmh, MH-E,
489     etc.).  --Jerry Peek <jpeek at jpeek.com>
490
491     Achim Bohnet <ach at rosat.mpe-garching.mpg.de> has created an
492     excellent indexed version of the archive, plus some other archives
493     besides.
494
495       http://www.rosat.mpe-garching.mpg.de/mailing-lists/mh-users/
496       http://www.rosat.mpe-garching.mpg.de/mailing-lists/exmh/
497       http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/
498       http://www.rosat.mpe-garching.mpg.de/mailing-lists/mhonarc/
499
500   This document:
501     http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
502     http://www.cs.ruu.nl/wais/html/na-dir/mail/mh-faq/part1.html
503
504   MH-E documentation:
505     GNU Emacs 19.29 comes with a version of MH-E that now includes
506     online (Texinfo) documentation.  Try "C-h i m mh-e RET".  It is
507     also available online at http://www.ics.uci.edu/~mh/book/mh-e/.
508     See also "What other MH software is available?" to see where you
509     can get the latest version of MH-E which includes the
510     documentation sources.
511
512   exmh:
513     The FAQ is available at http://www.beedub.com/exmh/exmh-faq.html.
514     The online exmh sections from the MH book can be found at
515
516       http://www.ics.uci.edu/~mh/book/exmh/tocs/jump.htm.
517
518   Signature and Finger FAQ:
519     http://www.faqs.org/faqs/usenet/signature-faq/
520
521 ------------------------------
522   
523 Subject: 01.05 What other MH software is available?
524 From: Stephen Gildea <gildea at stop.mail-abuse.org>, Bill Wohler <wohler at newt.com>
525 Date: Thu, 19 May 2005 21:20:57 -0700
526
527   MH-E is the Emacs interface to the MH mail system. It offers all the
528   functionality of MH, the visual orientation and simplicity of use of
529   a GUI, and full integration with Emacs and XEmacs, including
530   thorough configuration and online help.
531
532   MH-E allows one to read and process mail very quickly: many commands
533   are single characters; completion and smart defaults are used for
534   folder names and aliases. With MH-E you compose outgoing messages in
535   Emacs. This is a big plus for Emacs users, but even non-Emacs users
536   have been known to use MH-E after only learning the most basic
537   cursor motion commands.
538
539   Additional features include:
540
541       * attractive text rendering with font lock
542       * composition and display of MIME body parts
543       * display of images and HTML within the Emacs frame
544       * folder browsing with speedbar
545       * threading
546       * ticking messages
547       * lightning-fast full-text indexed searches of all of your email
548       * virtual folders to view ticked and unseen messages, search results
549       * multiple personalities
550       * signing and encrypting
551       * spam filter interaction
552       * XFace, Face header field support
553
554   The GNU Emacs distribution includes MH-E.
555
556   MH-E is maintained at SourceForge:
557
558     http://mh-e.sourceforge.net/
559
560 From: Chris Menzel <cmenzel at philebus.tamu.edu>
561 Date: Sat, 15 Dec 2001 10:02:38 -0600
562
563   The terminal-oriented, fast, and powerful mutt mail client not only
564   supports the MH mail format but also supports .mh_sequences files,
565   providing a robust interface to MH. It is also amazingly
566   configurable and is very adept at handling MIME attachments and HTML
567   mail.
568
569   Unlike MH, the displayed message numbers do not necessarily
570   correspond to the message filenames. This makes threading and
571   sorting lightning fast but slower to display very large folders.
572
573     http://www.mutt.org/
574
575 From: Brent Welch <welch at acm.org>
576 Date: Tue, 20 Mar 2001 22:42:15 -0800
577
578   EXMH is a user interface for the MH mail system written in TCL/TK.
579
580   Exmh has MIME support, color feedback in the scan listing, a folder
581   display with one label per folder, clever scan caching, facesaver
582   bitmap display; background inc, various inc styles, searching over
583   folder listing and message body, a dialog-box interface to MH pick,
584   a simple built-in emacs-like editor, interfaces to other editors,
585   user preferences, user hacking support. For more info or to obtain
586   exmh, see:
587
588     http://exmh.sourceforge.net/
589
590 From: "Eric D. Friedman" <friedman at hydra.acs.uci.edu>
591 Date: Tue, 9 Feb 1999 22:52:44 -0800
592
593   Mhtake is a perl script that lets you add people to your mail
594   aliases file by typing mhtake [message #].
595
596     http://orion.oac.uci.edu/~friedman/mhtake.txt
597
598 From: Steinar Bang <sb at metis.no>
599 Date: Fri, 26 Jan 1996 13:51:08 +0100
600
601   Mew (an Emacs interface to MH that has MIME and PGP capabilities) is
602   found at:
603
604     ftp://ftp.aist-nara.ac.jp/pub/elisp/Mew/mew-current.tar.gz
605
606   [MH-E has had these capabilities since version 7.0 so mew is
607   obsolete if you use MH-E.--Ed]
608
609 From: James Perkins <jamesp at sp-eug.com> 
610 Date: Fri, 1 Jan 1993 00:00:00 -0800
611
612   Vmh is designed for people using the bulletin-board features of MH,
613   where mail is stored in packed (single-file) folders. As a result,
614   use of this program cannot be mixed with the use of normal MH
615   commands. Vmh is a part of the official MH distribution.
616
617 From: James Perkins <jamesp at sp-eug.com>
618 Date: Fri, 1 Jan 1993 00:00:00 -0800
619
620   Xmh is a X11 mouse-based MH browsing tool. It is very powerful and
621   feature-filled and thus comes with a moderate learning curve. Its
622   dependence on the X11 environment makes it very reconfigurable, but
623   only by people well-versed in X applications programming. Its
624   message reply built-in-editor interface is not always popular among
625   those used to having MH bring up the editor of their choice.
626
627 Date: Fri, 1 Jan 1993 00:00:00 -0800
628
629   xmh is part of the standard X Window System distribution from the X
630   Consortium. Ultrix also ships dxmail which is similar.
631
632     ftp://cs.utk.edu/pub/xmh.shar.Z                                     162k
633
634 From: Harald Tveit Alvestrand <hta at boheme.er.sintef.no>
635 Date: Fri, 1 Jan 1993 00:00:00 -0800
636
637   Here's a version of xmh that includes MIME.
638
639     ftp://aun.uninett.no/pub/mail/mixmh/mixmh-0.3.tar.Z                 232k
640
641 From: Nathaniel Borenstein <nsb at thumper.bellcore.com>
642 Date: Sun, 26 Nov 1995 19:04:51 -0800
643
644   Metamail is a package that can be used to convert virtually ANY
645   mail-reading program on Unix into a multi-media mail-reading
646   program. It is an extremely generic implementation of MIME
647   (Multipurpose Internet Mail Extensions), the proposed standard for
648   multi-media mail formats on the Internet. The implementation is
649   extremely flexible and extensible, using a "mailcap" file mechanism
650   for adding support for new data formats when sent through the mail.
651   At a heterogeneous site where many mail readers are in use, the
652   mailcap mechanism can be used to extend them all to support new
653   types of multi-media mail by a single addition to a mailcap file.
654
655   The metamail distribution comes complete with a small patch for each
656   of over a dozen popular mail reading programs, including Berkeley
657   mail, mh, Elm, Xmh, Xmail, Mailtool, Emacs Rmail, Emacs VM, Andrew,
658   and others. Note that the MH patches are now integrated into MH 6.8.
659
660     ftp://ftp.bellcore.com/pub/nsb/mm2.7.tar.Z
661
662 From: Tom Christiansen <tchrist at perl.com>
663 Date: Tue, 9 Feb 1999 22:55:24 -0800
664
665   Plum is a highly configurable and extensible screen-oriented
666   front-end for processing MH mail on ASCII terminals. Unlike MH-E,
667   the extension language used in plum is perl, not LISP. Plum offers
668   many of the advantages of xmh, but lacks several of xmh's
669   disadvantages. The look&feel derives more from vi than from emacs.
670   Key bindings and functions may be changed on the fly to suit the
671   user's preference. It offers filename and word completion on folder,
672   variables, and command names.
673
674   Until it is included in the standard distribution (under
675   miscellany), you can find a copy on:
676
677     http://www.cpan.org/authors/Tom_Christiansen/scripts/plum.gz        29k
678
679   or mail requests to Tom
680
681 From: Jerry Sweet <jsweet at irvine.com>
682 Date: Tue, 1 Nov 1994 00:00:00 -0800
683
684   Mhunify is a set of perl scripts and templates that provides
685   shell-level MH functionality with USENET news. Since MH supports
686   MIME, MIME-format news articles just work. I've found that being
687   able to handle news in the same way that I handle email is very
688   useful, although there are some tradeoffs.
689
690   Mhunify also treats MH folders just like news groups. If you
691   subscribe to several mailing lists, and your email is automatically
692   delivered to separate folders, say, via procmail or via MMDF's
693   .maildelivery, the mhunify package lets you progress automatically
694   through your folders just as you would news groups.
695
696     ftp://ftp.ics.uci.edu/pub/mh/contrib/multimedia/mhunify.shar.gz
697
698 From: Dale Carstensen <dlc at c3file.c3.lanl.gov>
699 Date: Tue, 1 Nov 1994 00:00:00 -0800
700
701   olmh is a demo for OLIT (Open Look Interface Toolkit, the Open Look
702   wrapper to Xt) in Sun's Open Windows 3 that does handle 3rd and
703   subsequent levels of nesting of folders.
704
705   Obtain the Open Windows 3 distribution CD/ROM from Sun (SPARC only).
706   To do this, call 1-800-USA-4SUN and send tone "2" for telemarketing
707   after it answers. The 4.1.2 CD/ROM may also have Open Windows 3. The
708   list price for the 4.1.2 CD/ROM is $200.
709
710 From: James Perkins <jamesp at sp-eug.com>
711 Date: Sun, 1 May 1994 00:00:00 -0800
712
713   Vmail is a curses-based, vi-like message browser which calls on MH
714   programs to manipulate mail. It can be used on almost any terminal.
715   It organizes mail folders into index pages, from which a message can
716   be selected to be shown, replied-to, forwarded, refiled, deleted,
717   and so on. The vi-like interface and command keystrokes are
718   comfortable to less-experienced Unix users, and it is a small,
719   compact program, unlike the MH-E Emacs package.
720
721   This version of vmail has been bugfixed and enhanced from the
722   original vmail published on the net in 1987 by J. Zobel.
723
724     ftp://ftp.uu.net/comp.sources.unix/volume12/vmail/part0*.Z          46k
725     ftp://ftp.ucs.ubc.ca/pub/mh/vmail.[1-3]of3.Z                        58k
726
727   Or mail requests to James.
728
729 From: James Perkins <jamesp at sp-eug.com>
730 Date: Sun, 1 May 1994 00:00:00 -0800
731
732   vmailtool may be for you if you have a Sun workstation. It is a
733   button gadget panel for the above-mentioned vmail program. It brings
734   vmail into the windows era where people no longer need to memorize
735   specific command keystrokes. It also provides a mail icon with the
736   flag that pops up when new mail arrives. Again, this is a compact,
737   simple tool, unlike the powerful xmh program. Still, it's a welcome
738   alternative for many people who are running SunView or OpenWindows.
739
740     ftp://ftp.ucs.ubc.ca/pub/mh/vmailtool.Z                             18k
741
742   or mail requests to James.
743
744   MMH, My Mail Handler, is a Motif interface for reading and sending
745   mail. It uses the MH commands to actually handle sending a receiving
746   messages. It does not support all the capabilities of MH, but offers
747   a large enough subset to handle the majority of users. Its intended
748   user is someone between "bumbling email novice" and "sophisticated
749   user". Hooks are provided to allow the user to customize and add new
750   commands.
751
752     ftp://ftp.eos.ncsu.edu/pub/bill/bill.tar.Z                          120k
753
754 From: Andrew Waugh <ajw at mel.dit.csiro.au>
755 Date: Fri, 1 Jan 1993 00:00:00 -0800
756
757   X.500 lookups: If a name is enclosed in square brackets, when
758   entering a destination address:
759
760     To: [Greg Wickham,CSIRO]
761
762   a search will be made in the X.500 Directory for the individual's
763   entry. If an address exists then it will be extracted and placed
764   into the headers. Mail requests for the software to the author.
765
766 From: Barbara Dyker <dyker at teal.csn.org>
767 Date: Fri, 1 Jan 1993 00:00:00 -0800
768
769   QuemeMH is an email based service request and tracking system
770   based on the Rand Mail Handler.
771
772     ftp://ftp.cs.colorado.edu/pub/cs/sysadmin/utilities/queuemh.tar.Z   98k
773
774 From: <info at rootgroup.com>
775 Date: Mon, 1 Mar 1993 00:00:00 -0800
776
777   Qmh is an MH-based group mail management tool. Written entirely in
778   perl, Qmh combines the best aspects of MH with group mail heuristics
779   and delivers a sensible package for all levels of Unix users. A
780   limitless number of individual queues and associated groups of
781   permitted users can be established.
782
783   Specific functionality includes the following modes of operation;
784   checking header dates and sending reminder/deadline mail, editing
785   existing messages, help screens, creating new messages from scratch
786   or exiting messages, resolving messages, scanning queue folders, and
787   annotating with status both by editing and sending mail.
788
789   Qmh is a single generic program in and of itself from which all
790   modes of operation are invoked. Additionally, each separate queue
791   may be accessed via a link to the single program. All system
792   configuration is maintained in a single file that is read upon each
793   invocation of Qmh. Formatting and template files are provided in the
794   system library, although individual users can override the defaults
795   simply by creating equivalent files in their own MH mail directory.
796
797   Qmh provides a powerful database-like functionality by allowing
798   limitless per-queue X-Qmh-<$value> headers to be included in
799   messages. These "fields" then form the context of the queue messages
800   and provide a user-defined, but yet structured environment for
801   queries, reporting, and random information.
802
803   Qmh is designed to provide a complete solution for SA groups, help
804   desks, support organizations, or wherever two or more individuals
805   are trying to manage multiple mail requests.
806
807   Qmh is also compatible with versions of xmh that provide user-level
808   command buttons. Provided in the Qmh package is a ~/.Xdefaults
809   template file that's setup to harness the power of Qmh.
810
811 From: Jerry Peek <jpeek at jpeek.com>, Shannon Yeh <yeh at netix.com>
812 Date: Sun, 11 Mar 2001 00:23:21 -0800
813
814   MacMH and PC/MH:
815     These were available only for non-commercial degree-granting
816     institutions from:
817
818       Networking & Communication Systems
819       115 Pine Hall
820       Stanford University
821       Stanford, CA 94305-4122
822       Phone: +1 415-723-3909
823
824     See also:
825       ftp://netix.com/pub/pc-mh-info/*
826
827     For more PC/MH info, contact:
828
829       Netix Communications, Inc.
830       15375 Barranca Parkway
831       Building G, Suite 107
832       Irvine, CA 92718
833       Phone: +1 714-727-9532
834       FAX:   +1 714-727-3922
835       Internet: info at netix.com
836
837     In addition, you might try Wollongong, to see if they have something you
838     can get.
839
840     [This information appears to be out of date.  Please send me
841     pointers to valid information.  Potential sites include
842     jessica.stanford.edu.--Ed]
843
844     Two other potential methods to run MH under Windows: Run Unix
845     under Windows with VMware (http://www.vmware.com/) or try to
846     compile nmh with the Cygwin tools (http://www.cygwin.com/).
847
848 ------------------------------
849   
850 Subject: 01.06 How can I print a MH manual?
851 From: Bill Wohler <wohler at newt.com>, Jos Vos <jos at bull.nl>
852 Date: Mon, 9 Sep 1996 01:21:49 -0700
853
854   First, check out the documents available on http://www.ics.uci.edu/~mh/.
855
856   To order a copy by mail, see the section on how to get MH by mail
857   (see "Where can I get MH?" and "What references exist for MH?").
858
859   To print your own copy, first obtain the MH sources (see "Where can
860   I get MH?") if you don't already have it.  Go into the "doc"
861   directory and run "make guide" to create the administrators guide
862   and "make manual" to create a user's manual which includes tutorials
863   and man pages.  If the doc directory is empty or is missing the
864   Makefile, you'll have to run "mhconfig MH" in the conf directory so
865   that the documentation with correct local information is created.
866
867   For properly formatting the documentation (at least the manual
868   pages) you might even have to install MH, because a reference to a
869   tmac.h file in the MH lib directory is made in the manual pages.
870
871   You can also ftp the ASCII or postscript versions:
872
873     ftp://ftp.ics.uci.edu/pub/mh/doc/tutorial.ps.Z                      65k
874     ftp://ftp.ics.uci.edu/pub/mh/doc/ADMIN.ps.Z                         56k
875     ftp://ftp.ics.uci.edu/pub/mh/doc/MH.ps.Z (man pages)                261k
876     ftp://ftp.uu.net/networking/mail/mh/doc/tutorial.ps.Z
877     ftp://ftp.uu.net/networking/mail/mh/doc/ADMIN.ps.Z
878     ftp://ftp.uu.net/networking/mail/mh/doc/MH.ps.Z (man pages)
879
880   Or, you can send a note to <mail-server at NL.net> with a body
881   containing the following:
882
883     send /mail/mh/papers-ps/tutorial.ps.Z
884
885 ------------------------------
886   
887 Subject: 01.07 How should I report bugs?
888 From: Bill Wohler <wohler at newt.com>
889 Date: Wed, 29 Sep 2004 00:12:42 -0700
890
891   Bugs in nmh should be reported at:
892
893     http://savannah.nongnu.org/bugs/?group=nmh
894
895   Bugs in MH-E should be reported at:
896
897     http://sourceforge.net/tracker/?atid=113357&group_id=13357
898
899 ------------------------------
900   
901 Subject: 01.08 How can I convert from my mailer to MH?
902 From: Mike Sutton <mws115 at llcoolj.dayton.saic.com>
903 Date: 7 Jul 1995 10:03:50 GMT
904
905   The unrmail function will convert rmail format to mbox format.
906
907 From: Jerry Peek <jpeek at jpeek.com>
908 Date: Fri, 1 Mar 1991 13:03:15 -0800
909
910   If you use one of a mail agent like 'mail', 'mailx', 'elm' or
911   'mush', converting to MH is easy.  When you run the 'inc' command,
912   it reads all new messages from the system mailbox into your 'inbox'
913   folder.  Those mail agents also have separate files or "folders"
914   that hold messages in the same format as the system mailbox.  You
915   can read them with the 'inc -file' command.  For example, to read
916   the messages from your 'mbox' mail file into your MH 'inbox' folder,
917   you'd type:
918
919     % cd
920     % cp mbox mbox.backup
921     % inc -file mbox
922
923   If you see the usual "Incorporating new mail into inbox..." message
924   and a scan listing, the messages probably were converted.  Read some
925   or all of them (with the 'show' command) and be sure.  The 'inc'
926   won't remove your mbox unless you use '-truncate'.
927
928 From: "Jason R. Mastaler" <jason at Mastaler.COM>
929 Date: Mon, 1 May 1995 00:00:00 -0800
930
931   You can also specify an alternate folder to inc.  Here's how you
932   can convert all your folders en masse:
933
934     for arg in `cat flist`; do
935         echo "converting $arg"
936         inc +"$arg" -file "$arg" -silent
937     done
938
939   Section D.4 of the MH book's second edition lists two scripts to
940   convert mail files to MH folders: babyl2mh to convert from rmail's
941   BABYL format; vmsmail2mh to convert from VMS's mail (see "What
942   references exist for MH") to see where the book's examples can be
943   ftped from).  These scripts aren't in the third edition but are in
944   its archive file.
945
946 From: Vivek Khera <khera at cs.duke.edu>
947 Date: Fri, 1 Jan 1993 00:00:00 -0800
948
949   I rewrote the above script in Perl since the original script doesn't
950   work for some people (see "babyl2mh.pl" below).
951
952 From: Juergen Nickelsen <nickel at cs.tu-berlin.de>
953 Date: Fri, 1 Jan 1993 00:00:00 -0800
954
955   You can remove the second to last second line ("> $input"), so
956   that the script doesn't zero out your RMAIL file.
957
958   Another alternative is to replace this line with "inc -file $tmpmbox
959   $folder && > $input", so that the RMAIL is only zeroed if inc
960   successfully incorporated the mail.  Finally one could add a switch
961   -z, so that the RMAIL file is only zeroed if the switch is given.
962   (See "Appendix inco".)
963
964 Date: Sun, 1 May 1994 00:00:00 -0800
965
966   Use the following to convert a BABYL format file to Unix mail
967   format.
968
969     ftp://inf.informatik.uni-stuttgart.de/pub/gnu/emacs_extras/rmailtovm.el.Z
970       6k
971
972   See also MH book second edition (Appendix D).
973
974 ------------------------------
975   
976 Subject: 01.09 What is the copyright status of nmh?
977 From: Richard Coleman <coleman at math.gatech.edu>
978 Date: Mon, 10 Oct 2005 18:16:58 -0700
979
980   nmh is distributed under a variant of the classical BSD copyright.
981   Check the COPYRIGHT file in the nmh distribution for the details.
982   There are some specific files which were contributed to the original
983   MH package that are copyrighted by their original author. We have
984   retained the copyright notices of these authors in these files.
985
986 ------------------------------
987
988 Subject: 02.00 ***** Building MH *****
989 From: Bill Wohler <wohler at newt.com>
990 Date: Fri, 1 Mar 1991 13:03:15 -0800
991
992 ------------------------------
993
994 Subject: 02.01 What machines does MH run on?
995 From: Bill Wohler <wohler at newt.com>
996 Date: Thu, 19 May 2005 21:22:55 -0700
997
998   MH isn't just for Unix any more.  Versions are reported to run on
999   OS/2 (see "How can I build MH on OS/2?"), Windows (see "How can I
1000   build MH on Windows?"), and Mac (see "How can I build MH on Mac?").
1001   Oh yeah, the Mac is now Unix. Maybe Windows Longhorn will be built
1002   on Unix too.
1003
1004 From: Jerry Peek <jpeek at jpeek.com>
1005 Date: Fri, 1 Mar 1991 13:03:15 -0800
1006
1007   If you have a computer running Unix, you can probably run MH.
1008
1009 ------------------------------
1010   
1011 Subject: 02.02 How do I build MH?
1012 From: Bill Wohler <wohler at newt.com>
1013 Date: Sun, 8 Sep 1996 15:13:12 -0700
1014
1015   If you're using Linux, you can simply install the nmh or MH package
1016   which is available in most distributions.
1017
1018   If you want to build nmh, follow the directions in the file named
1019   INSTALL. Basically, it's simply "./configure; make; make install."
1020
1021   If you have MH on the other hand, if you carefully read the file
1022   named READ-ME in the root of the source hierarchy, you should not
1023   have any trouble building MH.
1024
1025   If you're having troubles building MH, it could be that the problem
1026   has already been fixed, but hasn't yet gotten into an official
1027   release.  Please see http://www.gw.com/mail/mh/patches/ for more info.
1028
1029 ------------------------------
1030   
1031 Subject: 02.03 What options should I use?
1032 From: Bill Wohler <wohler at newt.com>
1033 Date: Tue, 1 Dec 1992 00:00:00 -0800
1034
1035   BERK: Do NOT include the BERK option (in versions 6.7 or later)!
1036   BERK breaks the mh-format functions that take apart address lines,
1037   for example mbox, from, and friendly.  This would really put a crimp
1038   on my replcomps file.
1039
1040   LOCKF: if you have NFS, you need to lock your mailbox with lockf()
1041   so the lock will be honored by all machines on the local network.
1042   If you have the lockf() system call, include LOCKF.
1043
1044   JQ Johnson <jqj at duff.uoregon.edu> makes the point that one
1045   should use this option carefully since it requires a robust lockf()
1046   call. For example, this option caused serious problems on his SunOS
1047   4.1.1. He suggested using LOK_BELL instead, and adding "lockstyle:
1048   1" to $MHLIB/mts.conf (mtstailor).
1049
1050   ATZ: makes your timezones print like "EST" instead of "-0500".  Much
1051   prettier.  --Stephen Gildea <gildea at stop.mail-abuse.org>
1052
1053   However, Tony Landells <ahl at technix.oz.au> replies: "Yes;
1054   very pretty.  How unfortunate that timezone names are so ambiguous,
1055   so that EST can be interpreted, at a minimum, as (American) Eastern
1056   Standard Time, (Australian) Eastern Standard Time, or (Australian)
1057   Eastern Summer Time (and yes, I think it's dumb having the same
1058   acronym for both normal and Summer time, but that's a different
1059   problem).  While the numeric timezones may not look as nice, they
1060   are, at least, reasonably unambiguous.  I would urge anyone who ever
1061   intends/hopes/expects to use email outside the U.S. to NOT use ATZ
1062   (sorry Stephen)."
1063
1064   At any rate, the conf/examples directory has been updated and
1065   contains many examples show you which options are required on your
1066   platform and which are optional (in the upcoming version MH 6.8).  At
1067   any rate, it is recommended that you examine the options in the
1068   example configuration files, and read about them in READ-ME.
1069
1070   RPATHS: a side-effect is that slocal writes messages to your system
1071   maildrop without the MMDF C-A's that separate messages, so your BSD
1072   tools like from work.
1073
1074 ------------------------------
1075   
1076 Subject: 02.04 What do I need to do to use POP?
1077 From: Bill Wohler <wohler at newt.com>
1078 Date: Sun, 8 Sep 1996 23:31:01 -0700
1079
1080   MH6.7 (and earlier versions too) include a server for version 3 of POP.
1081
1082 From: Morgan Fletcher <morgan at tupelo.best.com>
1083 Date: 14 Mar 1996 19:24:23 -0800
1084
1085   Ensure that /etc/services contains the following:
1086
1087       pop2      109/tcp         postoffice      # POP version 2
1088       pop2      109/udp
1089     ->pop       110/tcp         # POP version 3 (MH's inc thinks it's "pop")
1090     ->pop       110/udp
1091       pop3      110/tcp         # POP version 3
1092       pop3      110/udp
1093
1094   Also compile with the POP options: POP, DPOP, RPOP, etc.
1095
1096 From: Richard Coleman <coleman at math.gatech.edu>
1097 Date: 06 Feb 1997 03:43:17 -0500
1098
1099   To get MH to use the pop3 service, add POPSERVICE=pop3 to your MH
1100   configuration and recompile:
1101
1102 ------------------------------
1103   
1104 Subject: 02.05 Does MH support IMAP?
1105 From: Lyndon Nerenberg <lyndon at MessagingDirect.COM>
1106 Date: 27 Jul 1999 11:33:39 -0600
1107
1108   Run exmh on the laptop, and modify your .mh_profile to inc using
1109   APOP. This is how I run MH-E and it works fine. (I did have to
1110   modify MH-E a wee bit to allow it to prompt for the password. You
1111   would likely have to do something similar with exmh.)
1112
1113   As a spare time project I'm adding enough IMAP support to MH (6.8.3)
1114   to allow you to 'inc -imap [-imapfolder foo]'. If I ever get this
1115   done I'll stick the diffs up somewhere. (It's not a big priority as
1116   I can get at my IMAP INBOX using APOP.)
1117
1118 From: Tim Showalter <tjs at andrew.cmu.edu>, John Prevost <visigoth at cs.cmu.edu>
1119 Date: Wed, 25 Sep 1996 21:34:56 -0400
1120
1121   We are developing fmh and intend to support as much of MH as is
1122   feasible.  However, MH and IMAP don't necessarily agree as to what
1123   things are going to look like.  MH has static message numbers until
1124   you pack a folder; IMAP keeps two numbers on a message, one which is
1125   absolutely static and one which is relative to the top of a mailbox.
1126   Messages in IMAP are essentially immutable.  IMAP doesn't
1127   (currently) allow message annotations.  fmh will keep state with a
1128   background daemon instead of writing it to disk, and will probably
1129   try and keep as little on disk as possible.
1130
1131   fmh doesn't understand MH folders at the moment, and probably won't
1132   for a really long time, if ever.  As I said before, we're mostly
1133   interested in the IMAP aspects as we're using a networked file
1134   system and saving stuff on the local disk just isn't an option.
1135
1136   fmh is not MH at a very fundamental level.  It is very unlikely that
1137   it will be merged, as we're not quite as interested in creating
1138   something that is MH and IMAP as we are in writing a good IMAP
1139   client.  Also, the MH code isn't going to take the introduction of
1140   IMAP without a near complete rewrite.
1141
1142   It is not available yet.  Inquiries are welcome at
1143   <tjs+fmh at andrew.cmu.edu>.
1144
1145 From: Rahul Dhesi <dhesi at rahul.net>
1146 Date: 23 Sep 1996 08:39:52 GMT
1147
1148   What prevents people from doing a telnet to their mail server,
1149   logging in, and firing up MH directly?  Site policy?  An operating
1150   system that does not let MH compile or run?  Overloaded machine with
1151   insufficient processing power for MH?  All these are site-specific
1152   problems and the solution lies in solving them locally, not in
1153   forcing MH to go over IMAP.
1154
1155   IMAP was never designed to emulate a filesytem.  MH was designed to
1156   make direct advantage of the filesytem structure.  There is no
1157   compatibility between the two.  By the time IMAP is revised enough
1158   to support MH you will have reinvented NFS.
1159
1160   There *is* scope for redesign here, though.  It would be nice to
1161   have a single-user filesystem.  Create a binary telnet session to
1162   the filesystem server, log in as yourself, and then over that
1163   session run a filesystem protocol.  Normal filesystem protections at
1164   the other end will be sufficient for all permissions checking, so
1165   the filesystem protocol would need to do no other permissions
1166   checking.  The question of whom to export directories to would go
1167   away: They are exported to whoever completes a successful login, and
1168   accessible to the user if he would be able to access them on the
1169   server as his login id.  You could even use challenge-response for
1170   the initial login, coupled with ssh-based encryption, so you
1171   automatically have a secure filesystem without even trying.
1172
1173   IMAP is too restricted in its scope to be easily modifiable to
1174   emulate such a filesystem.  It would have to be a redesign from
1175   scratch.
1176
1177 From: John Romine <jromine at ics.uci.edu>
1178 Date: Sun, 8 Sep 1996 15:45:27 -0700
1179
1180   No.  MH only supports retrieving mail using POP3.  POP3 is on the
1181   "standards track"--it is now an elective Internet Draft Standard
1182   (see RFC 1939 for more details).  At this point, IMAP[23] are
1183   "experimental, limited use" protocols; it is unlikely that MH will
1184   support them.
1185
1186 From: Bill Wohler <wohler at newt.com>
1187 Date: Sun, 8 Sep 1996 15:45:32 -0700
1188
1189   Since John posted the message above, IMAP has progressed from an
1190   "experiemental, limited use" protocol.  While IMAP is not universal,
1191   many vendors now have implementations.
1192
1193   I've found several things which might help.  First, a definition
1194   lifted from the Pine FAQ:
1195
1196   What is IMAP?
1197
1198   IMAP stands for "Internet Message Access Protocol".  An IMAP client
1199   program on any platform at any location on the Internet can access
1200   email folders on an IMAP server.  While the messages appear to be
1201   local, they reside on the server until the client explicitly moves
1202   or deletes them.  The IMAP protocol is a superset of POP, containing
1203   all POP commands plus more.  For a comparison of IMAP and POP, see
1204   the paper Comparing Two Approaches to Remote Mailbox Access: IMAP
1205   vs. POP (in ftp.cac.washington.edu:/mail/imap.vs.pop).  IMAP is what
1206   allows Pine (or any other IMAP client) to get to email on a central
1207   campus email server.  There are current IETF working groups revising
1208   IMAP and readying it to become an Internet standard. A copy of the
1209   latest IMAP draft may be obtained from:
1210   
1211     ftp://ftp.cac.washington.edu/mail/latest-imap-draft
1212
1213   For a list of IMAP clients, see the file imap.software, in the same
1214   directory.
1215
1216 From: David L Miller <dlm at cac.washington.edu>
1217 Date: Mon, 1 Aug 1994 00:00:00 -0800
1218
1219   ipop3d from the UW IMAP toolkit can operate in a couple modes.  As a
1220   straight POP3 server, it uses the same C-client library as imapd, so
1221   it co-exists comfortably with imapd.  It can also operate as a
1222   POP-to-IMAP gateway so that your POP-only clients can access IMAP
1223   services.
1224
1225     ftp://ftp.cac.washington.edu/mail/imap.tar.Z                        1.0M
1226
1227 From: Mark Crispin <MRC at Panda.COM>
1228 Date: Mon, 1 Aug 1994 00:00:00 -0800
1229
1230   The only answer I can give for [how MH users can use IMAP] is that
1231   Pine can read mailboxes in MH format; and that someone might in the
1232   future develop a version of MH that can use IMAP.
1233
1234 ------------------------------
1235   
1236 Subject: 02.06 Why does "mailgroup mail" only affect inc but not slocal?
1237 From: John Romine <jromine at ics.uci.edu>
1238 Date: Fri, 1 Jan 1993 00:00:00 -0800
1239
1240   If "mailgroup" is set, inc is made set-group-id to this group name.
1241   Some SYS5 systems want this to be set to "mail".  Set this if
1242   /usr/spool/mail (or /usr/mail) is not world-writable.  These
1243   changes were contributed by Peter Marvit, and "inc" is very careful
1244   about its use of the set-gid privilege.
1245
1246   Note that slocal doesn't know how to deal with this, and will not
1247   work under these systems; just making it set-group-id will open a
1248   security hole (since it doesn't know when to drop the set-gid
1249   privileges).  If you're using "mailgroup", you should remove slocal
1250   (and its man page) from your system.
1251
1252   Alternatives to slocal include deliver, procmail, and mailagent.
1253   (See "What mail filters are available?")
1254
1255 ------------------------------
1256   
1257 Subject: 02.07 How can I build MH on Solaris 2?
1258 From: Richard Coleman <coleman at math.gatech.edu>
1259 Date: Tue, 20 Jan 1998 02:19:58 -0500
1260   
1261   nmh builds out of the box on Solaris.
1262
1263 From: Bill Wohler <wohler at newt.com>
1264 Date: Sun, 8 Sep 1996 15:56:31 -0700
1265
1266   See http://www.gw.com/mail/mh/patches/solaris/ for patches you may need.
1267
1268 From: Neil Rickert <rickert at cs.niu.edu>,
1269         Scott K. Hutton <shutton at habanero.ucs.indiana.edu>,
1270         Casper H.S. Dik <casper at fwi.uva.nl>
1271 Date: Sun, 8 Sep 1996 15:57:25 -0700
1272
1273   First, don't use the BSD compatible stuff.  Make sure that the Sun
1274   or GNU compiler appear before the BSD compiler in your PATH (e.g.,
1275   /usr/ccs/bin).
1276
1277   Second, don't use GNU make.  Make sure that the Sun make appears
1278   before the GNU make in your PATH.
1279
1280   Use conf/examples/solaris2.sun.com and fix the paths, if necessary.
1281   Optionally change the following to use the GNU compiler, to perform
1282   optimization, and to create shared libraries.
1283
1284     cc              gcc
1285     ccoptions       -O -g -msupersparc
1286     slflags         -shared
1287
1288   Fix mhn.c with the diff in
1289
1290     http://www.gw.com/mail/mh/patches/solaris/si_value_2.3.
1291
1292   Optionally incorporate the Content-Length header fix.  (See "How can
1293   I get MH to interpret the Content-Length field?")
1294
1295   Linking with /usr/ucblib/libucb.so is incompatible with including
1296   <dirent.h>.
1297
1298   When compiling, you can ignore the following warning:
1299
1300     fmtcompile.c", line 238: warning: semantics of "/" change in ANSI C;
1301     use explicit cast
1302
1303   If you're using AFS, you'll have to replace any occurrence of "ln"
1304   with "ln -s" wherever the make dies when it tries to make a link
1305   "on a different file system."
1306
1307   See also ftp://ftp.fwi.uva.nl/pub/solaris/solaris2.faq.
1308
1309 Date: Thu, 1 Dec 1994 00:00:00 -0800
1310
1311   Unset LD_LIBRARY_PATH.
1312
1313 From: Gary Strand <strandwg at ncar.ucar.edu>
1314 Date: Mon, 1 May 1995 00:00:00 -0800
1315
1316   To cure slocal's Segmentation Fault problems, I decided to try 'cc'
1317   instead of 'gcc' (an alleged no-no under Solaris) and MH built just
1318   fine, and it's working perfectly.
1319
1320 From: "Jason R. Mastaler" <jason at Mastaler.COM>
1321 Date: Mon, 25 Sep 1995 17:35:13 -0400
1322
1323   Don't use "ldoptions -s" with gcc.  It may cause the compile to fail
1324   with:
1325
1326     gcc: Internal compiler error: program ld got fatal signal 11
1327     *** Error code 1
1328
1329 From: "Jeffrey T. Eaton" <jeaton at galt.com>
1330 Date: Fri, 04 Apr 1997 15:30:36 GMT
1331
1332   Fixed [DBM_PAGFNO_NOT_AVAILABLE error] by getting the latest gdbm
1333   package, compiling and installing it and the dbm/ndbm compatability
1334   stuff, and moving Sun's broken ndbm.h out of /usr/include.
1335
1336   To fix "../sbr/libmh.so: undefined reference to
1337   `__builtin_va_arg_incr'", add "option __BUILTIN_VA_ARG_INCR" to your
1338   MH configuration.
1339
1340 ------------------------------
1341   
1342 Subject: 02.08 How can I build MH on Linux?
1343 From: Richard Coleman <coleman at math.gatech.edu>
1344 Date: Tue, 20 Jan 1998 02:19:58 -0500
1345
1346   nmh should build out of the box for most Linux systems.
1347
1348 From: Bill Wohler <wohler at newt.com>
1349 Date: Tue, 9 Feb 1999 23:04:53 -0800
1350
1351   The Debian distribution of Linux comes with an MH and nmh packages.  See
1352
1353     http://www.debian.org/.
1354
1355   See also http://www.gw.com/mail/mh/patches/linux/.
1356
1357 From: "James A. Robinson" <jimr at simons-rock.edu>
1358 Date: 17 Apr 96 20:39:02 GMT
1359
1360   Somebody on Debian ported it to Linux ELF.  Look on
1361   ftp://ftp.debian.org/debian/stable/binary/mail/mh_6.8.4-13.deb for
1362   the .deb package of MH (it's a compressed tar file).  The source is
1363   in ftp://ftp.debian.org/debian/stable/source/mail/mh_6.8.4-orig.tar.gz
1364   and mh_6.8.4-13.diff.gz.
1365
1366 From: Brian Kirouac <bri at psa.pencom.com>
1367 Date: 18 Apr 96 14:00:20 GMT
1368
1369   If you are running Redhat and have rpm available you can also use
1370   ftp://???/pub/redhat-3.0.3/i386/RedHat/RPMS/mh-6.8.3-5.i386.rpm.
1371   The source code is in
1372   ftp://???/pub/redhat-3.0.3/i386/SRPMS/mh-6.8.3-5.i386.rpm
1373
1374 From: "Brandon S. Allbery" <bsa at kf8nh.wariat.org>
1375 Date: Sun, 26 Nov 1995 16:18:50 -0800
1376
1377   The current patch is the first one listed below.  The old patch only
1378   works with libc-4.4, which is no longer used.  The current patch is
1379   split into two pieces, as with the previous patch, but now the
1380   divisions are purely functional: the first diff enables MH to
1381   compile, the second allows creation of a shared library. [Ed: The
1382   paths are up to date, but I think the info in this paragraph is
1383   old.]
1384
1385   Recent versions of GNU make choke on MH's makefiles.  Unfortunately,
1386   the shared library patches depend on "export".  If you have problems
1387   building MH, remove the "export" lines from all of the makefiles (if
1388   you applied the shared library patches) and try using BSD pmake
1389   instead.
1390
1391   If you don't want to compile MH, the second file contains
1392   pre-compiled ready-to-run binaries which can simply be extracted in
1393   the root directory.
1394
1395     ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-diffs.tar.gz
1396     ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-bin.tar.gz
1397
1398   The sizes are 650k and 22k respectively.
1399
1400   Note that these files are occasionally "cleaned up" by accident so
1401   please let me know if they are missing.
1402
1403 ------------------------------
1404   
1405 Subject: 02.09 How can I build MH on IRIX?
1406 From: Richard Coleman <coleman at math.gatech.edu>
1407 Date: Tue, 20 Jan 1998 02:19:58 -0500
1408
1409   nmh should build out of the box for Irix.
1410
1411 From: Bill Wohler <wohler at newt.com>
1412 Date: Sun, 8 Sep 1996 15:33:22 -0700
1413
1414   See http://www.gw.com/mail/mh/patches/sgi/ for patches you may need.
1415
1416 From: Arne K. Frick <frick at info.uni-karlsruhe.de>
1417 Date: 06 Jun 1995 18:30:01 GMT
1418
1419   There is a file at viz.tamu.edu:/pub/sgi (see FAQ) containing a diff
1420   and sample configuration.  If you cannot locate it, I can mail it to
1421   you.  Note, however, that I had tremendous difficulties with them
1422   under 5.3:
1423
1424   1. Be sure to use /bin/make, NOT GNU make.
1425   2. patch vomits over the diff.  You can get around this by increasing the
1426      "fuzz factor" to 4.
1427   3. The Makefile target for the shared library doesn't work.  I had to do it
1428      by hand.
1429
1430   But I'm stuck compiling mhn.c.
1431
1432 From: Shankar Unni <shankar at sgi.com>
1433 Date: 9 Jun 1995 01:53:48 GMT
1434
1435   The fix for compiling mhn.c is in
1436
1437     http://www.gw.com/mail/mh/patches/solaris/si_value_2.3.
1438
1439 From: Jack Repenning <jackr at informix.com>
1440 Date: 25 Jul 1995 02:35:41 GMT
1441
1442   (See "IRIX config file") below.
1443
1444 ------------------------------
1445   
1446 Subject: 02.10 How can I get MH to interpret the Content-Length field?
1447 From: Casper H.S. Dik <Casper.Dik at Holland.Sun.COM>
1448 Date: Sun, 8 Sep 1996 15:38:30 -0700
1449
1450   Apply http://www.gw.com/mail/mh/patches/solaris/content_length to
1451   your MH distribution and add the configuration option
1452   "CONTENT_LENGTH".  It also includes the si_ fix in
1453
1454     http://www.gw.com/mail/mh/patches/solaris/si_value_2.3
1455
1456 ------------------------------
1457   
1458 Subject: 02.11 How can I build MH on HP-UX?
1459 From: Bill Wohler <wohler at newt.com>
1460 Date: Sun, 8 Sep 1996 15:50:54 -0700
1461
1462   If you find that your zotnet/tws directory isn't compiling, upgrade
1463   your MH (see "What is the current version/status of MH?") which
1464   includes fixes to lexedit.sed.
1465
1466   See http://www.gw.com/mail/mh/patches/hp/ for for patches you may need.
1467
1468 ------------------------------
1469   
1470 Subject: 02.12 Can I prevent adding the local hostname to addresses behind firewalls?
1471
1472 From: Ted Remillard <tedr at hood.sd.com>
1473 Date: 24 Jun 1996 08:53:42 -0700
1474
1475   You can get MH to stop managing the headers and let the email server
1476   to do it. To do this, build MH with the options DUMB and REALLYDUMB.
1477   In the $MHLIB/mts.conf (mtstailor) file, set the server option to
1478   the IP address of the email server. After this is done, MH sends
1479   email directly to the email server and Local email To: and From:
1480   fields just have the user's simple email address, e.g., <fred>, and
1481   the remote email From: header will contain user@domainname, e.g.,
1482   <fred@sd.com>.
1483
1484   Don't forget to define the REALLYDUMB option in the file
1485   sbr/addrsbr.c described below.
1486
1487 From: Bret Rothenberg <bretr at endeavour.exar.com>
1488 Date: Tue, 23 Jan 1996 12:25:24 -0800 (PST)
1489
1490   Yes, use the "localname" parameter in "$MHLIB/mts.conf" (mtstailor)
1491   to specify the desired hostname.
1492
1493 From: Ken Hornstein <kenh at cmf.nrl.navy.mil>
1494 Date: 18 Aug 1995 23:51:48 -0400
1495
1496   If you're behind a firewall and sendmail gives you fits because MH
1497   adds the node name or site name to each address in the To: and CC:
1498   fields, you'll need to modify the MH source.
1499
1500   The relevant source has to do with the REALLYDUMB option in
1501   sbr/addrsbr.c.  Essentially what you need to do is set it up so
1502   REALLYDUMB is turned on (normally, it's turned off if you have MMDF
1503   or SMTP turned on).  This will do what you want.  I did this at our
1504   site, and it's been working great.  The stuff for REALLYDUMB starts
1505   around line 613.
1506
1507 ------------------------------
1508   
1509 Subject: 02.13 Is there a patch to fix this or that?
1510 From: Kimmo Suominen <kim at tac.nyc.ny.us>
1511 Date: Sat, 3 Mar 2001 13:40:35 -0800
1512
1513   The MH Patch Archive has been opened at
1514
1515     http://www.gw.com/mail/mh/patches/
1516     ftp://ftp.gw.com/mail/mh/patches/
1517
1518   It is a collection of patches to MH (the RAND MH Message Handling
1519   System), a set of electronic mail programs in the public domain.
1520   Since the last complete release of MH (version 6.8.3) UNIX systems
1521   have evolved making changes in the MH code necessary.  Several new
1522   UNIX systems have emerged requiring new configuration templates and
1523   examples.  This archive tries to collect all these fixes and
1524   enhancements that in the past have been available only through
1525   word-of-mouth and occasional reposts to newsgroups or mailing lists.
1526
1527   The initial archive layout and the very time consuming collecting
1528   and categorizing of patches has been done by Jerry Peek.
1529
1530   I will be the primary maintainer of the archive. Even though I will
1531   be monitoring several sources for new material (mainly the
1532   comp.mail.mh newsgroup but also the mailing lists
1533   <mh-workers at ics.uci.edu>, <mh-e-users at lists.sourceforge.net> and
1534   <exmh-workers at redhat.com>), I'd like to encourage everyone to submit
1535   patches also directly to the archive at <mh-archive at gw.com>.
1536
1537 ------------------------------
1538   
1539 Subject: 02.14 How can I build MH on OS/2?
1540 From: Sanjay Aiyagari <sanjay at sandbox.snetnsa.com>
1541 Date: 21 Nov 1996 19:37:10 GMT
1542
1543     ftp://ftp.jaist.ac.jp/pub/os/os2/network/MH/
1544
1545 ------------------------------
1546   
1547 Subject: 02.15 Do any POP/IMAP servers handle MH format?
1548 From: "Carl S. Gutekunst" <csg at eng.sun.com>
1549 Date: 27 May 1997 07:24:34 GMT
1550
1551   The University of Washington POP3 and IMAP servers can be backended
1552   by a variety of stores, including MH.  This is the basis for
1553   Netscape's store, curiously enough. I haven't looked closely at how
1554   Mark Crispin implemented support for the new IMAP4 features when
1555   using an MH backend; it seems like there is a lot of computation
1556   when opening a folder for the first time, writing in the UID fields
1557   and such.  But it basically appears to work.
1558
1559 From: Lyndon Nerenberg <lyndon at MessagingDirect.COM>
1560 Date: 27 Jul 1999 11:36:25 -0600
1561
1562   But [the UW IMAP server] can't delete/expunge from MH folders. (At
1563   least I've never been able to get it to work, and I've tried just
1564   about everything.) #mh in UW imapd isn't something I'd recommend to
1565   any serious MH user.
1566
1567 From: Mark Crispin <mrc at CAC.Washington.EDU>
1568 Date: Tue, 27 Jul 1999 14:43:25 -0700
1569
1570   > But it can't delete/expunge from MH folders.
1571
1572   That's a very old version. delete/expunge has been in imap-4.x for a
1573   long while. However, there's no sticky flags.
1574
1575   > #mh in UW imapd isn't something I'd recommend to any serious MH user.
1576
1577   The converse is also true. The two don't play ball very well.
1578
1579 From: Dieter Weber <dieter at Compatible.COM>
1580 Date: 11 Feb 2003 04:23:38 -0800
1581
1582   The UW imap server supports MH folders. In order to see the MH
1583   mailboxes, you need to "subscribe" to the folders or add them to the
1584   .mailboxlist file in your home directory.
1585
1586 ------------------------------
1587   
1588 Subject: 02.16 How can I build MH on Windows?
1589 From: Satyaki Das <satyaki at theforce.stanford.edu>
1590 Date: Wed, 19 Jun 2002 20:57:19 -0700
1591
1592   I have gotten MH-E to work on Windows (under Cygwin) using Earl
1593   Hood's patched nmh. It was really quite simple, but not very
1594   portable. I just needed to add/subtract "c:/cygwin" from a couple of
1595   places. Now it can read and send mail (even does PGP attachments).
1596   Thought this might be of interest to those of you stuck using
1597   Windows at work.
1598
1599 From: Earl Hood <ehood at earlhood.com>
1600 Date: Sat, 08 Jun 2002 20:30:44 GMT
1601
1602   I've made a tar/bz2 bundle available at
1603
1604     <http://www.nacs.uci.edu/indiv/ehood/tmp/nmh-1.0.4-ehood-cygwin.tar.bz2>
1605
1606   This includes the patched source with binaries pre-built.
1607
1608   I just remembered that I also had to hack the makefiles to get
1609   things to install since windoze executables have to end with .exe. I
1610   hacked the generated makefiles, so if you rerun configure, you may
1611   lose the hacks. Also, I believe the install will fail when trying to
1612   install the documentation, so to force things do:
1613
1614     make -i install
1615
1616   The binaries and support files should get installed (under
1617   /usr/local/nmh), but the docs probably won't.
1618
1619   Then you will need to edit /usr/local/nmh/etc/mts.conf to reflect
1620   your local configuration.
1621
1622   If anyone has any problems installing, I could zip up my
1623   /usr/local/nmh since I think it contains everything needed for
1624   runtime usage.
1625
1626 From: Bill Goffe <goffe at oswego.edu>
1627 Date: 25 May 1999 18:13:55 GMT
1628
1629   If you have Windows, consider looking at VMware
1630
1631     http://www.vmware.com/
1632   
1633   which provides a virtual machine where you can run Unix and
1634   therefore MH under Windows.
1635
1636 From: Ted Nolan <ted at ags.ga.erg.sri.com>
1637 Date: 24 May 99 17:20:27 GMT
1638
1639   The latest Cygnus Cygwin, GNU tools that run under Windows,
1640
1641     http://www.cygwin.com/
1642  
1643   seems to work pretty well and may well be able to build nmh.
1644
1645 ------------------------------
1646   
1647 Subject: 02.17 How can I build MH on a Mac?
1648 From: Dr Eberhard W Lisse <el at lisse.na>
1649 Date: Wed, 19 Jan 2005 08:52:47 +0200
1650
1651   nmh compiles on the G4 iBook running Mac OS X 10.3.7 more or less out
1652   of the box with the powerpc HOST option. Use make all install.
1653   A fink package is available to make this even easier.
1654
1655   metamail does not work out of the box. I received a patch that did
1656   get it to run.
1657
1658   For exmh, first use fink to install the tcltk package. Then use fink
1659   to install exmh.
1660
1661 ------------------------------
1662
1663 Subject: 03.00 ***** Scanning & Reading *****
1664 From: Bill Wohler <wohler at newt.com>
1665 Date: Fri, 1 Mar 1991 13:03:15 -0800
1666
1667 ------------------------------
1668
1669 Subject: 03.01 What do I do if scan shows the wrong date?
1670 From: Bill Wohler <wohler at newt.com>
1671 Date: Fri, 1 Jan 1993 00:00:00 -0800
1672
1673   Upgrade to MH 6.8 or nmh.
1674
1675 From: Darryl Okahata <darrylo at sr.hp.com>
1676 Date: 19 Jan 2000 23:01:10 -0800
1677
1678   MH 6.8.3 and nmh 1.0 still have a minor buglet where sortm doesn't
1679   always sort messages properly. If a (questionable) mail client sends
1680   messages with 2-digit years, like:
1681
1682     Date: Sat, 23 Oct 09 22:02:01 EST
1683
1684   or sends out buggy dates like (as buggy versions of Elm do):
1685
1686     Date: Sat, 23 Oct 100 22:02:01 EST
1687
1688   then sortm will not sort these messages properly.
1689
1690   I have submitted patches to nmh-workers.
1691
1692 ------------------------------
1693   
1694 Subject: 03.02 How would one go about reading Usenet with MH?
1695 From: Bill Wohler <wohler at newt.com>
1696 Date: Sun, 26 Nov 1995 12:32:09 -0800
1697
1698   You can post via mail.  Send your article to
1699   <mail2news at news.demon.co.uk> with a legitimate Newsgroups
1700   field.
1701
1702 From: Jerry Peek <jpeek at jpeek.com>
1703 Date: Tue, 1 Nov 1994 00:00:00 -0800
1704
1705   You can save articles in the news readers for later perusal with MH.
1706
1707   First, create a symbolic link from your mail directory (e.g., usenet) to
1708   your news directory (e.g., "ln -s ~/News ~/Mail/usenet").  You can then
1709   treat your news directory as a mail folder.  Thus, to select a news
1710   group, use "folder +usenet/comp/mail/mh".
1711
1712   To set the default save location correctly in rn, use:
1713
1714     rn -M -/
1715
1716   or in your nn presentation sequence:
1717
1718     news.announce.              +$F/$N
1719     comp.mail.mh                +
1720     .
1721     .
1722
1723   If there's news spooled on your machine (that is, not via NNTP) then
1724   you can read a newsgroup with commands like:
1725
1726     show first +/usr/spool/news/comp/mail/mh
1727     next
1728     ...
1729
1730   You can also use sequences to keep track of what you've read.  MH
1731   will automatically set a "cur" sequence in each newsgroup you read
1732   that way.  So, to continue reading the newsgroup sometime later,
1733   after you've read some other folder, you can do:
1734
1735     next +/usr/spool/news/comp/mail/mh
1736
1737   and you'll read the next (new) article (if any) in that newsgroup.
1738
1739   Note that this can eventually make your private context file pretty
1740   huge; if there's a group you don't read often, you can remove its
1741   context entries with a command like:
1742
1743     rmf +/usr/spool/news/comp/mail/mh
1744
1745   Don't try that on a folder full of mail (a folder that isn't
1746   read-only), though... in that case, it'll remove all the messages!
1747
1748   I haven't looked into posting.  It seems like it shouldn't be hard.
1749   You could set up a "sendproc" that would look at outgoing email
1750   messages.  If the message had a Newsgroups: header field, your
1751   sendproc could call inews(1) instead of post(8).  I haven't seen
1752   much in the MH manpages or documentation about sendprocs (though I
1753   haven't looked for a couple of years...).  See the "mysend"
1754   script in the MH book section 7.1.4 (13.13), or the URL:
1755
1756     http://www.ics.uci.edu/~mh/book/mh/senove.htm#ASAtDm
1757
1758   A threaded news reader like trn or tin is so much nicer, though,
1759   that reading news with MH may not be worth the hassle.
1760
1761   See also MH book section 9.9 (8.7), or the URL:
1762
1763     http://www.ics.uci.edu/~mh/book/mh/shafol.htm
1764
1765 From: Stephen Gildea <gildea at stop.mail-abuse.org>
1766 Date: Fri, 1 Mar 1991 13:03:15 -0800
1767
1768   Although news readers are better, if one really wants to use
1769   MH, bbc will do the job.  For example, "bbc comp.mail.mh" reads this
1770   newsgroup.  To enable bbc, you have to specify "bboards" when you
1771   build MH.
1772
1773 From: Kimmo Suominen <kim at tac.nyc.ny.us>
1774 Date: 15 Aug 1996 18:18:10 GMT
1775
1776   Sendmail v8 comes with MAILER(pop) which was written for the MH
1777   spop.  Since I use bboards with NNTP, I never looked at the bboards
1778   setup.
1779
1780 Date: Tue, 1 Nov 1994 00:00:00 -0800
1781
1782   See mhunify in (see also "What other MH software is
1783   available?").
1784
1785 ------------------------------
1786   
1787 Subject: 03.03 How can I search through multiple folders?
1788 From: Jerry Peek <jpeek at jpeek.com>
1789 Date: Mon, 1 Mar 1993 00:00:00 -0800
1790
1791   Recurse through the folders (in csh and sh):
1792
1793   % foreach f (`folders -f`)            $ for f in `folders -f`
1794   ? pick [switches] +$f                 > pick [switches] +$f
1795   ? end                                 > done
1796
1797   Or create a folder that contains links to all messages (in csh and sh):
1798
1799     % foreach f (`folders -f | grep -v -x ln`)
1800     ? refile -src +$f -link all +ln
1801     ? end
1802
1803     $ for f in `folders -f | grep -v -x ln`
1804     > do refile -src +$f -link all +ln
1805     > done
1806
1807   and in the future, refile messages with "refile +folder +ln".  To
1808   find something, use:
1809
1810     % pick [switches] +ln
1811
1812   See MH book sections 8.2.9 (7.2.9), 8.9.3 (7.8.3), or the URLs:
1813
1814     http://www.ics.uci.edu/~mh/book/mh/finpic.htm#SeMTOnFo
1815     http://www.ics.uci.edu/~mh/book/mh/usilin.htm#AFoFuoLi
1816
1817 ------------------------------
1818   
1819 Subject: 03.04 Why don't MH format commands such as %(friendly) work?
1820 From: Anthony Baxter <anthony at aaii.oz.au>
1821 Date: Sun, 1 May 1994 00:00:00 -0800
1822
1823   The BERK option disables address parsing and therefore functions
1824   such as %(friendly).  Recompile MH without the BERK option.
1825
1826 ------------------------------
1827   
1828 Subject: 03.05 Why doesn't "show" display all of a MIME message?
1829 From: Jerry Peek <jpeek at jpeek.com>
1830 Date: Mon, 1 Aug 1994 00:00:00 -0800
1831
1832   It's not the fault of the "show" command or of MH in general. It's
1833   your system's configuration. Check the $MHLIB/mhn.defaults
1834   (mhn_defaults) file; if it doesn't have defaults for all content
1835   types, add them. Or, if you can't (or shouldn't) change mhn.defaults
1836   (mhn_defaults), you can put default entries in your MH profile file
1837   for those content types.
1838
1839   Here's the part of the mhshow(1) (mhn(1)) manpage that explains how
1840   content types are handled. The example is for mhshow, but if you're
1841   using mhn, you'd replace mhshow with mhn:
1842
1843     First, mhshow will look for an entry of the form:
1844
1845       mhshow-show-<type>/<subtype>
1846
1847     to determine the command to use to display the content.  If this
1848     isn't found, mhshow will look for an entry of the form:
1849
1850       mhshow-show-<type>
1851
1852     to determine the display command.  If this isn't found, mhshow has
1853     two default values:
1854
1855       mhshow-show-text/plain: %pmoreproc '%F'
1856       mhshow-show-message/rfc822: %pshow -file '%F'
1857
1858     If neither apply, mhshow will check to see if the message has a
1859     application/octet-stream content with parameter "type=tar". If so,
1860     mhshow will use an appropriate command. If not, mhshow will
1861     complain.
1862
1863   So, add defaults that cover the types MH doesn't handle right now
1864   (or doesn't handle the way you want it to). Your defaults will
1865   override corresponding defaults in the $MHLIB/mhn.defaults
1866   (mhn_defaults) file. For example, if you don't have an HTML
1867   editor/browser on your system, you could tell MH to use the "less"
1868   paginator for HTML message parts:
1869
1870     mhshow-show-text/x-html: less %F
1871
1872   You can put that line in your MH profile.
1873
1874   You can even set different defaults for different terminal types
1875   (say, your VT100 at home and your X setup at work). Make a file in
1876   the same format as mhn.defaults (mhn_defaults); store its pathname
1877   in the MHSHOW (MHN) environment variable. Add a test to your shell
1878   setup file (.bash_profile, .profile, .login) that tests the value of
1879   the TERM variable -- and, if you have an mhshow (mhn) setup file for
1880   that terminal type, store its pathname in the MHSHOW (MHN) variable.
1881
1882   See also MH book sections 6.2.3, 9.4.4, 9.4.5, or the URLs:
1883
1884     http://www.ics.uci.edu/~mh/book/mh/remime.htm#HomhShMe
1885     http://www.ics.uci.edu/~mh/book/mh/confmhn.htm#ShComhsh
1886     http://www.ics.uci.edu/~mh/book/mh/confmhn.htm#DiOChSmc
1887
1888 From: Michael K. Neylon <mneylon at engin.umich.edu>
1889 Date: Tue, 1 Nov 1994 00:00:00 -0800
1890
1891   If you are not using the X Window System, you may have to add this
1892   line to your MH profile:
1893
1894     mhshow-charset-iso-8859-1: /bin/sh -c '%s'                  # nmh
1895     mhn-charset-iso-8859-1: /bin/sh -c '%s'                     # MH
1896
1897 ------------------------------
1898   
1899 Subject: 03.06 Can I get show not to run "less" so much on MIME messages?
1900 From: Richard Coleman <coleman at math.gatech.edu>
1901 Date: Tue, 20 Jan 1998 02:19:58 -0500
1902
1903   On nmh, you can do this just by "show -nocheckmime".  This will disable
1904   the detection of MIME messages.
1905
1906 From: Bill Wohler <wohler at newt.com>
1907 Date: Tue, 1 Nov 1994 00:00:00 -0800
1908
1909   If you say, "show all," and one of the messages was a MIME message,
1910   your pager will be run several times on each message, rather than
1911   once on all the messages as a whole.  If you find this annoying, set
1912   the environment variable NOMHNPROC:
1913
1914     % setenv NOMHNPROC ""                       # csh
1915     $ NOMHNPROC=                                # sh and bash
1916     $ export NOMHNPROC
1917
1918   See also MH book sections 6.2.3, 6.2.10, or the URLs:
1919
1920     http://www.ics.uci.edu/~mh/book/mh/remime.htm#HomhShMe
1921     http://www.ics.uci.edu/~mh/book/mh/remime.htm#Alttomhn
1922
1923 ------------------------------
1924   
1925 Subject: 03.07 Why do I get "mhn: don't know how to display content"?
1926 From: Richard Coleman <coleman at math.gatech.edu>
1927 Date: Tue, 20 Jan 1998 02:19:58 -0500
1928
1929   This has already been fixed in nmh.
1930
1931 From: Keith Moore <moore at cs.utk.edu>
1932 Date: Sun, 8 Sep 1996 15:49:50 -0700
1933
1934   MH 6.8.3 has a bug where it will not handle multipart/foo correctly
1935   if it doesn't know about foo. The patch:
1936
1937     http://www.gw.com/mail/mh/patches/all/mhn_multipart
1938  
1939   tells it to treat such things as if they were multipart/mixed.
1940
1941   (See also "Why doesn't "show" display all of a MIME message?").
1942
1943 ------------------------------
1944   
1945 Subject: 03.08 How can I automatically delete MH backup files?
1946 From: mccammaa at expt05.stp.xfi.bp.com (Andy McCammont)
1947 Date: 22 May 1995 06:27:36 -0400
1948
1949   On System V system, add this to your crontab.  If you don't have
1950   one, put this in a file, and run "crontab file".  If your system
1951   does not support personal crontab files, get your system
1952   administrator to add an equivalent line to the system crontab file
1953   or daily clean-up script.  Note that some administrators set the
1954   prefix character to '#'.
1955
1956     # Remove old MH files
1957     5 5 * * * find /PATH/TO/HOME/Mail -name ",*" -mtime +5 -exec rm {} \;
1958
1959 ------------------------------
1960   
1961 Subject: 03.09 Fixing "cannot fopen and lock /var/spool/mail/(user)"
1962 From: Patrick.Wambacq at esat.kuleuven.ac.be
1963 Date: Mon, 30 Sep 96 15:00:16 +0200
1964
1965   One should put the following lines in the $MHLIB/mts.conf
1966   (mtstailor) file:
1967
1968     lockldir:
1969     lockstyle: 1
1970
1971   This prevents MH from using kernel level locking, and uses lock
1972   files instead.  It solved the problem for me on two different
1973   architectures.  When the lockldir entry is left empty as above, the
1974   lock file is put in the same directory as the file to be locked. If
1975   another directory is wanted, its name should be put here.
1976
1977 From: alhy at MAILBOX.SLAC.Stanford.EDU
1978 Date: Mon, 9 Sep 1996 01:01:16 -0700
1979
1980   Often, this is caused by an NFS file lock.  Don't ask me how it got
1981   there in the first place.  To remove the file lock, do the following:
1982
1983     # cd /var/spool/mail
1984     # cp user /tmp/user.tmp; rm user    # save mail; remove locked file
1985     # chown user /tmp/user.tmp          # allow user to inc old mail
1986     # su - user
1987     user% inc -file user.tmp            # incorporate user's old mail
1988
1989   Any mail that you receive in the fraction of a second that the second
1990   set of commands takes will be lost.
1991
1992   (See also "Why does inc hang (on Sun)?")
1993
1994 ------------------------------
1995   
1996 Subject: 03.10 Can I read my mail with a Web browser?
1997 From: Jerry Heyman <jerry@fourwinds.cx>
1998 Date: Sat, 09 Oct 2004 12:41:03 -0400
1999
2000   See http://www.squirrelmail.org/
2001
2002     SquirrelMail is a standards-based webmail package written in PHP4.
2003     It includes built-in pure PHP support for the IMAP and SMTP
2004     protocols, and all pages render in pure HTML 4.0 (with no
2005     JavaScript required) for maximum compatibility across browsers. It
2006     has very few requirements and is very easy to configure and
2007     install. SquirrelMail has all the functionality you would want
2008     from an email client, including strong MIME support, address
2009     books, and folder manipulation.
2010
2011   No MH support.  Unless you're willing to write it...
2012
2013 From: J C Lawrence <claw at kanga.nu>
2014 Date: Wed, 10 Dec 2003 09:54:15 -0500
2015
2016   UW-imap can read MH folders although it doesn't maintain sequence
2017   files properly. Drop any of the IMAP web front ends in front of
2018   that.
2019
2020 From: aeriksson at fastmail.fm
2021 Date: Wed, 10 Dec 2003 22:36:52 +0100
2022
2023   Have a peek at http://wmh.sf.net/. It's been a while since I worked
2024   on it, but it does give me what I need.
2025
2026 Date: Mon, 05 Oct 1998 11:02:52 -0500
2027 From: Kent Landfield <kent at nfr.net>
2028
2029   Hypermail now supports MIME and alternate mailbox formats and sorts
2030   by author, date, and thread and can be read by a WWW reader.
2031
2032     http://www.landfield.com/hypermail/
2033
2034 From: "Patrick A. Coronato" <coronato at me216.teb.allied.com>
2035 Date: 8 Sep 1995 16:36:03 GMT
2036
2037   MHonArc, by Earl Hood from Convex, will read MH mailboxes as well as
2038   Unix mailboxes, create HTML "archives" and will also sort by date,
2039   thread and author and has support for MIME. Also, MHonArc is written
2040   in the Perl language. (You should go to this site if nothing more
2041   than to see the cool logo!)
2042
2043     http://www.mhonarc.org/
2044
2045 ------------------------------
2046   
2047 Subject: 03.11 How can I run inc automatically with POP?
2048 From: Bill Wohler <wohler at newt.com>
2049 Date: Mon, 27 Nov 1995 12:23:51 -0800
2050
2051   If MH has been compiled with RPOP, then the POP server host either
2052   needs to have your host in /etc/hosts.equiv or in your .rhosts file.
2053   Then add to your MH profile:
2054
2055     inc: -host cuckoo
2056
2057   given that "cuckoo" is the name of the your POP server.
2058
2059 From: Andy Norman <ange at hplb.hpl.hp.com>
2060 Date: Mon, 1 May 1995 00:00:00 -0800
2061
2062   Assuming your POP server is called cuckoo, add an entry to your MH
2063   profile for 'inc' like so:
2064
2065     inc: -noaudit -norpop -noapop -host cuckoo
2066
2067   Add the following to ~/.netrc and ensure it is readable only by you
2068   (e.g., chmod 600 .netrc):
2069
2070     machine cuckoo.domain.name login joeuser password secret
2071
2072   Replace the hostname, login and password with your own, of course.
2073   The hostname probably has to be fully qualified (i.e., include the
2074   full domain name).  This example assumes that you can send mail by
2075   other means (e.g., with SMTP).
2076
2077 ------------------------------
2078   
2079 Subject: 03.12 Why does inc hang (on Sun)?
2080 From: ericding at mit.edu (Eric J. Ding)
2081 Date: 30 Apr 1996 00:22:01 -0400
2082
2083   This may be due to a non-robust implementation of lockf() over NFS.
2084   Try setting lockstyle to 1 in the $MHLIB/mts.conf (mtstailor) file
2085   so that MH uses dotfile locking rather than FLOCK or LOCKF.
2086
2087 ------------------------------
2088   
2089 Subject: 03.13 How can I get POP to work?
2090 From: Jonathan George <jmg at hpopd.pwd.hp.com>
2091 Date: Tue, 23 Apr 1996 10:23:16 GMT
2092
2093   If you get the error:
2094
2095     inc: -ERR Unknown command: "rpop"
2096
2097   you're trying to use "rpop" as the mechanism to authenticate the
2098   user. This mechanism is specified in RFC 1225 and then removed by
2099   RFC 1460.
2100
2101   Your POP server is (rightly) rejecting this.
2102
2103   The POP specification (RFC 1939) states that authentication is done
2104   either via a USER/PASS pair or via the APOP command.
2105
2106   Try running inc with -noapop -norpop flags.
2107
2108 ------------------------------
2109   
2110 Subject: 03.14 How do I persuade mhshow (mhn) not to bring up a new window?
2111 From: Joel Reicher <joel at panacea.null.org>
2112 Date: Tue, 13 Nov 2001 16:49:04 +1100
2113
2114   I personally think [the solution below] is not the right solution.
2115   There's a reason that new window is opened--to ensure the correct
2116   characters are available. The "right" solution is surely to set the
2117   MM_CHARSET env var to iso-8859-1 and make the appropriate
2118   adjustments to the pager (in the case of less, setting
2119   LESSCHARSET=latin1).
2120
2121 From: Larry Daffner <ldaffner at convex.com>
2122 Date: 27 Mar 1996 16:53:39 -0600
2123
2124   Add one of the following to your .mh_profile:
2125
2126      mhshow-charset-iso-8859-1: %s                              # nmh
2127      mhn-charset-iso-8859-1: %s                                 # MH
2128
2129 ------------------------------
2130   
2131 Subject: 03.15 How do I turn off of all the mhshow (mhn) prompts?
2132 From: Bill Wohler <wohler at newt.com>
2133 Date: Sun, 11 Mar 2001 11:33:10 -0800
2134
2135   In nmh, use mhshow -nopause.
2136   
2137 From: Larry Daffner <ldaffner at convex.com>
2138 Date: 27 Mar 1996 16:53:39 -0600
2139
2140   The "part xxx" message is controlled by the -list switch to mhn so
2141   add "mhn: -nolist" to your .mh_profile.  To remove the pause, add an
2142   entry for "mhn-show-text/plain: more '%F'" to override the default
2143   which includes the "%p" escape.  All of this is covered in the mhn
2144   man page (sort of--you need to add 2+2).  It's a bit long, but well
2145   worth reading.
2146
2147 ------------------------------
2148   
2149 Subject: 03.16 Why is inc splitting messages improperly?
2150 From:    Mayank Choudhary <micky at eng.sun.com>
2151 Date:    Mon, 29 Apr 1996 09:39:29 -0700
2152
2153   MH considers "From " lines as message separators, so if this string
2154   is found within the body, inc splits the message.
2155
2156   Add the following line to your .forward
2157   
2158     "|/usr/bin/mailcompat <user-name>"
2159   
2160   where user-name is your login-id.
2161
2162   See mailcompat(1) for more information.
2163
2164 ------------------------------
2165   
2166 Subject: 03.17 Can MH thread messages?
2167 From: "John W. Coomes" <jcoomes at delirius.cs.uiuc.edu>
2168 Date: 30 Apr 1997 13:02:10 -0500
2169
2170   Sort of.  You can resort your folders by Subject with:
2171
2172     sortm -textfield subject
2173
2174 ------------------------------
2175   
2176 Subject: 03.18 How can I avoid reading the HTML version of the message?
2177 From: Bill Wohler <wohler at gbr.newt.com>
2178 Date: 23 Jun 2000 10:19:34 -0700
2179
2180   You might find that you have two versions of the same message within
2181   the message. For example, one part might have a content type of
2182   text/plain and the other might be text/html.
2183
2184   You may find that mhshow (mhn -show) wants to show the HTML version
2185   This is a feature of the multipart/alternative content type. If you
2186   prefer reading the the plain text version over the HTML version,
2187   you'd have to remove the line in $MHLIB/mhn.defaults or
2188   ~/.mh_profile that starts with mhshow-show-text/html
2189   (mhn-show-text/html). Of course, the tradeoff is that you'd never be
2190   able to view text/html at all, but you probably wouldn't care.
2191
2192 ------------------------------
2193   
2194 Subject: 03.19 How do I view or save attachments?
2195 From: Bill Wohler <wohler at gbr.newt.com>
2196 Date: Mon, 5 Mar 2001 09:12:15 -0800
2197
2198   Use mhshow (mhn -show) and mhstore (mhn -store) respectively. See
2199   the man pages for more details.
2200
2201 ------------------------------
2202   
2203 Subject: 03.20 How do I view HTML attachments with Netscape?
2204 From: Bill Wohler <wohler at gbr.newt.com>
2205 Date: Mon, 5 Mar 2001 09:58:05 -0800
2206
2207   Add one of the following to ~/.mh_profile:
2208
2209     mhshow-show-text/html: %lnetscape -remote 'openURL(file:%f, new-window)'
2210     mhn-show-text/html: %lnetscape -remote 'openURL(file:%f, new-window)'
2211
2212   The % escapes are described in the mhshow (mhn) man page. The
2213   ", new-window" argument in the netscape invocation is optional, but
2214   handy. After reading the message, you can dismiss the window with
2215   M-w and go back to reading mail.
2216
2217 ------------------------------
2218   
2219 Subject: 03.21 Fixing folders: unable to allocate storage for msgstats
2220 From: Pete Phillips <pete at smtl.co.uk>
2221 Date: 30 Jan 2003 03:33:57 -0800
2222
2223   I found the following in my context file:
2224
2225     atr-cur-/tmp: 1
2226     atr-pseq-/tmp: 1
2227
2228   For some reason folders doesn't like this. Whether it's because of
2229   permission problems or just the size of my tmp directory (about 3/4
2230   of a GB) I don't know, but removing these lines from my context file
2231   fixed the problem.
2232
2233 ------------------------------
2234   
2235 Subject: 03.22 How do I recursively list message attachments?
2236 From: Joel Reicher <joel at panacea.null.org>
2237 Date: 31 Oct 2001 00:36:14 +1100
2238
2239   I haven't quite managed a recursive listing, but I have worked out a
2240   recursive store, which is still useful. Hinted by a builtin display
2241   string for mhshow, I found the following works for mhstore:
2242
2243     mhstore-store-message/rfc822: | mhstore -file -
2244
2245   With that, mhstore will happily recurse down storing everything on its
2246   way. Not very discriminate, but the line can be altered to limit
2247   without destroying the recursion:
2248
2249     mhstore-store-message/rfc822: | mhstore -auto -type message/rfc822 -type image/jpeg -file -
2250
2251   which also names the files automatically for good measure.
2252
2253   And, FWIW, I engage this by putting it in a separate file and invoking
2254   mhstore like
2255
2256     env MHSTORE=mhn.rec mhstore
2257
2258 ------------------------------
2259   
2260 Subject: +03.23 Why do folder and flist overlook some of my sub-folders?
2261 From: Richard Coleman <coleman at math.gatech.edu>
2262 Date: Mon, 10 Oct 2005 18:14:24 -0700
2263
2264   There was a bug in these commands which caused them to quit
2265   searching a folder for sub-folders too early if the folder contained
2266   sub-folders which were symbolic links. This has been improved in
2267   nmh-0.25, but folder and flist will still not recurse into folders
2268   that contain only symbolic links.
2269
2270 ------------------------------
2271
2272 Subject: 04.00 ***** Filing *****
2273 From: Bill Wohler <wohler at newt.com>
2274 Date: Fri, 1 Mar 1991 13:03:15 -0800
2275
2276 ------------------------------
2277
2278 Subject: 04.01 Can I append MH messages to a Unix mailbox format file?
2279 From: Richard Coleman <coleman at math.gatech.edu>
2280 Date: Tue, 20 Jan 1998 02:19:58 -0500
2281
2282   In nmh, use packf instead.
2283
2284 From: Bill Wohler <wohler at newt.com>
2285 Date: Fri, 1 Jan 1993 00:00:00 -0800
2286
2287   Yes, see $MHLIB/packmbox.
2288
2289 ------------------------------
2290   
2291 Subject: 04.02 Can I append MH messages to a GNU Emacs rmail BABYL-format file?
2292 From: Bill Wohler <wohler at newt.com>
2293 Date: Fri, 1 Mar 1991 13:03:15 -0800
2294
2295   To convert your MH folders to BABYL folders, first run the following script
2296   on your Mail directory.
2297
2298     #!/bin/sh
2299
2300     for f in Mail/*; do
2301         if [ -d $f ]; then
2302             touch msgbox
2303             folder=`basename $f`
2304             echo -n packing $folder ...
2305             packf +$folder
2306             echo done
2307             mv msgbox Mail-rmail/$folder
2308         fi
2309     done
2310
2311   This assumes you don't have nested folders.  Your rmail folders will be
2312   left in $HOME/Mail-rmail in MMDF format which rmail can read.  Then run
2313   rmail-input for each folder, which converts each folder into BABYL format.
2314
2315   Be sure not to append any messages before they are converted from MMDF
2316   to BABYL, since there may be really strange results.
2317
2318 ------------------------------
2319   
2320 Subject: 04.03 Why do I get ".../.mh_sequences is poorly formatted?"
2321 From: Richard Coleman <coleman at math.gatech.edu>
2322 Date: Tue, 20 Jan 1998 02:19:58 -0500
2323
2324   This bug has been fixed in nmh (as of version 0.20).  There are no
2325   limitations on the length of an entry in the .mh_sequences file.
2326
2327 From: Jerry Peek <jpeek at jpeek.com>
2328 Date: Mon, 1 Aug 1994 00:00:00 -0800
2329
2330   There is a line length limit in this file.  When sequences are
2331   unbroken (without gaps in numbering), that makes short entries in
2332   the .mh_sequences file, like this:
2333
2334     inftex: 72-8000
2335
2336   But when there are lots of numbering gaps, the entry gets long:
2337
2338     inftex: 76 79-81 87 95-96 105 109 120 124 135 141 158 163...
2339
2340   That's when you run into problems, and why it's good to keep the
2341   folder packed when you can.  Simply run "folder -pack +folder".
2342
2343   If you're refiling a lot of messages in a large folder, you might
2344   not be able to use sequences.  Use backquotes to give the message
2345   numbers directly to "refile".  For example:
2346
2347     refile +tex/info-tex `pick -to info-tex`
2348
2349   That can still generate a long list of arguments to the "refile" command,
2350   and some Unixes can't handle that.  In that case, use xargs(1):
2351
2352     pick -to info-tex | xargs refile +tex/info-tex
2353
2354   If worse comes to worst, fire up a Bourne shell and use a "while" loop:
2355
2356     pick -to info-tex | fmt | while read nums; do
2357         refile +tex/info-tex $nums
2358     done
2359
2360   The fmt(1) command breaks long lines into manageable chunks of 72
2361   characters or so, splitting arguments at whitespace.  When you redirect
2362   the input of a while loop, a "read" command will read the incoming text
2363   and store it in a shell variable line by line.  This is a quick-&-dirty
2364   way to write xargs(1) if you don't have it.
2365
2366 ------------------------------
2367   
2368 Subject: 04.04 How can you save News articles into an MH folder?
2369 From: Jerry Peek <jpeek at jpeek.com>
2370 Date: Mon, 1 May 1995 00:00:00 -0800
2371
2372   If your newsreader handles backquotes on its command line, you can use
2373   the mhpath command.  For instance, if your "save" command is "s":
2374
2375     s `mhpath new +somefolder`
2376
2377   Or if your newsreader lets you define your own commands, as in shell
2378   aliases, you could define that as a command.
2379
2380   If your newsreader can pipe an article to the standard input of a
2381   program, use the "rcvstore" command (in the MH library).  For instance,
2382   if your "pipe" command is "|":
2383
2384     | $MHLIB/rcvstore +somefolder
2385
2386   Of course, you can also put that in a little shell script.
2387
2388 ------------------------------
2389   
2390 Subject: 04.05 Are there any good tools to archive MH messages?
2391 From: glimpse at cs.arizona.edu
2392 Date: Sun, 4 Mar 2001 10:26:24 -0800
2393
2394   Glimpse is a very powerful indexing and query system that allows you
2395   to search through all your files very quickly. It can be used by
2396   individuals for their personal file systems as well as by
2397   organizations for large data collections.
2398
2399     http://www.webglimpse.org/
2400
2401 From: Bill Wohler <wohler at newt.com>
2402 Date: Sun, 26 Nov 1995 17:10:59 -0800
2403
2404   For those of lesser means, I have three shell scripts for archiving,
2405   seeking, and extracting MH messages that I have been using for
2406   almost 10 years.  Send mail if interested.  Note that I intend to
2407   switch to Glimpse if I get a moment.
2408
2409 ------------------------------
2410   
2411 Subject: 04.06 How can I remove duplicate messages?
2412 From: Bill Wohler <wohler at newt.com>
2413 Date: Sun, 17 Oct 2004 13:04:57 -0700
2414
2415   Don't let them get in there in the first place. Add the following to
2416   your .promailrc:
2417
2418     :0
2419     * ? formail -D 16384 $PM_CACHE/msgid
2420     /dev/null
2421
2422   If it's too late, you might be interested in mhfinddup, attached
2423   below, which is an embellishment of the Perl script in (see
2424   "Removing dupicate messages (Perl)).
2425
2426 From: Jerry Peek <jpeek at jpeek.com>
2427 Date: 20 Nov 1995 18:51:24 GMT
2428
2429   The easiest way I know of is to sort the folder by the Message-ID
2430   field using the sortm(1) command.
2431
2432   After the sort, each message should be next to its duplicates in the
2433   folder.  Use a script (shell, Perl, etc.) to weed out the
2434   duplicates.  (See "Removing duplicate messages (Bourne)").
2435
2436   The Perl script in (see "Removing dupicate messages (Perl)) does not
2437   require that you first sort the folder.
2438
2439 ------------------------------
2440   
2441 Subject: 04.07 How can I remove holes in numbering?
2442 From: Bill Wohler <wohler at newt.com>
2443
2444   folder -pack
2445
2446 ------------------------------
2447
2448 Subject: 05.00 ***** Composing & Replying *****
2449 From: Bill Wohler <wohler at newt.com>
2450 Date: Fri, 1 Mar 1991 13:03:15 -0800
2451
2452 ------------------------------
2453
2454 Subject: 05.01 Why does repl add a "Re:" to a message that already has one?
2455 From: Larry McVoy <lm at slovax.Eng.Sun.COM>
2456 Date: Fri, 1 Mar 1991 13:03:15 -0800
2457
2458   I carefully reconfigured and rebuilt MH from scratch and the problem
2459   went away.
2460
2461 ------------------------------
2462   
2463 Subject: 05.02 How do I include messages in repl with or without ">"?
2464 From: Richard Coleman <coleman at math.gatech.edu>
2465 Date: Tue, 20 Jan 1998 02:19:58 -0500
2466
2467   In nmh, to include a message in a reply with a leading ">", just
2468   use "repl -format".
2469
2470 From: Alan Thew <qq11 at liv.ac.uk>, Mike Schwager <schwager at cs.uiuc.edu>,
2471         James T Perkins <jamesp at sp-eug.com>
2472 Date: Fri, 1 Jan 1993 00:00:00 -0800
2473
2474   When making a reply, specify a filter file on the command line:
2475
2476     repl -filter repl.format
2477
2478   This filter file must be in your MH mail directory (usually "Mail",
2479   in your home directory).  Here are a couple of example repl.format
2480   files:
2481
2482     overflowtext="",overflowoffset=0
2483     message-id:nocomponent,formatfield=\
2484     "In message %{text}, you wrote:"
2485     body:component="> ",overflowtext="> ",overflowoffset=0
2486
2487   or
2488
2489     overflowtext="",overflowoffset=0
2490     date:component="Your message dated",formatfield=\
2491     "%<(nodate{text})%{text}%|%(pretty{text})%>"
2492     body:component="> ",overflowtext="> ",overflowoffset=0
2493
2494   Setting overflowoffset to 0 keeps MH from doing anything to
2495   extra-long lines in the headers.  In the body, however, this
2496   behavior is overridden so that long lines are automatically broken
2497   and a ">" is inserted before every line.  You could put almost
2498   whatever you want between those quotes, although the "standard" ">"
2499   makes it easier to read notes that have been included several times.
2500   The examples differ with the descriptive text that is inserted
2501   before the included body.
2502
2503   It is suggested not to use the "prompter" editor in this case, since
2504   it is likely that you'll not want to use all of the included
2505   message.  Indeed, it is proper etiquette to edit out all unnecessary
2506   include verbiage so readers don't have to wade through the morass to
2507   read your pearls of wisdom.
2508
2509   WARNING: the '>' appears on the first line ONLY in versions prior
2510   to 6.7.2.  Upgrade to MH 6.8.
2511
2512   See also MH book sections 7.8.4 (6.7.4), 7.8.5 (6.7.5), 10.4.1 (9.4.1),
2513   or the URLs:
2514
2515     http://www.ics.uci.edu/~mh/book/mh/reprep-2.htm#ReaEdi
2516     http://www.ics.uci.edu/~mh/book/mh/reprep-2.htm#Inc
2517     http://www.ics.uci.edu/~mh/book/mh/verrep.htm#IncRep
2518
2519 ------------------------------
2520   
2521 Subject: 05.03 How can I eliminate duplicate copies of letters to myself?
2522 From: Bill Wohler <wohler at newt.com>
2523 Date: Fri, 1 Mar 1991 13:03:15 -0800
2524
2525   Add these two lines to your MH profile file:
2526
2527     Alternate-Mailboxes: user@host1, user@host2, ...
2528     repl: -nocc me
2529
2530   The Alternate-Mailboxes also tells scan which messages are really
2531   from you so that it can place the recipient in the scan line instead
2532   of the sender.
2533
2534 From: Jerry Peek <jpeek at jpeek.com>
2535 Date: Fri, 1 Mar 1991 13:03:15 -0800
2536
2537   To get one copy, you can either:
2538
2539   - Take out the "-nocc me"... then you'll get exactly one copy of
2540     your replies (assuming all your addresses are listed in
2541     Alternate-Mailboxes), or
2542
2543   - (See also "How can I save a copy of all messages I send?").
2544
2545     For more info, see the man pages comp(1),
2546     repl(1), forw(1), dist(1) and mh-mail(5).
2547
2548   See also MH book sections 7.8.2 (6.7.2), 9.8 (8.6), or the URLs:
2549
2550     http://www.ics.uci.edu/~mh/book/mh/reprep-2.htm#Sel
2551     http://www.ics.uci.edu/~mh/book/mh/defmai.htm
2552
2553 From: Alec Wolman <wolman at crl.dec.com>
2554 Date: Fri, 1 Mar 1991 13:03:15 -0800
2555
2556   Listing the name of a mailing list in Alternate-Mailboxes is also a
2557   convenient way to AVOID automatically cc-ing a mailing list when
2558   replying to a person who sent the message to the mailing-list.
2559
2560 From: Andre Srinivasan <asriniva at us.oracle.com>
2561 Date: Fri, 24 Jan 1997 09:33:19 -0800
2562
2563   Rather than specify the hostname as part of the mailbox, you can
2564   simply specify the username and it will match on any host:
2565
2566     Alternate-Mailboxes: asriniva
2567
2568 ------------------------------
2569   
2570 Subject: 05.04 How can I include my signature?
2571 From: Eric W. Ziegast <ziegast at uunet.uu.net>,
2572         Hardy Mayer <hardy at golem.ps.uci.edu>
2573 Date: Tue, 1 Nov 1994 00:00:00 -0800
2574
2575   There are several ways.
2576
2577   1) The MH way.
2578
2579   1a) In your Mail directory, create files that
2580       include your signature into the format of the message.
2581
2582       ~/Mail/components:
2583         To:
2584         cc:
2585         Subject:
2586         --------
2587
2588         --
2589         Eric Ziegast            ziegast at uunet.uu.net
2590         UUNET Technologies      uunet!ziegast
2591
2592       ~/Mail/replfmt
2593         body:component="> ",compwidth=2
2594         :--
2595         :Eric Ziegast           ziegast at uunet.uu.net
2596         :UUNET Technologies     uunet!ziegast
2597
2598      To use the replfmt file, add the following to your ~/.mh_profile:
2599
2600        repl: -filter replfmt
2601
2602      When comp is used, your signature is already there along with my
2603      headers.  When repl is used, the mhl program takes the body of
2604      the letter you're replying to, prepends '> ' to each line and
2605      then adds your signature at the end (available after version
2606      6.7).
2607
2608   1b) Create an "editor" which can be called from whatnow to add the
2609       signature when desired or create a frontend to post (use the
2610       .mh_profile line "postproc: postproc" to call it) that always
2611       appends the .signature file before calling post to mail the
2612       message.  David J. Fiander <david at golem.uucp>, David A.
2613       Truesdell <truesdel at nas.nasa.gov> and Tom Wilmore
2614       <sastjw at unx.sas.com> have sample scripts to do these.
2615
2616 From: Jerry Peek <jpeek at jpeek.com>
2617 Date: Tue, 1 Sep 1992 00:00:00 -0800
2618
2619   1c) mysend, a sendproc script, processes a message after
2620       "What now? send".  See "What references exist for MH" to see
2621       where the MH book scripts can be ftped from.  The script is
2622       explained in MH book Section 7.1.4 (13.13), or the URL:
2623       http://www.ics.uci.edu/~mh/book/mh/senove.htm#ASAtDm
2624
2625   2) Using your editor.  If you use vi, you can use something like:
2626
2627        map S :r ~/.signature
2628
2629      to load your signature out of .signature every time you
2630      hit 'S'.
2631
2632   3) Use your windowing system.  xterm, for example, can provide key
2633      and button mappings for the utterly lazy.
2634
2635   4) If you use Emacs with MH-E:
2636
2637   4a) C-c C-s will append the signature.
2638
2639 From: Andre Srinivasan <andre at neuronet.pitt.edu>
2640 Date: Mon, 1 May 1995 00:00:00 -0800
2641
2642   4b) Add the following to your .emacs file:
2643
2644         (add-hook 'mh-compose-letter-function
2645             (function
2646              (lambda(a b c)
2647                (save-excursion
2648                  (goto-char (point-max))
2649                  (beginning-of-line)
2650                  (mh-insert-signature)))))
2651
2652       This hook is called after the draft buffer has been initialized,
2653       but before you have a chance to type anything.
2654
2655 From: Tom Christiansen <tchrist at perl.com>
2656 Date: Tue, 1 Nov 1994 00:00:00 -0800
2657
2658   Tired of the same old signature?  Want different signatures for
2659   different newsgroups?  Here's a program to help you out.
2660
2661   The way it works is to have .signature be a named pipe, so if you
2662   don't have named pipes, just say 'n'.
2663
2664   The sigrand program then feeds stuff down the pipe every time someone
2665   wants to read it.  That way it works for more than just news, but
2666   for anything that wants to read your .signature, like a mailer.
2667
2668   You have your choice of three kinds of signatures:
2669
2670       1) random (short) fortune from "fortune -s"; you get these if
2671          you don't have a global sig file.
2672       2) random fortune from ~/News/SIGNATURES [global sig file]
2673       3) random fortune form ~/News/(newsgroup)/SIGNATURES [local sig files]
2674
2675   Send mail if interested.
2676
2677 Date: Tue, 1 Nov 1994 00:00:00 -0800
2678
2679   See also the Signature FAQ (see "What references exist for MH?").
2680
2681 ------------------------------
2682   
2683 Subject: 05.05 How do I call my editor with arguments?
2684 From: John Romine <jromine at ics.uci.edu>
2685 Date: Mon, 1 May 1995 00:00:00 -0800
2686
2687   Set your editor (in .mh_profile) to the following shellscript.
2688
2689     #/bin/sh
2690     <youreditor> <yourargs> "$@"
2691     exit 0
2692
2693 From: Ray Nickson <Ray.Nickson at comp.vuw.ac.nz>
2694 Date: Fri, 1 Mar 1991 13:03:15 -0800
2695
2696   You might find it useful to make <youreditor> $EDITOR, or to use
2697   different arguments depending on your EDITOR environment variable.
2698
2699 ------------------------------
2700   
2701 Subject: 05.06 How can I digestify messages in a folder for mail to another user?
2702 From: Jerry Peek <jpeek at jpeek.com>, Bill Wohler <wohler at newt.com>
2703 Date: Fri, 1 Mar 1991 13:03:15 -0800
2704
2705   How about:
2706
2707     forw [-digest tmp] [-form forwcomps] [-filter mhl.digest]
2708          messages +folder
2709
2710   These messages can be un-digestified :-) by the MH burst(1) program.
2711
2712   See also MH book sections 7.9.7 (6.8.7), 8.10 (7.9), or the URLs:
2713
2714     http://www.ics.uci.edu/~mh/book/mh/forfor-2.htm#CreDig
2715     http://www.ics.uci.edu/~mh/book/mh/burdig.htm
2716
2717 From: Glenn Vanderburg <glv at utdallas.edu>
2718 Date: Tue, 1 Nov 1994 00:00:00 -0800
2719
2720   There's another way, which is better if the recipient understands MIME.
2721
2722     forw -mime messages +folder
2723
2724   (Make sure that you either have "automhnproc: mhn" in your mh
2725   profile, or type "edit mhn" to whatnow before you send it.)
2726
2727   This bundles each message in a MIME message/rfc822 part, and then
2728   bundles the whole mess up in a multipart/digest part.  You can still
2729   add your own text at the beginning.  The MH burst program can also
2730   understand these messages and split them apart with no problem.
2731   This works beautifully with MIME-capable mail readers, especially
2732   exmh.
2733
2734 ------------------------------
2735   
2736 Subject: 05.07 How can I change my return address?
2737 From: Bill Wohler <wohler at newt.com>
2738 Date: Tue, 1 Dec 1992 00:00:00 -0800
2739
2740   If you find that your mailer creates a From header that others have
2741   trouble replying to, you can add a Reply-To header to override the
2742   From header in replies.
2743
2744   Copy the components and replcomps files which are normally found in
2745   $MHLIB into your Mail directory and add a line like the following
2746   after the Subject header replacing my address with your address:
2747
2748     Reply-To: jack@newt.com
2749
2750 ------------------------------
2751   
2752 Subject: 05.08 How can I change my From header?
2753 From: Bill Wohler <wohler at newt.com>
2754 Date: Mon, 27 Nov 1995 11:40:50 -0800
2755
2756   With either of the following solutions, you'll need to add an
2757   Alternate-Mailboxes entry in your MH profile so that scan prints
2758   "To: recipient" rather than your faked address.  For example, if
2759   your real address is user@somedomain.com and you've added a From
2760   field of:
2761
2762     From: Joe Bob <joe.bob@somedomain.com>
2763
2764   you'll add the following to .mh_profile:
2765
2766     Alternate-Mailboxes: joe.bob@somedomain.com
2767
2768 From: Bill Wisner <wisner at netcom.com>
2769 Date: Tue, 1 Dec 1992 00:00:00 -0800
2770
2771   If you're just interested in changing the hostname, add a line to
2772   $MHLIB/mts.conf (mtstailor):
2773
2774     localname: desired_host_name
2775
2776 From: Jerry Peek <jpeek at jpeek.com>
2777 Date: Tue, 1 Dec 1992 00:00:00 -0800
2778
2779   Just put a "From:" header in your "components", "replcomps" and
2780   "forwcomps" files.  MH will add a "Sender:" header with what it thinks
2781   is your real address.
2782
2783 ------------------------------
2784   
2785 Subject: 05.09 How can I save a copy of all messages I send?
2786 From: Ping Huang <pshuang at sgihub.corp.sgi.com>
2787 Date: Mon, 18 Dec 1995 17:51:33 -0800
2788
2789   I suggest the use of the Dcc: field (See "What is the Dcc header?"),
2790   since the use of "Dcc:" solves the issue of having the same
2791   Message-Id.  The warning about using Dcc: in general contexts
2792   doesn't apply to self-blind-carbon copies, and if "Dcc:" is used and
2793   you are automatically sorting messages into folders based on mailing
2794   lists, messages which you send will get refiled in the same way.
2795   Some may prefer all outgoing messages to be segregated; others
2796   (including myself) prefer not to segregate outgoing messages.
2797
2798 From: Bill Wohler <wohler at newt.com>, Jerry Peek <jpeek at jpeek.com>
2799 Date: Mon, 1 Aug 1994 00:00:00 -0800
2800
2801   Copy the components and replcomps files which are normally found in
2802   $MHLIB into your Mail directory and add a line like the following
2803   after the cc header:
2804
2805     Fcc: +out
2806
2807   All outgoing messages will then be saved in the +out folder.  If you
2808   make a distcomps file, it needs "Resent-Fcc:".
2809
2810 From: Jeppe Sigbrandt <jay at elec.gla.ac.uk>
2811 Date: Sat, 5 Apr 1997 02:04:53 +0100
2812
2813   You can also use @ in the Fcc field to file the outgoing message in
2814   the current folder.
2815
2816     Fcc: @
2817
2818   This is useful if you filter your mail (e.g., with procmail) and you
2819   read your mail in folders other than +inbox.
2820
2821 From: David S. Goldberg <dsg at linus.mitre.org>
2822 Date: 30 Oct 1995 10:23:55 -0500
2823
2824   You can get the Message-ID field by placing the folder in the "Fcc"
2825   field and adding:
2826
2827     send: -msgid
2828
2829   to your .mh_profile.  Unfortunately, this Message-ID isn't as useful
2830   as sendmail's--it doesn't include the date.
2831
2832 ------------------------------
2833   
2834 Subject: 05.10 Can the folder in Fcc: be dynamically specified?
2835 From: Andy Rabagliati <andyr at wizzy.com>
2836 Date: Mon, 1 Aug 1994 00:00:00 -0800
2837
2838   My suggestion would be to run Tom Christiansen's rfi script.  If you
2839   cannot find it on *.sources archive sites (please try first), I can
2840   mail it to you.
2841
2842   One good idea would be to write a whatnowproc that files the mail
2843   based on a procmail or deliver file.  Then you can use the same file
2844   for incoming and outgoing mail.
2845
2846 ------------------------------
2847   
2848 Subject: 05.11 Can I post secure/encryped mail?
2849 From: Bill Wohler <wohler at newt.com>
2850 Date: Thu, 19 May 2005 18:06:39 -0700
2851
2852   MH-E 7.0 supports GPG out of the box.
2853
2854 From: Bill Wohler <wohler at newt.com>
2855 Date: Mon, 5 Mar 2001 05:30:43 -0800
2856
2857   PGP keys can be obtained via mail from <pgp-public-keys at pgp.mit.edu>,
2858   and via the Web at http://www.pgp.net/pgpnet/pks-commands.html.
2859   Many PGP front-ends (e.g., mailcrypt) automatically obtain keys for
2860   you.
2861
2862   See http://www.pgp.net/ for more info.
2863
2864 From: Vivek Khera <khera at kciLink.com>
2865 Date: 19 Jun 1995 22:06:37 GMT
2866
2867   A much more robust Perl script I wrote is appended below [Ed: Send a
2868   note to Vivek for the script].  It works its way through aliases,
2869   and avoids problems with full names in the headers.
2870
2871   Here is my mhn profile entry to display the messages.
2872
2873     mhshow-show-application/x-pgp: %l pgp -m '%F'       # nmh
2874     mhn-show-application/x-pgp: %l pgp -m '%F'          # MH
2875
2876   to use the script, after you edit the message, at the What now?
2877   prompt, type "edit pgpmail" for plain ascii encryption or "pgpmail
2878   -m" for a MIME formatted encryption.  If you want to add a digital
2879   signature, give the script the -s flag also.
2880
2881 From: Jeffrey C. Ollie <jeff at ollie.clive.ia.us>
2882 Date: Mon, 1 May 1995 00:00:00 -0800
2883
2884   TIS has a free, draft-standard compliant public key system that
2885   works with MH (PEM).  Check it out on ftp.tis.com.
2886
2887 From: Kimmo Suominen <kim at tac.nyc.ny.us>
2888 Date: Mon, 1 May 1995 00:00:00 -0800
2889
2890   You could try looking at the URL http://www.tac.nyc.ny.us/ and
2891   following the link from the cover page.  Everything you need for
2892   PGP to work with MH is there (scripts and mhn entries).
2893
2894 From: mathew at mantis.co.uk
2895 Date: Mon, 1 May 1995 00:00:00 -0800
2896
2897   Excellent stuff.  I've tried altering it to conform to
2898   draft-borenstein-pgp-mime-00.txt.
2899
2900   Unfortunately, I can't get mhn to tag PGP-armoured text as
2901   application/pgp; format=text without it insisting on base64 encoding
2902   it.  So I can't quite manage to implement the standard.  *sigh*
2903
2904   Presumably mhn thinks that anything which isn't text/* must be
2905   encoded.
2906
2907 From: John R MacMillan <john at interlog.com>
2908 Date: Wed, 16 Apr 1997 00:06:59 -0700
2909
2910   Premail, in conjunction with MH, can display and compose security
2911   multiparts (e.g., multipart/signed and multipart/encrypted PGP mail,
2912   non-MIME PGP, and some S/MIME).  Check out
2913
2914     http://www.c2.org/~raph/premail/
2915
2916   for details.
2917
2918 ------------------------------
2919   
2920 Subject: 05.12 How can I send multi-media (MIME) attachments?
2921 From: Brian Exelbierd <bex at ncsu.edu>
2922 Date: Mon, 09 Oct 1995 08:05:55 -0400
2923
2924   The short guide:
2925
2926   1. Compose a letter using comp.
2927
2928   2. When you get to a point where you want to include a MIME attachment, type
2929      the following to include a GIF image (note: the '#' must be in
2930      the first column):
2931
2932         #image/gif [Pictures at an Exhibition] /usr/lib/pictures/exhibition.gif
2933
2934   3. Finish your letter, adding more text or attachments as needed.
2935
2936   4. Save your letter and exit the editor.  At the Whatnow prompt
2937      type "edit mhn".  mhn will automatically format your letter with
2938      the MIME attachments leaving the original letter in ,##,orig
2939      where ## is the letter number.
2940
2941   5. Type "send" at the Whatnow prompt, and poof, you have just sent
2942      MIME mail.  I strongly recommend you practice sending yourself
2943      MIME mail first.
2944
2945   For more information, see the mhn(1) man page,
2946   ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types
2947   for a list of allowed media types in addition to image/gif, and
2948   Chapter 3 in the MH book or the URL:
2949
2950     http://www.ics.uci.edu/~mh/book/overall/tocs/intmime.htm
2951
2952 ------------------------------
2953   
2954 Subject: 05.13 What's the best way to send mail to a long list of people?
2955 From: Bill Wohler <wohler at newt.com>
2956 Date: Thu, 12 Oct 1995 07:53:53 -0700
2957
2958   There are three ways to keep the list of members from appearing in
2959   everyone's header.
2960
2961   If you're planning on mailing to these people regularly, the best
2962   way is to create an alias in /etc/aliases (/usr/lib/aliases).  That
2963   way, recipients can send and reply to the list as well.
2964
2965   The other two ways allow you to manage the list privately, but the
2966   recipients cannot send to the list (unless you set something up with
2967   your deliver or procmail script).  One is with a group list.  It
2968   looks like this:
2969
2970     To: All-members: member1, member2, member3, ..., membern;
2971
2972   The recipients see this:
2973
2974     To: All-members:;
2975
2976   You can make this an MH alias as well.
2977
2978   The second way is to use a blind carbon copy (see "How do I send
2979   blind carbon copies?").
2980
2981   Or you could also use the undocumented Dcc field which is used like
2982   the Bcc field, but doesn't inject the "Blind-Carbon-Copy."  Warning:
2983   (See "What is the Dcc header?")
2984
2985 ------------------------------
2986   
2987 Subject: 05.14 What is the Dcc header?
2988 From: jpeek at jpeek.com (Jerry Peek)
2989 Date: 14 Sep 96 05:51:13 GMT
2990
2991   If you put the alias in the Dcc field and leave the To: field empty,
2992   there's a good chance that the recipients will get a message with
2993   the header field:
2994
2995     Apparently-to: <someaddress>
2996
2997   and it might even list several addresses.  To avoid that, use a To:
2998   field with some address (like yours) in it.  I use a comment that
2999   tells people what's really happening--like this, more or less:
3000
3001     To: "Faculty members, c/o" <super@wierdlmpc.msci.memphis.edu>
3002     dcc: faculty
3003
3004   There are some other choices, like using an un-replyable group list
3005   in the To: field, but I think they tend to confuse non-techies.
3006
3007 Date: Wed, 27 Sep 1995 09:46:37 -0700
3008 From: John Romine <jromine at yoyodyne.ICS.UCI.EDU>
3009
3010   The Dcc (Distribution Carbon Copy) field behaves much like the Bcc
3011   field, but does not add the "Blind-Carbon-Copy" notice.  This header
3012   is removed before posting the message,and a copy of the message is
3013   distributed to each listed address.  This could be considered a form
3014   of Blind Carbon Copy which is best used for sending to an address
3015   which would never reply (such as an auto-archiver).
3016
3017   People should not be using Dcc as a substitute-Bcc to send to other
3018   people.  When users use Dcc as a substitute for Bcc, there is *no*
3019   indication to the "blind" recipients that they have received a blind
3020   copy.  If those recipients should reply (and they have no indication
3021   why they shouldn't), the original author could be very embarassed
3022   (or worse).
3023
3024 ------------------------------
3025   
3026 Subject: 05.15 How can I make sense of the replcomps file?
3027 From: Bill Wohler <wohler at newt.com>
3028 Date: Sun, 26 Nov 1995 19:25:14 -0800
3029
3030   The best thing to do is curl up with the mh-format(5) man page, or
3031   Section 11.2 of the MH book, or the URL:
3032
3033     http://www.ics.uci.edu/~mh/book/mh/mhstr.htm
3034
3035   These will explain the following replcomps file.  Don't start with the
3036   first four lines--the latter group of lines are much easier to understand.
3037
3038     %(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
3039     %<(nonnull)%(void(width))%(putaddr To: )\n%>\
3040     %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
3041     %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
3042     Organization: Newt Software
3043     %<{fcc}Fcc: %{fcc}\n%>\
3044     %<{subject}Subject: Re: %{subject}\n%>\
3045     %<{date}In-reply-to: Your message of "\
3046     %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
3047                  %{message-id}%>\n%>\
3048     --------
3049
3050   In particular, note the following:
3051
3052     \   consider the following line to be part of the current line
3053     \n  inject an actual newline into the reply.  Note that inserting
3054             a field without a trailing backslash (\) will cause
3055             that field to be emitted in the reply as well.
3056     %<{field}, %?{field}, %|, %>        if field exists, else if field exists,
3057                                         else, endif
3058     %(command)  mh-format commands
3059     %{field}    value of the header field inserted at this point
3060
3061   To add new fields, you can either add fields based on whether
3062   certain fields exist in the original message (e.g.,
3063   %<{message-id}...), or hard-code them, as in the Organization field
3064   above.  Note that you can either use a "\n\" pair, or nothing at the
3065   end of a line to insert a newline in the reply.
3066
3067 ------------------------------
3068   
3069 Subject: 05.16 How can I convert quoted-printable to 8bit in quoted text in replies?
3070 From: Jarle F. Greipsland <jarle at idt.unit.no>
3071 Date: 22 Aug 1995 10:42:07 +0200
3072
3073   The idea behind the solution is that I need mhn to store the
3074   contents of the mail in the native iso8859-1 format somewhere.  I
3075   did this by creating a custom editor that is invoked when I reply to
3076   a message.  This editor extracts the body of the message (sorry, no
3077   multipart stuff), indents it with '> ', appends it to the draft
3078   message and invokes the ordinary editor on it.  Here are the details:
3079
3080   `isorepl' is a symbolic link from my $HOME/bin-directory to `repl'.
3081
3082   In my .mh_profile I added the following two lines:
3083
3084     isorepl: -form isoreplcomps -editor isoextract
3085     isoextract-next: vi
3086
3087   The isoreplcomps file in my Mail-directory contains:
3088
3089     %(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
3090     %<(nonnull)%(void(width))%(putaddr To: )\n%>\
3091     %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
3092     %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
3093     %<{fcc}Fcc: %{fcc}\n%>\
3094     %<{subject}Subject: Re: %{subject}\n%>\
3095     %<{date}In-reply-to: Your message of "\
3096     %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
3097                  %{message-id}%>\n%>\
3098     --------
3099     #<text/plain; charset=iso-8859-1
3100     %<{message-id}In message %{message-id} %>\
3101     %<{from}%(friendly{from}) writes%|You write%>:
3102
3103   This is a "Usenet-like" quoting style.  Modify to suit your own
3104   taste.  This form will setup the proper header, as well as the first
3105   line of the new message (In <mmmmbbbb> nnnn writes etc.).
3106
3107   The first editor, `isoextract', looks like this:
3108
3109     #!/bin/sh
3110     #
3111     # Called from within repl where the "editalt" variable is valid
3112     #
3113     # Point to a special MHN configuration file (save old one)
3114     OLDMHN="$MHN"
3115     MHN=$HOME/`mhparam Path`/isoquotemsg
3116     export MHN
3117
3118     # Extract message body to "native" format (should be iso-8859-1)
3119     # > More bla bla.
3120     mhn -file "$editalt" -store >> $1 2>/dev/null
3121
3122     MHN="$OLDMHN"
3123     myname=`basename $0`
3124     next=`mhparam ${myname}-next`
3125     if [ "x$next" != "x" ]; then
3126             exec $next "$@"
3127     fi
3128
3129   `isoquotemsg' has just one rule; how mhn should store a text message.
3130
3131     mhn-store-text: |sed -e 's/^[       ]*$//' \
3132                          -e 's/^\([>|]\)\(.*\)$/>\1\2/' \
3133                          -e 's/^\([^>|].*\)$/> \1/'
3134
3135   This tells mhn to pipe the message to stdout, where the sed commands will
3136   do the reformatting/quoting. (Note: the first pair of square brackets
3137   contains a space and a tab.)
3138
3139   So, when I do a `isorepl' to a message, `repl' will create the draft
3140   message with the proper headers (based on the `isoreplcomps' format file),
3141   fire off its first editor, `isoextract', with the name of the draft file as
3142   its parameter. `isoextract' then invokes mhn in a suitable environment,
3143   tells it that it is to use the file $editalt as its source, and orders it
3144   to store the contents.  The store-text rule in the custom MHN-file tells it
3145   to just pipe the message (in native iso8859-1 form) through a small set of
3146   sed commands, and `isoextract' uses the normal shell construct to append
3147   the result to the draft file.  Then, if there's defined a `isoextract-next'
3148   entry in the .mh_profile, isoextract exec's this editor.
3149
3150 ------------------------------
3151   
3152 Subject: 05.17 Can I have aliases include aliases?
3153 From: Bruce Cox <bruce at maths.su.oz.au>
3154 Date: Fri, 16 Aug 1996 14:26:12 +1000
3155
3156   Indeed, you can.
3157
3158   You just need to remember the way MH expands aliases.  In
3159   particular, the right hand sides are only expanded by the aliases
3160   below them in your aliases file.  So, if you put in:
3161
3162     dead-men: presidents, authors
3163     presidents: washington, lincoln, jefferson, roosevelt
3164     authors: thoreau, irving, london
3165
3166   and type:
3167
3168     ali dead-men
3169
3170   then you would get the response:
3171
3172     washington, lincoln, jefferson, roosevelt, thoreau, irving, london
3173
3174   If you had the dead-men line after the presidents and authors aliases, the
3175   response would be:
3176
3177     presidents, authors
3178
3179 ------------------------------
3180   
3181 Subject: 05.18 Why doesn't mhmail understand aliases?
3182 From: "John L. Romine" <jromine at yoyodyne.ics.uci.edu>
3183 Date: 25 Apr 1996 16:34:10 GMT
3184
3185   One way that mhmail might be run is from a shell script.  This means
3186   that the user running it might not use MH, and would not have a
3187   .mh_profile, etc.  If you want to use aliases with mhmail, expand
3188   them before passing them as arguments (e.g., "mhmail `ali joe`").
3189
3190 ------------------------------
3191   
3192 Subject: 05.19 How do I send blind carbon copies?
3193 From: Bill Wohler <wohler at newt.com>
3194 Date: Mon, 9 Sep 1996 00:32:14 -0700
3195
3196   Use the Bcc header field:
3197
3198     To: your-address-here
3199     Bcc: member1, member2, member3, ..., membern
3200
3201   The recipients see this:
3202
3203     To: your-address-here
3204
3205     ------- Blind-Carbon-Copy
3206
3207     Content of message, with headers
3208
3209   If you don't want the "Blind-Carbon-Copy" message, use the Dcc
3210   field, but this is discouraged in true blind carbon copies since the
3211   warning may prevent the recipient from embarrassing someone
3212   inadvertently.  Read the warning in (see "What is the Dcc header?").
3213
3214 ------------------------------
3215   
3216 Subject: 05.20 When I forward a message, can I use its Subject?
3217 From: Jerry Peek <jpeek at jpeek.com>
3218 Date: Sun, 17 Nov 1996 20:16:31 -0800
3219
3220   Obtain forwedit.
3221
3222     ftp://ftp.ics.uci.edu/pub/mh/contrib/jpeek/forwedit
3223
3224 ------------------------------
3225   
3226 Subject: 05.21 Why is the timezone field in my 'Date:' field wrong?
3227 From: Alex Tomlinson <tomlinson at acm.com>
3228 Date: Wed, 11 Jun 1997 09:16:41 -0500
3229
3230   If the date field in your mail header looks like this:
3231
3232     Date: Tue, 10 Jun 1997 15:59:03 +2228904
3233
3234   remove -lbsd from your MH configuration, add "curses -lcurses", and
3235   rebuild.
3236
3237 ------------------------------
3238   
3239 Subject: 05.22 Can I automate the comp -editor mhn process?
3240 From: Soren Dayton <csdayton at gargoyle164.cs.uchicago.edu>
3241 Date: Tue, 21 Jan 1997 17:23:32 GMT
3242
3243   Add
3244
3245     automhnproc: mhn
3246
3247   to your MH profile.
3248
3249 ------------------------------
3250   
3251 Subject: 05.23 How can I remove those "=20" characters when forwarding?
3252 From: Dave Marquardt <marquard at Austin.IBM.Com>
3253 Date: 12 Oct 2000 10:27:38 -0500
3254
3255   Use `forw -mime'.
3256
3257 ------------------------------
3258   
3259 Subject: 05.24 Can I use mh-format substitution with forw?
3260 From: Dave Marquardt <marquard at Austin.IBM.Com>
3261 Date: Tue, 3 Aug 1999 13:28:30 -0500 (EST)
3262
3263   The answer is no, and the real question is why not?
3264
3265 ------------------------------
3266   
3267 Subject: 05.25 How can I keep repl from breaking long lines?
3268 From: Jerry Peek <jpeek at jpeek.com>
3269 Date: Fri, 14 May 1999 11:15:07 -0400
3270
3271   Try adding width=10000 (or so) to your replcomps. It should work
3272   unless you have messages with lines longer than that...
3273
3274 ------------------------------
3275
3276 Subject: 06.00 ***** Posting *****
3277 From: Bill Wohler <wohler at newt.com>
3278 Date: Fri, 1 Mar 1991 13:03:15 -0800
3279
3280 ------------------------------
3281
3282 Subject: 06.01 What to do with "Problems with edit - draft removed".
3283 From: John Romine <jromine at ics.uci.edu>
3284 Date: Mon, 1 May 1995 00:00:00 -0800
3285
3286   If your users are using an AT&T version of "vi", it's exiting with
3287   non-zero status (supposedly a count of the "errors" during the edit).
3288   Move "vi" to "broken_vi" and put it its place :
3289
3290     #! /bin/sh
3291     /usr/ucb/broken_vi "$@"
3292     exit 0
3293
3294   Alternatively, compile MH with the ATTVIBUG option.
3295
3296   Then complain to your vendor that "vi" is broken, and they should
3297   fix it.
3298
3299 ------------------------------
3300   
3301 Subject: 06.02 Can I run my message through a program (e.g., ispell) before sending?
3302 From: Jerry Peek <jpeek at jpeek.com>
3303 Date: Fri, 1 Mar 1991 13:03:15 -0800
3304
3305   It's pretty simple.  If your speller is called myspell, use:
3306
3307     What now? edit myspell
3308
3309   MH will actually execute:
3310
3311     myspell /your-mail-draft-directory/draftfile
3312
3313   and give the entire draft message to your speller.  The header will
3314   probably be "misspelled," of course, though you might be able to
3315   tell the speller to ignore it--or you could hack up a little shell
3316   script to run the speller on just the message body, then tack the
3317   corrected body back onto the header before sending.
3318
3319   You can automate this some more.  For example, if you want your
3320   speller to run after your first edit with "prompter" and also after
3321   you leave the "vi" editor, add these lines to your MH profile:
3322
3323       prompter-next: myspell
3324       vi-next: myspell
3325
3326   Then, at the "What now?" prompt:
3327
3328       What now? e
3329
3330   your speller will run.  For more info, see the mh-profile(5) man
3331   page or section 7.2.1 (6.2.1) of the MH book, or the URL:
3332
3333     http://www.ics.uci.edu/~mh/book/mh/chaedi.htm#Edi
3334
3335 ------------------------------
3336   
3337 Subject: 06.03 What to do with "bad address 'xxx' - no at-sign after local-part".
3338 From: Owen Rees <rtor at ansa.co.uk>
3339 Date: Fri, 1 Jan 1993 00:00:00 -0800
3340
3341   You may find that post returns the following message:
3342
3343     post: bad address 'Mr. Foo Bar <fb@somewhere.edu>' - no at-sign
3344     after local-part (Bar), continuing...
3345
3346   The unquoted dot causes "Mr. Foo" to be parsed as the local part of
3347   the address.  Either remove the dot, or rewrite the address as
3348   follows:
3349
3350     "Mr. Foo Bar" <fb@somewhere.edu>
3351     (Mr. Foo Bar) <fb@somewhere.edu>
3352     (Mr. Foo Bar) fb@somewhere.edu
3353
3354 ------------------------------
3355   
3356 Subject: 06.04 Fixing "post: problem initializing server; [BHST] no servers available"
3357 From: Peter Marvit <marvit at hplabs.hpl.hp.com>,
3358         Eric Bracken <bracken at bacon.performance.com>
3359 Date: Tue, 1 Nov 1994 00:00:00 -0800
3360
3361   The error message itself is essentially correct.  However, what this
3362   really means is: MH's post cannot connect to a running sendmail over
3363   an SMTP port (MH configured with SMTP and SENDMTS).
3364
3365   The potential problems:
3366
3367   1. Your local sendmail daemon is dying or not running for some
3368      reason.
3369
3370   2. You use BIND and your local nameserver is not responding.
3371      Solution: Delete "/etc/resolv.conf."
3372
3373   3. Your $MHLIB/mts.conf (mtstailor) has its "servers:" pointing to a
3374      non-existent machine or a machine which is a) not reachable or b)
3375      not running the sendmail daemon.
3376
3377 From: Bdale Garbee <bdale at col.hp.com>,
3378         Eric Bracken <bracken at bacon.performance.com>
3379 Date: Sun, 1 May 1994 00:00:00 -0800
3380
3381   4. The hostname localhost [127.0.0.1] is missing from /etc/hosts.
3382
3383      Solution: add an entry for "localhost" to /etc/hosts or your DNS
3384      database or add the following to $MHLIB/mts.conf (mtstailor):
3385
3386        servers: 127.0.0.1 \01localnet
3387
3388 From: Larry Daffner <ldaffner at convex.com>
3389 Date: 3 Mar 1996 14:39:54 -0600
3390
3391   5. Your load average is so high that sendmail is refusing connections.
3392
3393      Solution: Change your configuration from "mta: sendmail/smtp" to
3394      "mta: sendmail" so that a sendmail processes is spawned to
3395      deliver the message.  This is a double-edged sword since the
3396      extra process only makes the load worse.
3397
3398 From: Corbin Covault <cec8 at po.cwru.edu>
3399 Date: Sun, 02 Sep 2001 02:13:42 -0400
3400
3401   6. Sendmail may not be located on the path that MH expects.
3402
3403      Solution: Try specifying the path explicitly by adding a line to
3404      mts.conf thus:
3405   
3406        sendmail: /usr/sbin/sendmail
3407   
3408      or wherever your sendmail daemon executable lives.
3409
3410 From: Neil W Rickert <rickert+nn at cs.niu.edu>
3411 Date: 13 Apr 2001 18:47:43 -0500
3412
3413   7. You don't want to use an available server.
3414
3415      Solution: Try
3416
3417        postproc: /usr/local/lib/mh/spost
3418
3419      in your MH profile (but check the path first). That should use
3420      command line sendmail.
3421
3422 ------------------------------
3423   
3424 Subject: 06.05 Fixing "post: problem initializing server; [RPLY] 503 Sender already specified"
3425 From: Paul Pomes <ppomes at Qualcomm.com>
3426 Date: Mon, 1 Mar 1993 00:00:00 -0800
3427
3428   The problem in sendmail is that the RSET after the ONEX does not
3429   reset all the state information.  Normally sendmail fork()s after
3430   the Mail from: statement and a RSET causes that child to exit. This
3431   automatically cleans up.  If the fork() is suppressed by ONEX, then
3432   the source must be modified to do the cleanup.  See "srvrsmtp.c
3433   patch" in the Appendix.  If you don't have the sources, modify your
3434   MH sources to not use the ONEX verb.
3435
3436 ------------------------------
3437   
3438 Subject: 06.06 Fixing "post: unexpected response; [BHST] no socket opened"
3439 From: Steve Lembark <lembark at wrkhors.la.ca.us>, Bill Wohler <wohler at newt.com>
3440 Date: Mon, 1 Aug 1994 00:00:00 -0800
3441
3442   This problem happens when there is no interface defined within the
3443   tcp system.  A couple of workarounds include:
3444
3445   o Use a hostname (other than the local host) instead of localhost in
3446     the "servers" entry of the $MHLIB/mts.conf (mtstailor) file.
3447   o Recompile MH with sendmail instead of sendmail/smtp (not very elegant).
3448
3449   A better fix would be to define your tcp interface.
3450
3451   Here, you run ifconfig and route (as root) to define the loopback
3452   device and route.  You should add them to rc.local so they are
3453   effected at every boot.
3454
3455     # ifconfig lo 127.0.0.1                     # Linux
3456     # ifconfig lo0 127.0.0.1            # Sun
3457
3458     # route 127.0.0.1
3459
3460   If all is well, "ifconfig lo" (or lo0), will show something like this
3461   (on my Linux system):
3462
3463     lo        Link encap Local Loopback
3464               inet addr 127.0.0.1  Bcast 127.255.255.255  Mask 255.0.0.0
3465               UP LOOPBACK RUNNING  MTU 2000  Metric 0
3466               RX packets 0 errors 0 dropped 0 overrun 0
3467               TX packets 519 errors 0 dropped 0 overrun 0
3468
3469   and "netstat -r" will show:
3470
3471     # netstat -r
3472     Destination net/address   Gateway address    Flags RefCnt    Use Iface
3473     127.0.0.0                 *                  UN         0    519 lo
3474
3475   If you're not on a network and running DNS, your /etc/hosts will
3476   need at least:
3477
3478     127.0.0.1   your_host_name localhost        # loopback address
3479
3480   Note: put your name FIRST on the localhost line.  This official name
3481   is used by sendmail to determine your return address.
3482
3483   If you are on a network and running DNS, you might find that putting
3484   your host name in the localhost entry might gum up other things, in
3485   which case you'll want your hostname to have its own proper address.
3486
3487   This might not do it though.  David Youatt <dpy at sgi.com> says that
3488   his network was happy but he still had the problem until he upgraded
3489   his system and got the latest revision of sendmail as well.  He
3490   says: "Turns out that that the problem I was having seems to be
3491   caused (at least partly, maybe entirely) by the version of sendmail
3492   that is shipped with IRIX 5.2 (sendmail 5.65, I think).  The version
3493   shipped w/IRIX 5.3 (in beta) is sendmail 8.6.9 and works fine."
3494
3495   I'm not entirely happy with this section, so please give me some
3496   feedback.  If you have this problem, please send me
3497   <wohler at newt.com> a brief description so I'll know which problems
3498   and solutions seem to be the most prevalent.
3499
3500 ------------------------------
3501   
3502 Subject: 06.07 How do I fix the "X-Authentication-Warning" header?
3503 From: Bill Wohler <wohler at newt.com>
3504 Date: Mon, 9 Sep 1996 01:32:15 -0700
3505
3506   (See "Fixing "Sender didn't use the HELO protocol"".)
3507
3508 ------------------------------
3509   
3510 Subject: 06.08 Fixing "post: unexpected response; [RPLY] 503 Need MAIL before RCPT"
3511 From: Bjoern Stabell <bjoerns at acm.org>
3512 Date: Mon, 1 May 1995 00:00:00 -0800
3513
3514   I inserted:
3515
3516     clientname: localhost
3517
3518   in the $MHLIB/mts.conf (mtstailor) file, and that fixed the problem.
3519
3520 ------------------------------
3521   
3522 Subject: 06.09 Fixing "post: problem initializing server; [BHST] premature end-of-file on socket"
3523 From: Ginko <gianluca at noroboter.rotoni.com>
3524 Date: Thu, 8 Mar 2001 09:18:14 +0000 (UTC)
3525
3526   I have sendmail under control of tcpwrapper started by inetd 
3527   and didn't want to take it away, the very simple fix to this 
3528   problem was to allow the localhost on /etc/hosts.allow on the
3529   sendmail entry.
3530
3531 From: Stefan Huebner <sh at muc.de>
3532 Date: Wed, 11 Sep 1996 20:06:49 +0200
3533
3534   Use spost instead of post.  To do this:
3535
3536     % mv post post.orig
3537     % ln -s spost post
3538
3539 From: Chuck Mattern <cmattern at mindspring.com>
3540 Date: Mon, 1 May 1995 00:00:00 -0800
3541
3542   If you are running sendmail instead of smail, make sure that all
3543   smtp entries in /etc/inetd.conf are commented out.  If you do edit
3544   /etc/inetd.conf, don't forget to run to restart inetd with "kill -1
3545   <inetd PID>".
3546
3547 ------------------------------
3548   
3549 Subject: 06.10 Fixing "Sender didn't use the HELO protocol"
3550 From: rickert at cs.niu.edu (Neil Rickert)
3551 Date: Tue, 20 Mar 2001 22:01:16 -0800
3552
3553   If you are sharing your $MHLIB/mts.conf (mtstailor) file among
3554   several machines, and you are connecting to the local sendmail, then
3555   use 'localhost' as the hostname argument to the clientname parameter
3556   (described below).
3557
3558   Otherwise, place mts.conf somewhere under /etc on each system, and
3559   install a symlink to it on the shared file system.
3560
3561 From: labrown at dg-rtp.dg.com (Lance A. Brown)
3562 Date: 23 Apr 1996 14:43:04 -0400
3563
3564   You can solve this by putting
3565
3566     localname:      localhostname
3567     localdomain:    local.domain.name
3568
3569   in your $MHLIB/mts.conf (mtstailor) file. This will make MH send a
3570   HELO string in the SMTP transaction.
3571
3572 From: Terry Manderson <terry at azure.dstc.edu.au>
3573 Date: Mon, 1 May 1995 00:00:00 -0800
3574
3575   Add
3576
3577     clientname sender
3578
3579   to $MHLIB/mts.conf (mtstailor) where sender is the name of the
3580   machine sending the message. The error message occurs because newer
3581   MTA's require SMTP's "HELO" command which MH omits in some
3582   configurations. When you add the above line, it forces MH to use the
3583   HELO command.
3584
3585 From: Bill Wohler <wohler at newt.com>
3586 Date: Fri, 1 Mar 1991 13:03:15 -0800
3587
3588   You get a header like:
3589
3590     X-Authentication-Warning: screamer.rtp.ericsson.se: Host
3591     rcur7.rtp.ericsson.se didn't use HELO protocol
3592
3593   Easy possibilities are:  apply the patch to MH that comes with Sendmail
3594   8.X.X and makes it use HELO, or comment out the line that says
3595
3596     Opauthwarnings
3597
3598   in your sendmail.cf.
3599
3600 ------------------------------
3601   
3602 Subject: 06.11 Fixing "post: problem initializing server; [RPLY] 553 Local configuration error, hostname not recognized as local
3603 From: "Matthew V. J. Whalen" <whalenm at aol.net>
3604 Date: Mon, 1 May 1995 00:00:00 -0800
3605
3606   Change your "mts" in "conf/MH" from "sendmail/smtp" to just
3607   "sendmail."
3608
3609 From: Bill Wohler <wohler at newt.com>
3610 Date: Mon, 1 May 1995 00:00:00 -0800
3611
3612   The solution above will keep MH from using any SMTP server on your
3613   network. require sendmail to be installed on all machines. You could
3614   take advantage of the "sendmail/smtp" option to have MH talk to a
3615   non-local sendmail. In $MHLIB/mts.conf (mtstailor) add:
3616
3617     servers <SMTP-server>
3618
3619   It may also be caused by old versions of sendmail.
3620
3621 ------------------------------
3622
3623 Subject: 07.00 ***** Mail Filters *****
3624 From: Bill Wohler <wohler at newt.com>
3625 Date: Fri, 1 Mar 1991 13:03:15 -0800
3626
3627 ------------------------------
3628
3629 Subject: 07.01 What mail filters are available?
3630 From: Bill Wohler <wohler at newt.com>
3631 Date: Sun, 11 Mar 2001 10:27:24 -0800
3632
3633   The list currently includes slocal (included with MH), deliver,
3634   procmail and mailagent.  They are briefly described here.  Slocal is
3635   probably the most popular by virtue of being included in the
3636   distribution.  The next most popular entry is procmail, followed by
3637   deliver.
3638
3639   Slocal comes with MH.  It can be used to process incoming mail based
3640   on the contents of any of the headers.  Actions include filing
3641   messages, running commands, printing messages on your terminal and
3642   so on.  The configuration is made in ~/.maildelivery.  People seem to
3643   have trouble with slocal bugs, and you can't use it if you don't
3644   have write permission on your system maildrop so a lot of people
3645   have opted for the alternatives, but it's easy to use and comes with
3646   MH.
3647
3648   procmail is quite popular and has a very powerful configuration
3649   file.  However, the syntax is its own, but it is easy to learn given
3650   a couple of good examples.  Its advantages are its small size and
3651   speed.  Like deliver, procmail may be installed as a delivery agent
3652   so you would not even have to have a .forward file.
3653
3654   Deliver can run any script or program (called ~/.deliver), so you
3655   really can do anything you want to incoming mail.  One feature that
3656   it sports that no other does is that you can install it as a local
3657   mailer in place of /bin/mail.  If it's the local mailer, you don't
3658   need to have a .forward--~/.deliver is run anyway.  In addition, it
3659   allows the system administrator to write some programs to filter
3660   everybody's mail.  It came with my Linux system, so installation was
3661   non-existent.
3662
3663   I started with slocal, and then moved to deliver. I switched to
3664   procmail because of a bug in deliver (which I think has since been
3665   fixed) whereby a blank line would be inserted into the header before
3666   header fields with numbers in them.
3667
3668   I am still using procmail and probably will do so indefinitely since
3669   it is powerful, there are many spam filters written in it, and it
3670   coexists with MH and gnus so well.
3671
3672   My recommendation is to use the one that is installed on your system
3673   or get procmail. Here are the URLs for the filters mentioned in this
3674   document:
3675
3676     http://www.procmail.org/
3677
3678 From: "Eric D. Friedman" <friedman at hydra.acs.uci.edu>
3679 Date: 28 Aug 1996 08:28:46 GMT
3680
3681   See http://www.faqs.org/faqs/mail/filtering-faq/index.html.
3682
3683 From: Stephen R. van den Berg <berg at pool.informatik.rwth-aachen.de>
3684 Date: Mon, 1 Aug 1994 00:00:00 -0800
3685
3686   Procmail can be used to create mail-servers, mailing lists, sort
3687   your incoming mail into separate folders/files (real convenient when
3688   subscribing to one or more mailing lists or for prioritizing your
3689   mail), preprocess your mail, start any programs upon mail arrival
3690   (e.g. to generate different chimes on your workstation for different
3691   types of mail) or selectively forward certain incoming mail
3692   automatically to someone.
3693
3694 From: Raphael Manfredi <Raphael_Manfredi at pobox.com>
3695 Date: Tue, 28 Jul 1998 13:22:07 +0200
3696
3697   "mailagent" is yet another mail filter, written in perl, which will
3698   let you do anything with your mail. It has all the features you may
3699   expect from a filter: mailing lists sorting, forwarding to MTA or to
3700   inews, pre-processing of message before saving into folder, vacation
3701   mode, etc.  It was initially written as an Elm-filter replacement,
3702   but has now enough power to also supplant MMDF's
3703   .maildelivery. There is also a support for @SH mail hooks, which
3704   allows you to automatically distribute patches or software via
3705   command mails.
3706
3707   The mailagent was designed to make mail filtering as easy as it can
3708   be. It is highly configurable and fairly complete. Rules are
3709   specified in a lex-like style, with the full power of perl's regular
3710   expressions. The automaton supports the notion of mode, and header
3711   selection has many magic features built-in, to ease the rule writing
3712   process.
3713
3714   The distribution comes with a set of examples, an exhaustive test
3715   suite, and naturally a detailed manual page. It should be noted that
3716   the mailagent will work even if your system administrator forbids "|
3717   programs" hooks in the ~/.forward, provided you have access to some
3718   sort of cron daemon.
3719
3720     http://www.cpan.org/authors/Raphael_Manfredi/
3721
3722 ------------------------------
3723   
3724 Subject: 07.02 Why slocal writes messages to system mailbox that from(1) can't read.
3725 From: Bill Wohler <wohler at newt.com>
3726 Date: Mon, 1 May 1995 00:00:00 -0800
3727
3728   Upgrade to MH 6.8 and set the RPATHS option.  Better yet, use a more
3729   MH-like command instead of from: "scan -file $MAIL".
3730
3731 ------------------------------
3732   
3733 Subject: 07.03 Where can I read about slocal and the format of .maildelivery?
3734 From: Bill Wohler <wohler at newt.com>
3735 Date: Fri, 1 Mar 1991 13:03:15 -0800
3736
3737   See the slocal man page.
3738
3739   Here is brief example of a .maildelivery file that stores messages
3740   to babble in a folder and the system mailbox, stores mh-users in a
3741   folder but not the system mailbox, and puts the rest in the system
3742   mailbox.
3743
3744     to  mh-users  | A "$MHLIB/rcvstore -create +lists/mh-users"
3745     cc  mh-users  | A "$MHLIB/rcvstore -create +lists/mh-users"
3746     to  babble    | R "$MHLIB/rcvstore -create +lists/babble"
3747     cc  babble    | R "$MHLIB/rcvstore -create +lists/babble"
3748     default -     > ? /usr/spool/mail/wohler
3749
3750   Your .forward file may look like (quotes necessary):
3751
3752     "| $MHLIB/slocal -user your_login"
3753
3754   In some implementations, the "-user your_login" is not needed.  If
3755   not, manually running slocal with the flag will produce an error.
3756
3757   See also chapter 12 (11) in the MH book, or the URL:
3758
3759     http://www.ics.uci.edu/~mh/book/mh/tocs/prmaau.htm
3760
3761   Alternatives to slocal include deliver, procmail, and mailagent.
3762   (See "What mail filters are available?")
3763
3764 ------------------------------
3765   
3766 Subject: 07.04 How do I debug my .maildelivery file?
3767 From: Bill Wohler <wohler at newt.com>
3768 Date: Mon, 1 Mar 1993 00:00:00 -0800
3769
3770   Use as many of the following as necessary.
3771
3772   Put a message into a file and call slocal directly on it.
3773
3774     $MHLIB/slocal -user $USER -verbose -debug < test-msg
3775
3776   Modify your .forward to look like:
3777
3778     "|/bin/sh -c 'exec >> /tmp/out 2>&1;
3779     $MHLIB/slocal -user $USER -verbose -debug'"
3780
3781   Or modify a rule in .maildelivery to look like this:
3782
3783     to foo | R "set -xv; exec >/tmp/out 2>&1; $MHLIB/rcvstore +foo"
3784
3785   The previous examples are broken up for readability; the text must
3786   appear on one line.
3787
3788   See also MH book section 12.11 (11.11), or the URL:
3789
3790     http://www.ics.uci.edu/~mh/book/mh/debugti.htm
3791
3792 ------------------------------
3793   
3794 Subject: 07.05 Why isn't slocal working?
3795 From: Bill Wohler <wohler at newt.com>
3796 Date: Mon, 1 Mar 1993 00:00:00 -0800
3797
3798   If slocal doesn't appear to be doing anything, run the following
3799
3800     $MHLIB/slocal -user your_login -verbose < file
3801
3802   where "file" is some message in a mail folder.  If you get something
3803   like:
3804
3805     .maildelivery: ownership/modes bad (0, 154,154,0100666)
3806
3807   your .maildelivery is writable by too many people.  Make it writable
3808   only by you by running "chmod 644 .maildelivery".
3809
3810   See also "How do I debug my .maildelivery file?"
3811
3812 ------------------------------
3813   
3814 Subject: 07.06 Are there any good biff applications for MH?
3815 From: Rob Austein <sra at epilogue.com>
3816 Date: Tue, 01 Dec 1998 03:02:34 -0500
3817
3818   I've been been using a program called xlbiff (X Literate Biff) and
3819   have been quite happy with it. By default, xlbiff generates its
3820   pop-up listings by running scan on your mail drop file, but it's not
3821   a big deal to customize xlbiff for more complicated setups if you
3822   make heavy use of procmail, multiple mail drops, and so on.
3823
3824 From: Richard Coleman <coleman at math.gatech.edu>
3825 Date: 07 Jul 1997 03:31:42 -0400
3826
3827   nmh (new MH) has an additional command (flist) that will tell you
3828   which folders have unseen messages.  I can't imagine using MH
3829   without it.
3830
3831 From: crow at tivoli.com (David L. Crow)
3832 Date: 7 Jul 97 09:36:32 GMT
3833
3834   I have used the following X resource with xbiff before:
3835
3836     xbiff*checkCommand: grep -q '^unread' `mhpath +inbox`/.mh_sequences \
3837                         && exit 0 || exit 2
3838
3839   This should be all one line, but I split it with a line continuation
3840   character for readability.
3841
3842 ------------------------------
3843   
3844 Subject: 07.07 How do I read new messages filed by procmail?
3845 From: Bill Wohler <wohler at newt.com>
3846 Date: Sun, 17 Oct 2004 15:17:14 -0700
3847
3848   If you use MH-E, use "F n (mh-index-new-messages)" to display unseen
3849   messages.
3850
3851 From: Neil W Rickert <rickert+nn at cs.niu.edu>
3852 Date: 23 Apr 2002 20:38:57 GMT
3853
3854   Here is my "unseen" shell script:
3855
3856   #! /bin/sh -
3857
3858   case "$1" in
3859    "") grep unseen $HOME/Mail/context $HOME/Mail/*/.mh_sequences |
3860           sed     -e '/\/fromme\//d' \
3861                   -e "s=$HOME/Mail/==" \
3862                   -e 's=/.mh_sequences:unseen=='
3863       ;;
3864    "+") shift
3865       mark -sequence unseen -add "$@"
3866       ;;
3867    "-") shift
3868       mark -sequence unseen -delete "$@"
3869       ;;
3870    *) echo "Invalid arguments $*"
3871       ;;
3872   esac
3873
3874 From: Paul Fox <pgf-spam at foxharp.boston.ma.us>
3875 Date: Tue, 23 Apr 2002 20:13:42 GMT
3876
3877   I have procmail deliver to a set of mbox files and use "inc -f foo"
3878   to inc from them. The names of the mbox files are the same as the MH
3879   folders which makes it easy to write a script that does something
3880   like this:
3881
3882       cd Mailboxes
3883       for x in *; do
3884           inc -f $x +$x
3885       done
3886
3887 ------------------------------
3888
3889 Subject: 08.00 ***** MH-E *****
3890 From: Bill Wohler <wohler at newt.com>
3891 Date: Fri, 1 Mar 1991 13:03:15 -0800
3892
3893 ------------------------------
3894
3895 Subject: 08.01 I have a question about MH-E
3896 From: Bill Wohler <wohler at newt.com>
3897 Date: Sat, 3 Mar 2001 13:51:29 -0800
3898
3899   Let me send you over to:
3900
3901     http://mh-e.sourceforge.net/
3902
3903   This is the SourceForge MH-E project. It has mailing lists and files
3904   to download, and will let you submit patches or support requests.
3905
3906   The Support Requests section may already contain an answer to your
3907   question. If not, you can post your question:
3908
3909     http://sourceforge.net/tracker/?group_id=13357&atid=213357
3910
3911 ------------------------------
3912
3913 Subject: 09.00 ***** Xmh *****
3914 From: Bill Wohler <wohler at newt.com>
3915 Date: Fri, 1 Mar 1991 13:03:15 -0800
3916
3917 ------------------------------
3918
3919 Subject: 09.01 How can I get xmh to use Emacs as the editor?
3920 From: Bob Ellison <ellison at sei.cmu.edu>
3921 Date: Fri, 1 Mar 1991 13:03:15 -0800
3922
3923   The modifications to xmh to support an external editor, annotations,
3924   and an append command can be found in the these places.
3925
3926     ftp://ftp.x.org/R5contrib/xmh-mods-R5-1.7.Z                         37k
3927     ftp://ftp.sei.cmu.edu/pub/xmh/xmh-mods-R5-1.7.Z                     37k
3928     ftp://ftp.sei.cmu.edu/pub/xmh/xmh-mods-R6-1.0.Z                     37k
3929
3930 From: Andrew Wason <aw at bae.bellcore.com>
3931 Date: Fri, 1 Mar 1991 13:03:15 -0800
3932
3933   As of R5, xmh has a new action proc called XmhShellCommand.  A
3934   string parameter will be executed as a shell command with the
3935   currently selected messages as parameters (or the current message if
3936   there are no selected messages).
3937
3938   Using this new action, a couple of shell scripts, a window version
3939   of emacs (e.g. xemacs) and some elisp code, xmh can use emacs as its
3940   editor instead of the built in Athena text widget editor.  This
3941   doesn't require any source code changes to xmh.  These are included
3942   in the Appendix "Switching xmh's editor".
3943
3944 ------------------------------
3945   
3946 Subject: 09.02 Does xmh support subfolders?
3947 From: Steve Malowany <malowany at cenparmi.concordia.ca>
3948 Date: Fri, 1 Mar 1991 13:03:15 -0800
3949
3950   Yes. Create one by invoking "Create Folder" as usual, and enter
3951   something like: existing-folder/new-sub-folder. You can then access
3952   the subfolder by popping up a menu over the "existing-folder" button
3953   item.
3954
3955   But:
3956
3957 From: John Cooper <jsc at saxon.Eng.Sun.COM>
3958 Date: Fri, 1 Mar 1991 13:03:15 -0800
3959
3960   The R5 version of xmh does *not* handle nested sub-folders.  If you
3961   create a folder as 'grab/some/bandwidth', xmh displays this
3962   folder name for the remainder of the session where it was created,
3963   BUT if you later re-run xmh, the folder is no longer visible to xmh.
3964
3965   See also MH book section 15.6.2 (15.6.2), or the URL:
3966
3967     http://www.ics.uci.edu/~mh/book/xmh/orgfol.htm#FolaSub
3968
3969 ------------------------------
3970   
3971 Subject: 09.03 How do I precede included messages with ">" when replying in xmh?
3972 From: Len Makin <len at mel.dit.csiro.au>
3973 Date: Fri, 1 Mar 1991 13:03:15 -0800
3974
3975   Include the following line in your ~/app-defaults/XMh file:
3976
3977     Xmh*replyInsertFilter: "sed 's/^/> /'"
3978
3979   or,
3980
3981     Xmh.ReplyInsertFilter: $MHLIB/mhl -form repl.filter
3982
3983 From: Andy Linton <andy.linton at comp.vuw.ac.nz>
3984 Date: Fri, 1 Mar 1991 13:03:15 -0800
3985
3986   Using this means that you can chose to insert the original by use of
3987   the "Insert" button in the Draft message pane.  See "How do I
3988   include messages in repl with or without ">"?" to find examples of
3989   repl.filter.
3990
3991   See also MH book sections 15.1.4 (15.1.4), 16.3.3 (16.3.3), or the URLs:
3992
3993     http://www.ics.uci.edu/~mh/book/xmh/senmai.htm#MorRep
3994     http://www.ics.uci.edu/~mh/book/xmh/resfun.htm#Rep
3995
3996 ------------------------------
3997
3998 Subject: Glossary
3999 From: Bill Wohler <wohler at newt.com>
4000 Date: Wed, 29 Sep 2004 00:04:34 -0700
4001
4002   MH    Mail Handler
4003   MHLIB Where MH support routines and files are kept; usually /usr/lib/mh
4004         or /usr/local/lib/mh.
4005   POP3  Post Office Protocol, RFC 1939
4006   MMDF  Multi-channel Memo Distribution Facility
4007   MIME  Multipurpose Internet Mail Extensions, RFC 1521
4008   IMAP  Internet Message Access Protocol, RFC 1064, 1176
4009   TIS   Trusted Information Systems
4010   PEM   Privacy Enhanced Mail
4011   PGP   Pretty Good Privacy
4012   SMTP  Simple Mail Transport Protocol (STD 10; RFC 821)
4013
4014 ------------------------------
4015   
4016 Subject: Acknowledgments
4017 From: Bill Wohler <wohler at newt.com>
4018 Date: Mon, 9 Sep 1996 01:37:27 -0700
4019
4020 I'd like to thank the following people for providing ideas on the
4021 layout of this article:
4022
4023 Joe Wells <jbw at bigbird.bu.edu>        Richard M. Stallman <rms at gnu.org>
4024 David Elliott <dce at smsc.sony.com>     Tom Christiansen <tchrist at perl.com>
4025 Eugene N. Miya <eugene at nas.nasa.gov>
4026
4027 We are also grateful to Kim F. Storm <storm at olicom.dk> and Edward
4028 Vielmetti <emv at ox.com> and the folks mentioned in the text of this
4029 document who have provided answers or other information to make this a
4030 better document.  I regret that it is possible that some names have
4031 been accidently omitted.  I would also like to thank all the readers
4032 of comp.mail.mh.
4033
4034 I'd also like to thank John Romine <jromine at yoyodyne.ICS.UCI.EDU> for
4035 maintaining MH and the MH Web page, Jerry Peek <jpeek at jpeek.com> for
4036 writing the MH bible and for all his hard work with the entire MH
4037 project, Stephen Gildea <gildea at stop.mail-abuse.org> for maintaining MH-E
4038 in years past and always sending me lots of great comments, Kimmo
4039 Suominen <kim at tac.nyc.ny.us> for maintaining the MH patch page, and
4040 Richard Coleman <coleman at math.gatech.edu> for taking MH to nmh.
4041
4042 ------------------------------
4043   
4044 Subject: Switching xmh's editor
4045 From: Andrew Wason <aw at bae.bellcore.com>
4046 Date: Fri, 1 Mar 1991 13:03:15 -0800
4047
4048 #! /bin/sh
4049 # This is a shell archive.  Remove anything before this line, then unpack
4050 # it by saving it into a file and typing "sh file".  To overwrite existing
4051 # files, type "sh file -c".  You can also feed this as standard input via
4052 # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
4053 # will see the following message at the end:
4054 #               "End of shell archive."
4055 # Contents:  README Xmh.ad xmh-command.el xmhcommand xmhemacs
4056 # Wrapped by aw@jello on Fri Nov 15 17:10:34 1991
4057 PATH=/bin:/usr/bin:/usr/ucb ; export PATH
4058 if test -f 'README' -a "${1}" != "-c" ; then
4059   echo shar: Will not clobber existing file \"'README'\"
4060 else
4061 echo shar: Extracting \"'README'\" \(1269 characters\)
4062 sed "s/^X//" >'README' <<'END_OF_FILE'
4063 XThis is a short description of what to do with each of the enclosed files.
4064 X
4065 XXmh.ad
4066 X  Merge this in with your xmh resources.  If you already have
4067 X  user defined buttons, then you may need to renumber the
4068 X  buttons in this resource file.
4069 X
4070 Xxmh-command.el
4071 X  Byte compile this file and put it in your GNU emacs load-path.
4072 X
4073 Xxmhcommand
4074 Xxmhemacs
4075 X  Put these somewhere in your path.
4076 X
4077 X
4078 XOnce you have installed these, restart the R5 xmh with the new
4079 Xresources.  When you press the repl, forw or comp buttons
4080 Xan xemacs window will come up with your draft message.
4081 X
4082 XOnce you have written your mail, save it and exit GNU emacs (C-xC-c).
4083 XYou will be prompted if you want to send the current message.
4084 XIf you enter 'y', the message will be sent and the output will
4085 Xbe displayed in an emacs window (in case you use -verbose or -snoop).
4086 XThen you will be prompted to exit emacs.  Enter 'y' when you are ready.
4087 X
4088 XIf you answered 'n' when prompted to send the message,
4089 Xthen the draft message will be deleted and emacs will exit.
4090 X
4091 XYou can modify the Xmh.ad resources to add more buttons.
4092 XAny MH command which accepts "+folder msg" can be used
4093 X(e.g. a replx shell script which includes the body of the
4094 Xmessage being replied to can be bound to a replx button)
4095 X
4096 X
4097 XAndrew Wason
4098 Xaw at bae.bellcore.com
4099 END_OF_FILE
4100 if test 1269 -ne `wc -c <'README'`; then
4101     echo shar: \"'README'\" unpacked with wrong size!
4102 fi
4103 # end of 'README'
4104 fi
4105 if test -f 'Xmh.ad' -a "${1}" != "-c" ; then
4106   echo shar: Will not clobber existing file \"'Xmh.ad'\"
4107 else
4108 echo shar: Extracting \"'Xmh.ad'\" \(457 characters\)
4109 sed "s/^X//" >'Xmh.ad' <<'END_OF_FILE'
4110 XXmh*CommandButtonCount:                        3
4111 X
4112 XXmh*commandBox.button1.label:          repl
4113 XXmh*commandBox.button1.translations:\
4114 X       #override\n\
4115 X       <Btn1Up>:       XmhShellCommand(xmhcommand y repl) unset()
4116 X
4117 XXmh*commandBox.button2.label:          forw
4118 XXmh*commandBox.button2.translations:\
4119 X       #override\n\
4120 X       <Btn1Up>:       XmhShellCommand(xmhcommand y forw) unset()
4121 X
4122 XXmh*commandBox.button3.label:          comp
4123 XXmh*commandBox.button3.translations:\
4124 X       #override\n\
4125 X       <Btn1Up>:       XmhShellCommand(xmhcommand n comp) unset()
4126 END_OF_FILE
4127 if test 457 -ne `wc -c <'Xmh.ad'`; then
4128     echo shar: \"'Xmh.ad'\" unpacked with wrong size!
4129 fi
4130 # end of 'Xmh.ad'
4131 fi
4132 if test -f 'xmh-command.el' -a "${1}" != "-c" ; then
4133   echo shar: Will not clobber existing file \"'xmh-command.el'\"
4134 else
4135 echo shar: Extracting \"'xmh-command.el'\" \(1294 characters\)
4136 sed "s/^X//" >'xmh-command.el' <<'END_OF_FILE'
4137 X;;; These functions are for use with xemacs and xmh.
4138 X;;; The R5 xmh has a new action - XmhShellCommand which executes
4139 X;;; a shell command with the current msg as an arg.
4140 X;;; By executing something like:
4141 X;;;    XmhShellCommand(xmhcommand repl)
4142 X;;; you can use xemacs as your editor with xmh.
4143 X;;;
4144 X;;; The following elisp functions perform the basic whatnowproc functionality
4145 X;;; (quitting and deleting, sending)
4146 X;;;
4147 X;;; Andrew Wason  aw at bae.bellcore.com
4148 X
4149 X
4150 X;;; Override C-xC-c
4151 X(define-key indented-text-mode-map "\C-x\C-c" 'xmh-command-send-or-delete)
4152 X
4153 X
4154 X(setq mhdraft (getenv "mhdraft"))      ; save the filename of the draft
4155 X
4156 X
4157 X(find-file mhdraft)                    ; load the draft letter
4158 X(indented-text-mode)
4159 X(setq draft-buffer (current-buffer))   ; save the buffer the draft is in
4160 X
4161 X
4162 X(defun xmh-command-send-or-delete ()
4163 X  "Prompt to send or delete letter, then quit."
4164 X  (interactive)
4165 X  (set-buffer draft-buffer)
4166 X  (if (y-or-n-p "Send message? ")
4167 X      (progn
4168 X       (save-buffer)                           ; save the draft buffer
4169 X       (message "Sending...")
4170 X       (pop-to-buffer "MH mail delivery"); pop to a buffer for "send" output
4171 X       (erase-buffer)
4172 X       (call-process "send" nil t t mhdraft)   ; call MH "send"
4173 X       (if (y-or-n-p "Exit? ")
4174 X           (kill-emacs)))                      ; exit emacs
4175 X    (delete-file mhdraft)                      ; delete the draft letter
4176 X    (kill-emacs)))                             ; exit emacs
4177 END_OF_FILE
4178 if test 1294 -ne `wc -c <'xmh-command.el'`; then
4179     echo shar: \"'xmh-command.el'\" unpacked with wrong size!
4180 fi
4181 # end of 'xmh-command.el'
4182 fi
4183 if test -f 'xmhcommand' -a "${1}" != "-c" ; then
4184   echo shar: Will not clobber existing file \"'xmhcommand'\"
4185 else
4186 echo shar: Extracting \"'xmhcommand'\" \(669 characters\)
4187 sed "s/^X//" >'xmhcommand' <<'END_OF_FILE'
4188 X#!/bin/sh
4189 X# This shell should be invoked by the xmh XmhShellCommand() action as
4190 X#   XmhShellCommand(xmhcommand y repl)
4191 X#   XmhShellCommand(xmhcommand n comp) etc.
4192 X# If the second arg is y, then the message list will be used.
4193 X
4194 X# We invoke the passed MH command on the identified message
4195 X# (we must strip the message number and folder from the pathname)
4196 X(if [ $1 = "y" ]
4197 Xthen
4198 X       $2 -whatnowproc xmhemacs +`dirname \`echo $3 | \
4199 X               sed "s;\\\`mhpath +\\\`/;;"\`` `basename $3`
4200 X
4201 X# You can use this more readable version instead if you have ksh
4202 X#      $2 -whatnowproc xmhemacs +$(dirname $(echo $3 | \
4203 X#              sed "s;$(mhpath +)/;;")) $(basename $3)
4204 X
4205 Xelse
4206 X       $2 -whatnowproc xmhemacs
4207 Xfi)&
4208 END_OF_FILE
4209 if test 669 -ne `wc -c <'xmhcommand'`; then
4210     echo shar: \"'xmhcommand'\" unpacked with wrong size!
4211 fi
4212 chmod +x 'xmhcommand'
4213 # end of 'xmhcommand'
4214 fi
4215 if test -f 'xmhemacs' -a "${1}" != "-c" ; then
4216   echo shar: Will not clobber existing file \"'xmhemacs'\"
4217 else
4218 echo shar: Extracting \"'xmhemacs'\" \(116 characters\)
4219 sed "s/^X//" >'xmhemacs' <<'END_OF_FILE'
4220 X#!/bin/sh
4221 X# Invoke xemacs and load the xmh-command.el stuff.
4222 X# xmhemacs is used by xmhcommand
4223 Xxemacs -l xmh-command
4224 END_OF_FILE
4225 if test 116 -ne `wc -c <'xmhemacs'`; then
4226     echo shar: \"'xmhemacs'\" unpacked with wrong size!
4227 fi
4228 chmod +x 'xmhemacs'
4229 # end of 'xmhemacs'
4230 fi
4231 echo shar: End of shell archive.
4232 exit 0
4233
4234 ------------------------------
4235   
4236 Subject: babyl2mh.pl
4237 From: Vivek Khera <khera at cs.duke.edu>
4238 Date: Fri, 1 Mar 1991 13:03:15 -0800
4239
4240 #!/usr/gnu/bin/perl
4241 # incorporate an RMAIL babyl file into an MH folder
4242 #
4243 # usage: babyl2mh +folder babyl-file
4244 #
4245 # V. Khera <khera at cs.duke.edu> 17-JUL-1991
4246
4247 # where to find rcvstore
4248 $rcvstore = "/usr/local/lib/mh/rcvstore";
4249
4250 #
4251 # pull out command line args
4252 #
4253 die "usage: babyl2mh +folder babyl-file\n" unless @ARGV == 2;
4254
4255 $folder = shift;
4256 # make sure folder name starts with a "+"
4257 (substr($folder,0,1) eq "+") || (substr($folder,0,0) = "+");
4258 $bfname = shift;
4259
4260 print "Incorporating RMAIL file $bfname into MH folder $folder\n";
4261
4262 #
4263 # read in babyl file.
4264 #
4265 $/ = "\037";    # this separates the records in a babyl file
4266 $* = 1;         # records are multi-lines
4267
4268 open(BABYL,$bfname) || die "Couldn't open $bfname\n";
4269
4270 $_ = <BABYL>;   # discard header.
4271
4272 $msgnum = 0;
4273
4274 while (<BABYL>) {
4275   chop;         # get rid of delimeter
4276   s/\f(.|\n)*\*\*\* EOOH \*\*\*\n//;    # remove duplicate header information
4277   open(RCVSTORE,"|" . $rcvstore . " $folder");
4278   print RCVSTORE $_;
4279   $msgnum++;
4280   print "Message $msgnum done.\n";
4281 }
4282
4283 ------------------------------
4284   
4285 Subject: inco - babyl to MH converter
4286 From: Juergen Nickelsen <nickel at cs.tu-berlin.de>
4287 Date: Fri, 1 Mar 1991 13:03:15 -0800
4288
4289 #!/bin/sh
4290 # Usage: inco [from [folder]]
4291 # "from" defaults to $HOME/Mail/outbound, "folder" to +inbox.
4292
4293 lispfile=/tmp/inco.$$.el
4294 input=${1-$HOME/Mail/outbound}
4295 tmpmbox=/tmp/inc.$$.mbox
4296 folder=${2-+inbox}
4297
4298 if [ $# -ge 3 ]; then
4299         echo Usage: `basename $0` [ from [ folder ]]
4300         exit 2
4301 fi
4302
4303 trap "rm -f $lispfile $tmpmbox ; exit 1" 1 2 15
4304
4305 touch $tmpmbox
4306 chmod 600 $tmpmbox
4307
4308 echo '(rmail-input "'$input'")
4309 (rmail-last-message)
4310 (setq last (rmail-what-message))
4311 (rmail-show-message 1)
4312 (while (not (equal (rmail-what-message) last))
4313   (rmail-output "'$tmpmbox'")
4314   (rmail-delete-forward nil))
4315 (rmail-output "'$tmpmbox'")
4316 (kill-buffer (current-buffer))
4317 ' > $lispfile
4318
4319 emacs -batch -l $lispfile
4320 inc -file $tmpmbox $folder
4321
4322 > $input
4323 rm -f $lispfile $tmpmbox
4324
4325 ------------------------------
4326   
4327 Subject: t2h - add hyperlinks to message viewed
4328 From: TANAKA Tomoyuki <tanaka at step.mother.com>
4329 Date: Mon, 13 Sep 1999 11:35:43 -0600
4330
4331 #! /bin/sed -f
4332 # "t2h" by TT  news:alt.tanaka-tomoyuki  http://listen.to/TT
4333 # USE: t2h <file.txt >file.html
4334 # Or:  show | t2h | lynx -
4335
4336 s/&/\&amp;/g
4337 s/</\&lt;/g
4338 s/>/\&gt;/g
4339
4340 s/http:[^ "&)   ]*/<a href="&">&<\/a>/g
4341 s/news:[^ "&)   ]*/<a href="&">&<\/a>/g
4342 s/ftp:[^ "&)    ]*/<a href="&">&<\/a>/g
4343 s/telnet:[^ "&) ]*/<a href="&">&<\/a>/g
4344
4345 1i\
4346 <PRE>
4347
4348 $a\
4349 </PRE>
4350
4351 ------------------------------
4352   
4353 Subject: srvrsmtp.c patch
4354 From: Paul Pomes <ppomes at Qualcomm.com>
4355 Date: Fri, 1 Mar 1991 13:03:15 -0800
4356
4357 >From the 5.67 sources:
4358
4359   *** srvrsmtp.c-       Mon Feb 22 12:25:54 1993
4360   --- srvrsmtp.c        Mon Feb 22 12:29:09 1993
4361   ***************
4362   *** 384,389 ****
4363   --- 384,395 ----
4364                           message("250", "Reset state");
4365                           if (InChild)
4366                                   finis();
4367   +
4368   +                       /* clean up a bit if running in parent */
4369   +                       hasmail = FALSE;
4370   +                       dropenvelope(CurEnv);
4371   +                       CurEnv = newenvelope(CurEnv);
4372   +                       CurEnv->e_flags = BlankEnvelope.e_flags;
4373                           break;
4374
4375                     case CMDVRFY:               /* vrfy -- verify address */
4376
4377 ------------------------------
4378   
4379 Subject: IRIX config file
4380 From: Jack Repenning <jackr at informix.com>
4381 Date: 25 Jul 1995 02:35:41 GMT
4382
4383 # Irix 5.3 (based on examples/sys5r4)
4384 bboards on
4385 bin     /usr/local/bin/mh
4386 cc      cc
4387 ccoptions -g
4388 chown /bin/chown
4389 curses  -lcurses
4390 etc     /usr/local/lib/mh
4391 ldoptions -L/usr/local/lib/mh
4392 mail    /usr/mail
4393 mailgroup: mail
4394 manuals local
4395 mts     sendmail/smtp
4396 pop on
4397 popdir /usr/local/bin
4398 ranlib off
4399 #sharedlib sys5
4400 #slibdir /usr/local/lib/mh
4401 signal void
4402 sprintf int
4403 options BIND
4404 options DBMPWD
4405 options DUMB
4406 options FOLDPROT='"0700"'
4407 options MHE
4408 options MHRC
4409 options MIME
4410 options MORE='"/usr/bsd/more"'
4411 options MSGPROT='"0600"'
4412 options RENAME
4413 options RPATHS
4414 options SBACKUP='"\\#"'
4415 #options SENDMTS
4416 options SGI
4417 #options SMTP
4418 options SOCKETS
4419 options SVR4
4420 options SYS5
4421 options SYS5DIR
4422 options UNISTD
4423 options _XOPEN_SOURCE
4424 options VSPRINTF
4425
4426 From: David Paschich <dpassage at bigbook.com>
4427 Date: 23 Apr 96 21:27:12 GMT
4428
4429 # @(#)$Id$
4430 # a 4.2BSD VAX system running SendMail
4431 bin     /usr/local/bin/mh
4432 bboards off
4433 etc     /usr/local/lib/mh
4434 mail    /var/mail
4435 manuals local
4436 mandir  /usr/local/man
4437 chown   /sbin/chown
4438 ranlib  off
4439 mts     sendmail
4440 signal  void
4441 options BIND LOCKF FOLDPROT='"0700"' MHE MHRC MORE='"/usr/bsd/more"'
4442 options MSGPROT='"0600"' RPATHS SENDMTS SGI SMTP SOCKETS SYS5
4443 options TYPESIG="void" ncr MIME VSPRINTF UNISTD SYSVR4 SYS5DIR
4444
4445 ------------------------------
4446   
4447 Subject: HP-UX 10.20 config file
4448 From: Marko Heikkinen <hema at iki.fi>
4449 Date: 06 Jan 1997 17:19:07 +0000
4450
4451 bin     /opt/mail/bin
4452 bboards on
4453 etc     /opt/mail/lib/mh
4454 editor  prompter
4455 remove  mv -f
4456 mail    /var/mail
4457 mandir  /opt/man
4458 manuals standard
4459 chown   /bin/chown
4460 cc      cc
4461 ccoptions       +DA1.0 +DS1.0
4462 curses  -lcurses
4463 mts     sendmail/smtp
4464 pop     off
4465 slibdir: /opt/mail/lib
4466 options SYS5
4467 options MHE 
4468 options MIME
4469 options ATZ
4470 options BIND
4471 options MHE
4472 options MIME
4473 options ATZ
4474 options BIND
4475 options MHE
4476 options MHRC
4477 options MORE='"/opt/gnu/bin/less"'
4478 options MSGPROT='"0600"'
4479 options NDIR
4480 options NTOHLSWAP
4481 options POPUUMBOX
4482 options SOCKETS
4483 options SYS5
4484 options TZNAME
4485 options TYPESIG=void
4486 options VSPRINTF
4487 options WHATNOW
4488 options _STRINGS
4489 signal void
4490 curses  -lcurses -ltermlib
4491 sprintf int
4492
4493 ------------------------------
4494
4495 Subject: Removing duplicate messages (Bourne)
4496 From: Jerry Peek <jpeek at jpeek.com>
4497 Date: 20 Nov 1995 18:51:24 GMT
4498
4499   Here's a simple-minded Bourne shell version.  It uses
4500   "scan" to get the message number and message-id of each message.  If
4501   a message has the same message-id as the previous message, the
4502   script adds its message number to the "remove" shell variable.
4503
4504
4505         #!/bin/sh
4506         lastmsgid=hahahaha
4507         remove=
4508         scan -width 300 -format '%(msg) %{message-id}' |
4509         while read msg msgid; do
4510             if [ "$msgid" = "$lastmsgid" ]; then
4511                 remove="$remove $msg"
4512             else
4513                 lastmsgid="$msgid"
4514             fi
4515         done
4516         rmm $remove
4517
4518   That's pretty simple-minded.  For example, if the $remove variable
4519   gets too big, your system may complain.  And I'm sure there are some
4520   more-efficient ways to find the list of duplicate message-ids.  But
4521   that's the idea.
4522   
4523 Subject: Removing duplicate messages (Perl)
4524 From: rtor at ansa.co.uk (Owen Rees)
4525 Date: 20 Nov 1995 12:39:47 GMT
4526
4527   I wrote a perl script to do this some time ago. All the usual dire
4528   warnings about destructive technology apply - take a backup, do it on
4529   a copy, try it on a small test case first etc. Don't use this script
4530   unless you are prepared to accept the consequences.
4531
4532 #!/usr/local/bin/perl
4533
4534 $version = "rmmdup 1";
4535
4536 if (@ARGV == 0) { $folder = ""; }
4537 elsif (@ARGV == 1) { $folder = $ARGV[0];
4538                      unless ( $folder =~ /^\+.+$/ )
4539                       { die "usage $0 [+folder]\n"; };
4540                    }
4541 else { die "usage $0 [+folder]\n"; };
4542
4543 $rmmlist = "";
4544
4545 open (scan, "scan $folder -format '%(msg) %{message-id}'|");
4546 while (<scan>)
4547  { if ( ($msg,$msgid) = /^(\d+) (<.*>)$/)
4548     { if ($msgs{$msgid})
4549        { print "$msg duplicates $msgs{$msgid}\n";
4550          $rmmlist .= " $msg";
4551        }
4552       else { $msgs{$msgid} = $msg; };
4553     };
4554  };
4555 if ( $rmmlist ) { exec "rmm $folder $rmmlist"; };
4556 exit;
4557
4558 Subject: Removing duplicate messages (Perl)
4559 From: Bill Wohler <wohler at newt.com>
4560 Date: Sun, 17 Oct 2004 13:00:20 -0700
4561
4562 #!/usr/bin/perl -w
4563 #
4564 # Id: mhfinddup 6593 2004-09-02 16:34:24Z wohler 
4565
4566 =head1 NAME
4567
4568 mhfinddup - find duplicate messages
4569
4570 =head1 SYNOPSIS
4571
4572 mhfinddup [options] [folder ...]
4573
4574 =head1 DESCRIPTION
4575
4576 B<mhfinddup> finds and removes duplicate MH messages in the folders listed on
4577 the command line (default: current folder). By default, you deal with
4578 duplicate messages interactively. You can either remove the duplicate, not
4579 remove the duplicate, or view the original and duplicate message before
4580 deciding.
4581
4582 If you use the B<-msgid> option to B<send>, then you probably don't want to
4583 list any F<+outbox> folders if you are using the B<--no-same-folder> option
4584 and you want to preserve your sent messages as well as your messages to
4585 mailing lists.
4586
4587 Note that if you specify one or more folders, or if you use the B<--all>
4588 option, B<mhfinddup> recursively descends the given folders.
4589
4590 =head1 CONTEXT
4591
4592 Context is per B<flist>(1). That is, if F<+folder> is given, it will become
4593 the current folder. If multiple folders are given, the last one specified will
4594 become the current folder.
4595
4596 =head1 OPTIONS
4597
4598 =over 4
4599
4600 =item --all
4601
4602 Look for duplicates in all folders. If any folders are specified, this option
4603 is ignored.
4604
4605 =item --debug
4606
4607 Turn on debugging messages.
4608
4609 =item --help
4610
4611 Display the usage of this command.
4612
4613 =item --list
4614
4615 List duplicated messages.
4616
4617 =item --no-same-folder
4618
4619 Since it is common to use C<refile -link> to file a message in multiple
4620 folders, this script doesn't consider messages in different folders to be
4621 duplicates. Specify this option to list or remove duplicates across folders.
4622
4623 =item --rmm
4624
4625 Remove messages non-interactively. Use with care! For safety, the B<--list>
4626 option takes precedence if specified and is a good option to use before using
4627 B<--rmm>.
4628
4629 =item --version
4630
4631 Display program version.
4632
4633 =back
4634
4635 =head1 RETURN VALUE
4636
4637 Returns 0 if all is well; non-zero otherwise.
4638
4639 =head1 EXAMPLES
4640
4641 =over 0
4642
4643 =item mhfinddup
4644
4645 Interactively remove duplicates from the current folder.
4646
4647 =item mhfinddup --all --list --no-same-folder
4648
4649 List all duplicates regardless if they are in different folders or not.
4650
4651 =item mhfinddup --rmm +lists
4652
4653 Remove all duplicates in F<+lists>, recursively.
4654
4655 =back
4656
4657 =head1 SEE ALSO
4658
4659 B<rmm>(1), B<mhl>(1), B<scan>(1)
4660
4661 =head1 VERSION
4662
4663 Revision: 6593 
4664
4665 =head1 AUTHOR
4666
4667 Bill Wohler <wohler at newt.com>
4668
4669 Copyright (c) 2003 Newt Software. All rights reserved.
4670
4671 This program is free software; you can redistribute it and/or
4672 modify it under the terms of the GNU General Public License
4673 as published by the Free Software Foundation; either version 2
4674 of the License, or (at your option) any later version.
4675
4676 This program is distributed in the hope that it will be useful,
4677 but WITHOUT ANY WARRANTY; without even the implied warranty of
4678 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4679 GNU General Public License for more details.
4680
4681 You should have received a copy of the GNU General Public License
4682 along with this program; if not, you can find it at
4683 http://www.gnu.org/copyleft/gpl.html or write to the Free Software
4684 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
4685
4686 =head1 METHODS
4687
4688 =cut
4689
4690 # Packages and pragmas.
4691 use Getopt::Long;
4692
4693 use strict;
4694
4695 # Constants.
4696 my $cmd;                                # name by which command called
4697 ($cmd = $0) =~ s|^\./||;                # ...minus the leading ./
4698 my $ver = '6593';                       # program version with CVS noise
4699
4700 # Variables (may be overridden by arguments).
4701 my $all = 0;                            # look in all folders
4702 my $debug = 0;                          # verbose mode
4703 my $help = 0;                           # display usage
4704 my $version = 0;                        # display version
4705 my $list = 0;                           # list duplicates
4706 my $no_same_folder = 0;                 # consider duplicates across folders
4707 my $rmm = 0;                            # remove duplicates without asking
4708
4709 # Constants.
4710 my $mhl = "/usr/lib/mh/mhl";
4711 my $tmp = "/tmp/mhfinddup$$";
4712
4713 # Parse command line.
4714 # The use of the posix_default option is to ensure that folders like +a are
4715 # not confused with --all. I'd really prefer to set prefix_pattern to "(--|-)"
4716 # so that abbreviations of options can be used without being confused with
4717 # folders, but I couldn't make it so.
4718 my %opts;
4719 Getopt::Long::Configure("pass_through", "posix_default");
4720 GetOptions('all'                => \$all,
4721            'debug'              => \$debug,
4722            'help'               => \$help,
4723            'list'               => \$list,
4724            'no-same-folder'     => \$no_same_folder,
4725            'rmm'                => \$rmm,
4726            'version'            => \$version,
4727           ) or usage();
4728
4729 show_version() if ($version);
4730 usage() if ($help || int(@ARGV) != int(map(/^\+/, @ARGV)));
4731
4732 my @folders = expand_folders(@ARGV);
4733 print("Expanded " . join(" ", @ARGV) . " into\n" . join("\n", @folders) . "\n")
4734     if ($debug);
4735
4736 print("Scanning for duplicate messages...\n");
4737 my %msgs;
4738 foreach my $folder (sort @folders) {
4739     print("Scanning $folder...\n") if ($debug);
4740     open (SCAN,
4741           "MHCONTEXT=$tmp scan +$folder -format '%(msg) %{message-id}'|");
4742     while (<SCAN>) {
4743         if (my ($msg, $msgid) = /^(\d+) (<.*>)$/) {
4744             if ($msgs{$msgid}) {
4745                 $msgs{$msgid} =~ m|^\+(.*)/(\d+)$|;
4746                 my($f, $m) = ($1, $2);
4747                 if ($folder eq $f || $no_same_folder) {
4748                     handle_dup($f, $m, $folder, $msg);
4749                 }
4750             } else {
4751                 $msgs{$msgid} = "+$folder/$msg";
4752             }
4753         }
4754     }
4755     close(SCAN);
4756 }
4757
4758 unlink("$tmp");
4759
4760 sub expand_folders {
4761     my @folders = @_;
4762
4763     print("Getting list of folders...");
4764     open(FOLDERS,
4765          "flist -recurse "
4766           . (($all == 1 && @folders == 0) ? "-all" : join(" ", @folders))
4767           . "|")
4768         or die("Could not determine folders\n");
4769     @folders = ();
4770     chomp(my $current_folder = `mhparam Current-Folder`);
4771     $current_folder = quotemeta($current_folder);
4772     while (<FOLDERS>) {
4773         chomp;
4774         my ($folder, $a, $b, $c, $d, $e, $f, $g, $count) = split;
4775         if ($folder =~ /^$current_folder\+$/) {
4776             $folder =~ s/\+$//; # remove current folder indication
4777         }
4778         next if ($count == 0);
4779         push(@folders, $folder);
4780     }
4781     close(FOLDERS);
4782     print("done\n");
4783
4784     return(@folders);
4785 }
4786
4787 sub handle_dup {
4788     my($f1, $m1, $f2, $m2) = @_;
4789
4790     my $ans;
4791
4792  repeat:
4793     print("+$f2/$m2 duplicate of +$f1/$m1");
4794
4795     if ($list) {
4796         print("\n");
4797     } else {
4798         if ($rmm) {
4799             $ans = "y";
4800             print("\n");
4801         } else {
4802             print(", remove? [Yns?] ");
4803             chomp($ans = <STDIN>);
4804         }
4805
4806         if ($ans eq "y" || $ans eq "") {
4807             system("rmm +$f2 $m2");
4808         } elsif ($ans eq "s") {
4809             system("$mhl `mhpath +$f1 $m1` `mhpath +$f2 $m2`");
4810             goto repeat;
4811         } elsif ($ans eq "?") {
4812             print("y, remove message (default)\n" .
4813                   "n, don't remove message\n" .
4814                   "s, show messages\n" .
4815                   "?, show this message\n");
4816             goto repeat;
4817         }
4818     }
4819 }
4820
4821 \f
4822 =head2 usage
4823
4824 Display usage information and exit.
4825
4826 =cut
4827
4828 sub usage {
4829     print <<EOF;
4830 Usage: $cmd [options] [folder ...]
4831 --all                   remove duplicates in all folders
4832 --debug                 print actions that program takes
4833 --help                  display this message
4834 --list                  list duplicates only
4835 --no-same-folder        consider duplicates even if in different folders
4836 --rmm                   remove duplicates without asking
4837 --version               display program version
4838 EOF
4839     exit(1);
4840 }
4841
4842 =head2 show_version
4843
4844 Display version information and exit.
4845
4846 =cut
4847
4848 sub show_version {
4849     print("$cmd version $ver\n".
4850           "Copyright (c) 2003 Bill Wohler <wohler at newt.com>\n\n".
4851           "$cmd comes with ABSOLUTELY NO WARRANTY.\n\n".
4852           "This is free software, and you are welcome\n".
4853           "to redistribute it under certain conditions.\n\n".
4854           "See `http://www.gnu.org/copyleft/gpl.html' for details.\n");
4855     exit(0);
4856 }
4857
4858
4859 Local Variables:
4860 mode: outline
4861 outline-regexp: "^Subject:"
4862 fill-prefix: "  "
4863 End: