What is MIME?
What Athena mail programs (a.k.a. Mail User Agents or MUAs) support MIME attachments?
How does MIME support work on Athena?
Can I customize or disable the MIME display behavior?
How do I send a MIME attachment?
I set up my account previously to use the mime locker, should I change anything?
When you show a message with a MIME attachment, you will usually see something like this:
Hi Fred, here's the latest revision to Chapter 6. part 2 application/octet-stream 149K Press return to view PDF document, Type Control-C to cancelIf you press the
Return
key, the attachment will be opened in an
appropriate viewing application (in this case, the Adobe Acrobat reader). If you
type Control-C
, the attachment will be skipped, and the rest of the
message will be shown.
Note: Earlier Athena releases included MIME support for MH, but some user configuration was required to open attachments automatically. If you previously set up your account to use the scripts in the mime locker, you should now revert those changes to make sure you're getting all of the current defaults.
If the file type of the attachment is not recognized or nmh is not configured to display it automatically, you can save the file as explained below and try to find an application with which to view it (either on Athena or on a Mac or PC). Before putting too much effort into this, it's a good idea to ask the sender what type of file it is (including the version number of the application used to create it), and whether the sender can make it available in another format if you don't have access to an application that can open the original.
Here it is...make sure the speakers are ON but the volume is very, very low part 2 application/zip 557K Unknown content type application/zip Use mhstore to store this data to disk.If you just type
mhstore
, it will save each part of the current message,
with a filename of the form message#.part#.ext (by default, to the current
directory). The message text is usually the first part, and each attachment is
an additional part. For example:
athena% mhstore storing message 3 part 1 as file 3.1.txt storing message 3 part 2 as file 3.2.zipTo save only the attachment, you must specify its part number:
athena% mhstore -part 2 storing message 3 part 2 as file 3.2.zipIf you don't have the part number handy from the earlier show command, you can see a list of all the parts by using the mhlist command:
athena% mhlist msg part type/subtype size description 3 multipart/mixed 753K 1 text/plain 141 2 application/zip 557KNotes on using
mhstore
:
mhstore
and mhlist
default
to the current message; to specify a different one, simply add the message
number before any other options. For example, to specify message 4 rather
than the current message:
athena% mhlist 4 athena% mhstore 4 -part 3
mhstore
will save
over it without warning.
-auto
option. For example:
athena% mhstore -part 2 -auto storing message part 2 as file HoHoHo.zip(How well this works depends on how the header was constructed by the sender's mail program, and on whether the filename starts with any unusual characters.)
mhstore
saves to your current working directory unless you
have a directory for "nmh-storage" defined in your ~/.mh_profile
.
For example, if you always want to save parts to the /tmp directory you would
use the line:
nmh-storage: /tmpNote that this may not work for parts saved with the
-auto
switch.
athena% file filenameor the SIPB version, which may recognize other file formats:
athena% add sipb athena% /mit/sipb/bin/file filenameIf this doesn't tell you anything useful, look carefully at the show prompt again for hints. For example:
athena% show part 1 application/octet-stream 13K Unknown content type application/vnd.ms-excel Use mhstore to store this data to disk.(although the part description "application/octet-stream" doesn't help, from the next line it appears that the filetype is Excel).
Finally, you can run mhstore -auto to try and save the attachment with its original filename to see if the name or extension tells you anything:
athena% mhstore -auto storing message 14 part 1 as file nonsense.xls
MSOffice files:
If the message includes test which begins something like this:
begin 666 Letter_to_depts_re_renewal.doc MT,\1X*&Q&N$`````````````````````/@`#`/[_"0`&```````````````! M````10``````````$ ``2 ````$```#^____`````$8```#_____________it is uuencoded. You can decode it as follows:
athena% show | uudecode(The file will be decoded to its original name in the current directory.)
If the attachment is a BinHex file (an encoding type often used on Mac files), you can decode it as follows:
athena% add consult athena% xbin filenameThis will silently unravel the BinHex file and leave three additional files. The file with the extension .data is the file with the MIME content, the others can be discarded.
athena% /mit/sipb/bin/file testfile.*will return the following:
testfile.data: Microsoft Word 6.0 Document testfile.doc: BinHex binary text, version 4.0 testfile.info: data testfile.rsrc: data
exmh is graphical interface to MH which is configured to handle MIME messages. (Note: this program is maintained by the SIPB, not IS. It is based on MH, and there are no general problems going back and forth between the two. There is a known problem handling mail from exmh when an account goes over quota.)
To run exmh from an Athena workstation:athena% add sipb athena% exmh &The non-text parts of a MIME message are labelled separately; pressing the right mouse button over each label brings up a menu of options for saving or otherwise handling that part.
Documentation on exmh
athena% man exmh
online help within exmh
Manual and extensive FAQ.
For information on configuring your Athena account to use Netscape mail, see Athena Consulting's stock answer on how to use Netscape Mail.
Top
variable | customization |
---|---|
MU_HTML html | display HTML mail in a web browser |
MU_MSWORD frame | display Word documents in FrameMaker (rather than as text) |
MU_MSWORD html | display Word Documents as HTML in a web browser (it will fall back to Frame in the case of Word 6 or Word 7 files, which can't currently display as html) |
MU_EXCEL frame | display Excel documents in FrameMaker rather than Xess (depending on the version of the file, one application may be more successful than the other) |
MU_AUDIO no | prevent any playing of audio attachments |
NOMHNPROC | disable automatic display of MIME attachments (if you set this, you can still manually invoke MIME display by using mhshow instead of show) |
To make one of these changes the behavior, use the setenv command with the corresponding variable above. For example:
athena% setenv MU_MSWORD framewould cause Word docs to be opened in FrameMaker, while
athena% setenv NOMHNPROCwill disable automatic MIME display.
If you want to make a customization permanent, add the setenv line
to your ~/.environment
file and it will take effect at your next
login. (For general information about environment variables and customizing
your Athena account, see the IS Publication Working
with Configuration Files ("Dotfiles") .)
First, use a text editor to write a message to accompany the encoded file. Then at the Athena prompt do:
athena% add graphics athena% mpack -m 0 -d messagefile file-to-encode recipient-address(Setting the "-m" option to zero means that there is no limit to size of the generated message). You will be prompted only for the Subject before the mail is sent. For example:
athena% mpack -m 0 -d /tmp/msg /tmp/HoHoHo.zip ajfox Subject: Claus testNote: the -m flag can be used to split the file into several separate messages of a specified maximum size. See the man page for more details.
~/.environment
files:
add mime source /mit/mime/share/setup.cshor if you are a bash user, remove from your
~/.profile
:
add mime . /mit/mime/share/setup.sh