{
    "mode": "man",
    "parameter": "dist",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/dist/1/json",
    "generated": "2026-09-18T23:55:18Z",
    "synopsis": "dist [-help] [-version] [+folder] [msg] [-form formfile] [-annotate | -noannotate] [-inplace\n| -noinplace] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor edi‐\ntor] [-noedit] [-width columns] [-from address] [-to address] [-cc address] [-fcc\n+folder] [-whatnowproc program] [-nowhatnowproc] [-atfile] [-noatfile]",
    "sections": {
        "NAME": {
            "content": "dist - distribute an nmh message to additional addresses\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dist [-help] [-version] [+folder] [msg] [-form formfile] [-annotate | -noannotate] [-inplace\n| -noinplace] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor edi‐\ntor] [-noedit] [-width columns] [-from address] [-to address] [-cc address] [-fcc\n+folder] [-whatnowproc program] [-nowhatnowproc] [-atfile] [-noatfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dist  is  similar to forw.  It prepares the specified message for redistribution to addresses\nthat (presumably) are not on the original address list.\n\nThe default message form contains the following elements:\n\nResent-From: {from switch} or <Local-Mailbox> or <username@hostname>\nResent-To: {to switch} or blank\nResent-cc: {cc switch} or blank\nResent-fcc: {fcc switch} or blank\n\nIf a file named “distcomps” exists in the user's nmh directory, it will be  used  instead  of\nthis  default  form.  You may specify an alternate forms file with the switch -form formfile.\nForms are processed via the nmh template system; see mh-format(5)  for  details.   Components\nfrom the redistributed message are available as standard component escapes in the forms file.\n\nIn  addition  to  the standard mh-format(5) escapes, the following component escapes are also\nsupported:\n\nEscape    Returns   Description\nfcc       string    Any folders specified with `-fcc folder'\nnmh-from  string    Addresses specified with `-from address'\nnmh-to    string    Addresses specified with `-to address'\nnmh-cc    string    Addresses specified with `-cc address'\n\nSee forw(1) for descriptions of the -from, -to, -cc, and -fcc switches.\n\nIf the draft already exists, dist will ask you as to the disposition of the draft.   A  reply\nof  quit  will  abort dist, leaving the draft intact; replace will replace the existing draft\nwith a blank skeleton; and list will display the draft.\n\nOnly those addresses in “Resent-To:”, “Resent-cc:”, and “Resent-Bcc:” will be sent.  Also,  a\n“Resent-Fcc:  folder”  will  be honored (see send(1)).  Note that with dist, the draft should\ncontain only “Resent-xxx:” fields and no body.  The headers and the body of the original mes‐\nsage are copied to the draft when the message is sent.  Use care in constructing the  headers\nfor the redistribution.\n\nBecause the draft is minimal, the prompter(1) editor is quite useful with dist.\n\nIf  the  -annotate switch is given, the  message being distributed will be annotated with the\nlines:\nResent: date\nResent: addrs\nwhere each address list contains as many lines as required.  This  annotation  will  be  done\nonly  if the message is sent directly from dist.  If the message is not sent immediately from\ndist, “comp -use” may be used to re-edit and send the constructed message,  but  the  annota‐\ntions  won't  take  place.   Normally  annotations are done in place in order to preserve any\nlinks to the message.  You may use the -noinplace switch to change this.\n\nSee comp(1) for a description of the -editor and -noedit switches.  Note that  while  in  the\neditor,  with  -atfile  and if the current directory is writable, the message being resent is\navailable through a link named “@” (assuming the default whatnowproc).  In addition, the  ac‐\ntual pathname of the message is stored in the environment variable $editalt, and the pathname\nof  the  folder  containing the message is stored in the environment variable $mhfolder.  The\ncreation of the “@” file is controlled via the -atfile and -noatfile options.\n\nThe -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility.\nThis is an advanced (and highly useful) feature.  Consult mh-draft(5) for more information.\n\nUpon exiting from the editor, dist will invoke the whatnow program.   See  whatnow(1)  for  a\ndiscussion  of  available  options.  The invocation of this program can be inhibited by using\nthe -nowhatnowproc switch.  (In fact, it is the whatnow  program  which  starts  the  initial\nedit.  Hence, -nowhatnowproc will prevent any edit from occurring.)\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/nmh/distcomps  The default message skeleton.\n<mh-dir>/distcomps  The user's message skeleton.\n$HOME/.mhprofile   The user's profile.\n<mh-dir>/draft      The draft file.\n",
            "subsections": []
        },
        "PROFILE COMPONENTS": {
            "content": "Path:               To determine the user's nmh directory.\nCurrent-Folder:     To find the default current folder.\nDraft-Folder:       To specify the default draftfolder.\nEditor:             To override the default editor.\nfileproc:           Program to refile the message.\nwhatnowproc:        Program to ask the “What now?” questions.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "comp(1), forw(1), mh-draft(5), prompter(1), repl(1), send(1), whatnow(1)\n",
            "subsections": []
        },
        "DEFAULTS": {
            "content": "+folder             The current folder.\nmsg                 The current message.",
            "subsections": [
                {
                    "name": "-noannotate",
                    "content": ""
                },
                {
                    "name": "-nodraftfolder",
                    "content": ""
                },
                {
                    "name": "-inplace",
                    "content": ""
                },
                {
                    "name": "-noatfile",
                    "content": ""
                }
            ]
        },
        "CONTEXT": {
            "content": "If a folder is given, it will become the current folder.  The message distributed will become\nthe current message.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "dist  originally used headers of the form “Distribute-xxx:” instead of “Resent-xxx:”.  In or‐\nder to conform with the ARPA Internet standard, RFC 822, the “Resent-xxx:” form is now  used.\ndist  will  recognize  “Distribute-xxx:”  type headers and automatically convert them to “Re‐\nsent-xxx:”.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "dist does not rigorously check the message being distributed for adherence to  the  transport\nstandard,  but  post  called  by  send  does.  The post program will balk (and rightly so) at\npoorly formatted messages, and dist won't correct things for you.\n\nIf whatnowproc is whatnow, then comp uses a built-in whatnow, it does not  actually  run  the\nwhatnow program.  Hence, if you define your own whatnowproc, don't call it whatnow since comp\nwon't run it.\n\nnmh-1.8                                      2022-12-22                                    DIST(1mh)",
            "subsections": []
        }
    },
    "summary": "dist - distribute an nmh message to additional addresses",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "comp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/comp/1/json"
        },
        {
            "name": "forw",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/forw/1/json"
        },
        {
            "name": "mh-draft",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mh-draft/5/json"
        },
        {
            "name": "prompter",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/prompter/1/json"
        },
        {
            "name": "repl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/repl/1/json"
        },
        {
            "name": "send",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/send/1/json"
        },
        {
            "name": "whatnow",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/whatnow/1/json"
        }
    ]
}