{
    "mode": "man",
    "parameter": "mh-mime",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/mh-mime/7/json",
    "generated": "2026-11-12T10:31:20Z",
    "sections": {
        "NAME": {
            "content": "mh-mime - overview of nmh MIME message composition and display\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  acronym  MIME  stands  for Multipurpose Internet Mail Extensions, the format of Internet\nmessages used to send multi-media content.  The nmh command suite has support for the display\nand composition of MIME messages, but currently MIME support  is  not  completely  integrated\ninto  all  tools.   This document provides an overview as to which tools support MIME message\ndisplay, storage, and composition.\n",
            "subsections": [
                {
                    "name": "Local Character Set Conversion",
                    "content": "All of the nmh commands convert non-native character sets to  the  local  character  set,  as\nspecified by the operating system locale settings.  See locale(1) for more details on the en‐\nvironment  variables used to set the local character set.  Character set conversion will only\ntake place if nmh was built with iconv(3) support.   See  mhparam(1)  for  how  to  determine\nwhether your nmh installation includes iconv(3) support.\n\nDepending on the source and target character set, it may not be possible to convert all char‐\nacters  to  the  local character set.  In this case a substitution character will be used for\nthe characters that cannot be converted.\n"
                },
                {
                    "name": "Message Display",
                    "content": "The default format used by scan(1) will automatically decode MIME-encoded  headers.   If  you\nhave  a custom scan format, see the examples provided with the nmh distribution (found in the\n“/etc/nmh” directory) and mh-format(5) for details on how to make sure your MIME headers  are\nproperly decoded.\n\nBy  default, if show detects that it is reading a MIME message it will invoke mhshow(1).  The\ndefault behavior of mhshow is to only display text parts that are not marked as  attachments.\nSee mhshow(1) for details on how to control what mhshow will display.\n"
                },
                {
                    "name": "Message Interrogation and Storage",
                    "content": "The  mhlist(1)  command  will display a listing of the MIME parts contained within a message.\nThat information can be used in conjunction with the mhstore command to save individual parts\nor content types of a message.  See mhlist(1) and mhstore(1) for more details  on  how  these\ncommands work.\n"
                },
                {
                    "name": "Message Composition and Reply",
                    "content": "All  messages  sent  by  send(1)  will  automatically be processed by mhbuild(1) before being\npassed to post(1) for message submission.  mhbuild will use the locale settings to mark  text\ncontent  with the appropriate character set and apply any necessary encoding.  If you wish to\ninclude text in your message using a character set that does not match your locale, you  will\nneed  to specify the character set using an mhbuild directive; see mhbuild(1) for more infor‐\nmation.\n\nFor attaching files or composing other non-text content, there are two  options:  the  attach\nsystem and mhbuild directives.\n\nThe  attach system is best suited for content where one or more files are being attached to a\nmessage.  You can use the attach system by either using the attach command at the “What now?”\nprompt, or by inserting an “Attach:” header in the message draft containing the name  of  the\nfile  you  wish  to  attach to the message (note that all the attach command does is place an\n“Attach:” header in the message draft).  mhbuild will then automatically include  the  speci‐\nfied  file(s) in the outgoing message.  See send(1) for details on how mhbuild determines the\nproper content type of attached files.\n\nThe other method of composing MIME messages is to use mhbuild directives.  This allows  exact\ncontrol  over the contents and format of the MIME message, but has a more complicated syntax.\nmhbuild(1) contains details on the directive syntax and examples of directives for  different\nmedia  types.   It  is important to note that when using mhbuild directives the user must run\nmhbuild outside of send to have it process directives; when being run  by  send,  mhbuild  is\nconfigured  to  not  process  directives so normal user text is not mistaken for a directive.\nWhen using directives a user typically uses the mime command at the  “What  now?”  prompt  to\nprocess them.\n\nWhen  replying  to messages using repl(1) the traditional MH method of including the original\ntext in the reply does not interoperate with  MIME  messages.   The  -convertargs  switch  to\nrepl(1)    provides    one    solution.     Another    solution:    the   contrib   directory\n(/usr/share/doc/nmh/contrib) contains a Perl program called  replyfilter  which  will  decode\ntext  parts and present them in an appropriate manner to be included in a message reply.  See\nthe comments at the top of replyfilter for instructions on how to configure nmh to work  with\nit.\n"
                },
                {
                    "name": "Message Rewrite",
                    "content": "The  mhfixmsg(1) command can apply various transformations to MIME messages, including decod‐\ning of text parts, converting the character set of text parts, and  insertion  of  text/plain\nparts  to  correspond  to  text parts of other subtypes.  mhfixmsg can also repair defects in\nMIME messages, such as mismatched top-level boundary indicators and invalid Content-Transfer-\nEncoding values.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "comp(1), iconv(3), mh-format(5), mhbuild(1), mhfixmsg(1), mhparam(1), nmh(7), repl(1),  what‐\nnow(1),\n/usr/share/doc/nmh/contrib/replyfilter,\n/usr/share/doc/nmh/contrib/replaliases\n",
            "subsections": []
        },
        "BUGS": {
            "content": "MIME support should be more integrated into all of the nmh tools than it currently is.\n\nnmh-1.8                                      2014-12-15                                 MH-MIME(7mh)",
            "subsections": []
        }
    },
    "summary": "mh-mime - overview of nmh MIME message composition and display",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "comp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/comp/1/json"
        },
        {
            "name": "iconv",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/iconv/3/json"
        },
        {
            "name": "mh-format",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mh-format/5/json"
        },
        {
            "name": "mhbuild",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhbuild/1/json"
        },
        {
            "name": "mhfixmsg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhfixmsg/1/json"
        },
        {
            "name": "mhparam",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhparam/1/json"
        },
        {
            "name": "nmh",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/nmh/7/json"
        },
        {
            "name": "repl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/repl/1/json"
        },
        {
            "name": "now",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/now/1/json"
        }
    ]
}