
Integrating Mapil with Exmh
---------------------------

	Exmh already has P/MIME support, with a number of extra
features (pretty MIME formatting, passphrase keeping on timeout
system, P/MIME in message/rfc's in subparts, etc) so PGP 2.6 users
would probably be best off using exmh's PGP support for decrypting
messages made with PGP 2.6 or earlier.

	However, Mapil supports PGP 5.0, which exmh does not, and it
has a few advantages when sendings messages, like the flexible
.mapilpolicies file, and rigid adherence to the P/MIME spec (quoting
of From lines, long lines, etc) which Exmh doesn't.


Instructions:

	To add Mapil menu options to exmh, you need to 1) install
Mapil, 2) install the tcl code in mapil.tcl, 3) add mapil specific
preferences, and 4) edit your .mh_profile.  Steps 2-4 are outlined
below.

	2) Put the mapil.tcl file either in the global exmh directory
(probably /usr/local/lib/exmh-<version>) or the user tk directory
(probably ~/.tk/exmh).  Then update the index (e.g. "auto_mkindex
*.tcl" under wish).  See the "Programming Exmh" section of the
exmh-custom manual page for more infomation.

	The two functions in mapil.tcl are actually not Mapil
specific, but provide hooks for any external program.  I think the
code could be added to the next version of exmh.

	3) Add the lines given in exmh-defaults-additions to a
resources file, either app-defaults in the global exmh directory or
.exmh-defaults in the users home directory.

	4) If you don't edit your mh profile, exmh will not know that
you want to see X-Mapil headers prominently.  Just add the following
line to ~/.mh_profile:

header-display: subject from date to cc newsgroups x-mapil


What this does for you:

	Under sedit More... menu there will be a 'Process with Mapil'
option that opens an xterm and runs 'mapil -C draft' in it.  If you
want to add more options to the menu, such as invoking mapil with
different arguments, you can simply edit your resources file.  No 
new tcl should be necessary.

	There will also be a Mapil... menu added to the message
operations menu, right above the message.  There are three options.
The first runs mapil in an xterm, the second runs mhmapil in an xterm,
and the third runs mhunmapil without an xterm.  The mhmapil and
mhunmapil commands will only work if you have mhmapil and mhunmapil
installed; see ../mh/README-MH for details.  If you want to run mapil
with arguments, or without an xterm, etc, you will just need to edit
your .exmh-defaults.  Again, no tcl code should be necessary.


Additional notes:

	Thanks to Hal Devore who wrote some of the tcl code.

