
Integrating Mapil with MH
-------------------------

	Because MH message files already exist in the format required
my Mapil, you can run Mapil directly on the message files, both
incoming messages and draft messages that you are about to send.
Mapil's command line options and flexibility should make it easy to
work into scripts.


		Mhmapil
		-------

	I have written a short example utility called 'mhmapil' that
may save you typing.

	Although it is written in python and may be slower to load
than a shell script, the interpreter will already be in memory when
Mapil loads, so Mapil should load faster.

The syntax is:

	mhmapil [+folder] message [mapil options]
or
	mhunmapil [+folder] message

	If called as 'mhmapil', the script will get the full pathname
of the message from mhpath (this must be in your path), move the
message to message.mapil, and then run mapil with the infile as
message.mapil and the outfile as the original message.  Because it
uses mhpath, you can use designations like 'cur' or 'prev'.

	So, for example, if you wanted to encrypt with the dump
protocol the current message in the drafts folder, you could:

	mhmapil +drafts cur -E -p dump

To decrypt message 232 in the current folder, you could:

	mhmapil 232

	If called as 'mhunmapil', the script will move the .mapil
file, back to the original.  So, if you prefer keeping your messages
encrypted on disk, you can use mhmapil to restore the encrypted file
back to the orginial message.  In the previous example, after 'mhmapil
232',

	mhunmapil 232

would undo any changes.  If you like your messages unencrypted on
disk, you could arrange for an event or script to remove all the
.mapil files.


		Encoding a message
		------------------

	Although you can use 'mhmapil +drafts cur' or Mapil directly
to sign or encrypt your draft messages, it is probably most convenient
from the 'What Now?' menu.  To process the message with Mapil, just
type in:

	edit mapil [switches]

and mapil will be run on the draft with the desired switches.  You may
be able to save even more typing if you set the <lasteditor>-next:
and/or Editor: values in your mh_profile so mapil is the next default
editor.  Then you could just type:

	edit

