{
    "content": [
        {
            "type": "text",
            "text": "# MH-MIME(7mh) (man)\n\n**Summary:** mh-mime - overview of nmh MIME message composition and display\n\n## See Also\n\n- comp(1)\n- iconv(3)\n- mh-format(5)\n- mhbuild(1)\n- mhfixmsg(1)\n- mhparam(1)\n- nmh(7)\n- repl(1)\n- now(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (6 lines) — 5 subsections\n  - Local Character Set Conversion (10 lines)\n  - Message Display (9 lines)\n  - Message Interrogation and Storage (5 lines)\n  - Message Composition and Reply (35 lines)\n  - Message Rewrite (6 lines)\n- **SEE ALSO** (5 lines)\n- **BUGS** (5 lines)\n\n## Full Content\n\n### NAME\n\nmh-mime - overview of nmh MIME message composition and display\n\n### DESCRIPTION\n\nThe  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\n#### Local Character Set Conversion\n\nAll  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 the mhparam(1) man page  for  how  to\ndetermine whether 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\n#### Message Display\n\nThe  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\n#### Message Interrogation and Storage\n\nThe 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\n#### Message Composition and Reply\n\nAll  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\n#### Message Rewrite\n\nThe 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\n### SEE ALSO\n\ncomp(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\n### BUGS\n\nMIME support should be more integrated into all of the nmh tools than it currently is.\n\n\n\nnmh-1.7.1                                    2014-12-15                                 MH-MIME(7mh)\n\n"
        }
    ],
    "structuredContent": {
        "command": "MH-MIME",
        "section": "7mh",
        "mode": "man",
        "summary": "mh-mime - overview of nmh MIME message composition and display",
        "synopsis": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "Local Character Set Conversion",
                        "lines": 10
                    },
                    {
                        "name": "Message Display",
                        "lines": 9
                    },
                    {
                        "name": "Message Interrogation and Storage",
                        "lines": 5
                    },
                    {
                        "name": "Message Composition and Reply",
                        "lines": 35
                    },
                    {
                        "name": "Message Rewrite",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}