nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Attachments question


From: David Levine
Subject: Re: [Nmh-workers] Attachments question
Date: Thu, 30 Aug 2007 11:07:38 -0400

Jerry writes:

> Check the mhbuild(1) manpage or the online book section 
> http://rand-mh.sourceforge.net/book/mh/cosemime.html (which is a bit out 
> of date but may be easier to start with).

An alternative to mhbuild is to use the whatnow "attach"
command included in modern nmh.  It hides the mhbuild
commands.  See the send and whatnow man pages.

"Modern" here means since August 2002, I think, though
support for the attachformat option shown below was added in
February 2006.

To use:

0) Add "-attach X-MH-Attachment" to the send: and whatnow: lines in
   your .mh_profile.  Mine look like:

send: -forward -msgid -attach X-MH-Attachment -attachformat 1
whatnow: -attach X-MH-Attachment

   And, add some mhshow-suffix entries for the content types that you
   send, if you don't already have them.  I use these:

#### The mhshow-suffix entries are necessary to get the:
#### proper application type with -attach X-MH-Attachment:
mhshow-suffix-text/plain: .output
mhshow-suffix-text/plain: .txt
mhshow-suffix-text/plain: .xml
mhshow-suffix-text/html: .html
mhshow-suffix-image/jpeg: .jpg
mhshow-suffix-application/msword: .doc
mhshow-suffix-application/pdf: .pdf
mhshow-suffix-application/PostScript: .ps
mhshow-suffix-application/vnd.ms-excel: .xls
mhshow-suffix-application/vnd.ms-powerpoint: .ppt

For tar files, something like these should work:
mhshow-suffix-application/x-tar: .tar
mhshow-suffix-application/x-compressed-tar: .tgz

1) At the whatnow prompt, enter:

attach /tmp/foobar.tgz


Then send as usual.  You won't get a chance to preview the mime
output, but I've gained so much confidence with it that I no
longer feel the need to.

Some tips:

* attach allows shell wild cards.
* ls can be used at the whatnow prompt to look for your files.
* al[ist] can be used at the whatnow prompt to show what
  you've attached.  det[ach] can be used to delete
  attachments.  And if you really want, you can edit the
  message to change attachments, though I reserve that for
  reordering.
* Cc: or Dcc: yourself if you want to see what was sent.

David

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]