{
    "content": [
        {
            "type": "text",
            "text": "# mh_profile (man)\n\n## NAME\n\nmh-profile, mhprofile - user customization for nmh message handler\n\n## DESCRIPTION\n\nEach  user of nmh is expected to have a file named .mh-profile in their home directory.  This\nfile contains a set of user parameters used by the nmh family of programs.  Each entry in the\nfile is of the format\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (3 subsections)\n- **ENVIRONMENT**\n- **FILES**\n- **SEE ALSO**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "mh_profile",
        "section": "",
        "mode": "man",
        "summary": "mh-profile, mhprofile - user customization for nmh message handler",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "mhbuild",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/mhbuild/1/json"
            },
            {
                "name": "mhshow",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/mhshow/1/json"
            },
            {
                "name": "mhstore",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/mhstore/1/json"
            },
            {
                "name": "mh-sequence",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/mh-sequence/5/json"
            },
            {
                "name": "nmh",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/nmh/7/json"
            },
            {
                "name": "post",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/post/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": [
                    {
                        "name": "Standard Profile Entries",
                        "lines": 194
                    },
                    {
                        "name": "Process Profile Entries",
                        "lines": 80
                    },
                    {
                        "name": "Profile Lookup",
                        "lines": 19
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 125,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 25,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "mh-profile, mhprofile - user customization for nmh message handler\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Each  user of nmh is expected to have a file named .mh-profile in their home directory.  This\nfile contains a set of user parameters used by the nmh family of programs.  Each entry in the\nfile is of the format\n\nprofile-component: value\n\nIf the text of a profile entry is long, you may extend it across several real  lines  by  in‐\ndenting  the continuation lines with leading spaces or tabs.  Comments may be introduced by a\nline starting with `#:':\n\n#: This is a comment.\n\nBlank lines are not permitted in .mh-profile.  Shell quoting conventions are  not  available;\neach token is separated by whitespace.\n",
                "subsections": [
                    {
                        "name": "Standard Profile Entries",
                        "content": "The  possible profile components are exemplified below.  The only mandatory entry is `Path:'.\nThe others are optional; some have default values if they are not present.  In  the  notation\nused  below,  (profile,  default) indicates whether the information is kept in the user's nmh\nprofile or nmh context, and indicates what the default value is.  Note that a profile  compo‐\nnent  can only appear once.  Multiple appearances will trigger a warning that all appearances\nafter the first are ignored.\n\nSome MH programs, including mhbuild, mhshow, and mhstore, have  specific  profile  components\nthat are described in their respective man pages.  Each component name specific to these pro‐\ngrams begins with the name of the program and is followed by a dash.\n\nPath: Mail\nLocates  nmh  transactions  in directory “Mail”.  A relative Path starts from the user's\nhome directory.  This is the only mandatory profile entry.  (profile, no default)\n\nlocale: locale\nSet the locale for all nmh programs  except  post,  install-mh,  and  slocal.   See  the\nLCALL,  LCCTYPE, and LANG variables in the \"ENVIRONMENT\" section below for a reference\non how the locale is set if this profile component is not used.\n\ncontext: context\nDeclares the location of the nmh context file.  This can be overridden by  the  environ‐\nment  variable  MHCONTEXT.   See  the  HISTORY  section below.  (profile, default: <nmh-\ndir>/context)\n\nCurrent-Folder: inbox\nKeeps track of the current open folder.  (context, default: folder specified by “Inbox”)\n\nInbox: inbox\nDefines the name of the default inbox.  (profile, default: inbox)\n\nPrevious-Sequence: pseq\nNames the sequence or sequences which should be defined as the `msgs' or `msg'  argument\ngiven to any nmh command.  If not present or empty, no such sequences are defined.  Oth‐\nerwise, for each name given, the sequence is first zeroed and then each message is added\nto the sequence.  Read mh-sequence(5) for the details about this sequence.  (profile, no\ndefault)\n\nSequence-Negation: not\nDefines  the  string  which,  when  prefixed  to a sequence name, negates that sequence.\nHence, “notseen” means all those messages that are not a member of the sequence  “seen”.\nRead mh-sequence(5) for the details.  (profile, no default)\n\nUnseen-Sequence: unseen\nNames  the sequence or sequences which should be defined as those messages which are un‐\nread.  The commands inc, rcvstore, mhshow, and show will add  or  remove  messages  from\nthese  sequences  when  they are incorporated or read.  If not present or empty, no such\nsequences are defined.  Otherwise, each message is added to, or removed from,  each  se‐\nquence  name given.  Read mh-sequence(5) for the details about this sequence.  (profile,\nno default)\n\nmh-sequences: .mh-sequences\nThe name of the file in each folder which defines public sequences.  To disable the  use\nof  public  sequences,  leave the value portion of this entry blank.  (profile, default:\n.mh-sequences)\n\natr-seq-folder: 172 178-181 212\nKeeps track of the private sequence called “seq” in the specified folder.   Private  se‐\nquences  are generally used for read-only folders.  See mh-sequence(5) for details about\nprivate sequences.  (context, no default)\n\nEditor: prompter\nDefines the editor to be used by the commands comp, dist, forw, and repl.  If  not  set,\nthe value will be taken from the VISUAL and EDITOR environment variables.  (profile, de‐\nfault: prompter)\n\nMsg-Protect: 600\nAn  octal  number which defines the permission bits for new message files.  See chmod(1)\nfor an explanation of the octal number.  Note that some filesystems, such as  FAT32,  do\nnot support removal of read file permissions.  (profile, default: 0600)\n\nFolder-Protect: 700\nAn  octal  number  which  defines  the  permission bits for new folder directories.  See\nchmod(1) for an explanation of the octal number.  (profile, default: 700)\n\ndatalocking: fcntl\nThe locking algorithm used to lock changes to any nmh data files, such as  sequences  or\ncontext.  The locking algorithm is any one of the following entries:\n\nfcntl dot flock lockf\n\nAvailable  locking  algorithms  can  vary depending on the operating system.  Note: cur‐\nrently, transactional locking is only supported on public sequences; see  mh-sequence(5)\nfor more information.  (profile, default: fcntl)\n\nprogram: default switches\nSets  default switches to be used whenever the mh program program is invoked.  For exam‐\nple, one could override the “Editor:” profile component when  replying  to  messages  by\nadding a component such as:\n\nrepl: -editor /bin/ed\n\n(profile, no defaults)\n\nlasteditor-next: nexteditor\nNames “nexteditor” to be the default editor after using “lasteditor”.  This takes effect\nat  the  “What now?” prompt in comp, dist, forw, and repl.  After editing the draft with\n“lasteditor”, the default editor is set to be “nexteditor”.  If the  user  types  “edit”\nwithout any arguments to “What now?”, then “nexteditor” is used.  (profile, no default)\n\nFolder-Stack: folders\nThe contents of the folder-stack for the folder command.  (context, no default)\n\nLocal-Mailbox: Your Username <user@some.host>\nTells  the  MH  programs what your local mailbox is.  If set, it will be used by the de‐\nfault component files by programs like comp and repl to construct your  default  “From:”\nheader.   The text used here will be copied exactly to your “From:” header, so it should\nalready be RFC 822 compliant.  If this is set, the Signature profile entry is not  used,\nso it should include a signature as well.  (profile, default: userid@local.hostname)\n\nAlternate-Mailboxes: mh@uci-750a, bug-mh*\nTells repl and scan which additional addresses are yours.  In this way, repl knows which\naddresses  should  be included in the reply, and scan knows if a message originated from\nyou.  Addresses must be separated by a comma, and the hostnames  listed  should  be  the\n“official”  hostnames  for  the mailboxes you indicate, as local nicknames for hosts are\nnot replaced with their official site names.  For each address, if a host is not  given,\nthen  that  address on any host is considered to be you.  In addition, an asterisk (`*')\nmay appear at either or both ends of the mailbox and host to indicate  wild-card  match‐\ning.  (profile, default: your user-id)\n\nAliasfile: aliases other-aliases\nIndicates  alias  files for ali, whom, and send.  This may be used instead of the -alias\nfile switch.  (profile, no default)\n\nDraft-Folder: drafts\nIndicates a default  draft  folder  for  comp,  dist,  forw,  refile,  and  repl.   Read\nmh-draft(5) for details.  (profile, no default)\n\ndigest-issue-list: 1\nTells forw the last issue of the last volume sent for the digest list.  (context, no de‐\nfault)\n\ndigest-volume-list: 1\nTells forw the last volume sent for the digest list.  (context, no default)\n\nMailDrop: .mail\nTells  inc your mail drop, if different from the default.  This is superseded by the en‐\nvironment variable MAILDROP.  (profile, default: /var/mail/$USER)\n\nSignature: RAND MH System (agent: Marshall Rose)\nTells front-end programs such as comp, forw, and repl your mail signature.  (This is not\nto be confused with a .signature that might be appended to mails.) This is superseded by\nthe environment variable SIGNATURE.  If SIGNATURE is not set and this profile  entry  is\nnot present, the “gcos” field of the /etc/passwd file will be used.  Your signature will\nbe  added  to  the address send puts in the “From:” header; do not include an address in\nthe signature text.  The “Local-Mailbox”  profile  component  supersedes  all  of  this.\n(profile, no default)\n\ncredentials: legacy\nIndicates  how the username and password credentials will be retrieved for access to ex‐\nternal servers, such as those that provide SMTP or POP  service.   The  supported  entry\nvalues  are  “legacy”, “file:netrc”, and “file-nopermcheck:netrc”.  With “legacy”, or if\nthere is no credentials entry, the username is the first of:\n\n1)   -user switch to inc, msgchk, post, send, or whom program\n2)   the login name on the local machine\n\nThe password for SMTP services is the first of:\n\n1)   password value from matching entry in file named “.netrc” in the  user's  home\ndirectory\n2)   password obtained by interactively prompting the user\n\nWith a “file:netrc” credentials entry, the username is the first of:\n1)   -user switch to program\n2)   login name from matching entry in netrc file\n3)   value provided by user in response to interactive query\n\nSimilarly,  the  password  is provided either in the netrc file or interactively.  netrc\ncan be any valid filename, either absolute or relative to Path or $HOME.  The netrc file\ncontains authentication information, for each server, using  a  line  of  the  following\nform.  (Replace myserver, mylogin, and mypassword with your own account information.)\n\nmachine myserver login mylogin password mypassword\n\nThis netrc file must be owned and readable only by you.\n\nThe  “file-nopermcheck:netrc”  credentials  entry is identical in behavior to the “file”\nentry, with the exception that the permission checks done by “file” are  not  performed.\nThis  entry  should  be used with caution and only when absolutely necessary.  (profile,\ndefault: legacy)\n\nWelcome: disable\nIf the Welcome component is not present, or its value is not “disable”, a  welcome  mes‐\nsage  will  be displayed the first time that an interactive nmh program is run after up‐\ndating the nmh installation.  The user must press the Enter key to continue.\n\nIf the MHCONTEXT environment variable is set and non-empty (and the Welcome component is\nnot “disable”), the welcome message is only displayed if the  context  file  contains  a\nversion reference, and that reference is older than the installed nmh version.  The ver‐\nsion reference is of the form:\n\nVersion: nmh-1.8\n"
                    },
                    {
                        "name": "Process Profile Entries",
                        "content": "The  following  profile elements are used whenever an nmh program invokes some other program,\nsuch as more.  The .mh-profile can be used to select alternate programs if the  user  wishes.\nThe default values are given in the examples.\n\nIf  the  profile element contains spaces, the element is split at spaces into tokens and each\ntoken is given as a separate argument to the execvp(2) system call.  If the element  contains\nshell metacharacters then the entire element is executed using /bin/sh.\n\nbuildmimeproc: /usr/bin/mh/mhbuild\nThis is the program used by whatnow to process drafts which are MIME composition files.\n\nfileproc: /usr/bin/mh/refile\nThis  program is used to refile or link a message to another folder.  It is used by post\nto file a copy of a message into a folder given by a “Fcc:” field.  It is  used  by  the\ndraft  folder  facility in comp, dist, forw, and repl to refile a draft message into an‐\nother folder.  It is used to refile a draft message in response to the refile  directive\nat the “What now?” prompt.\n\nformatproc:\nProgram called by mhl to filter a component when it is tagged with the “format” variable\nin the mhl filter.  See mhl(5) for more information.\n\nincproc: /usr/bin/mh/inc\nProgram called by mhmail to incorporate new mail when it is invoked with no arguments.\n\nlproc: more\nThis program is used to list the contents of a message in response to the list directive\nat  the “What now?” prompt.  It is also used by the draft folder facility in comp, dist,\nforw, and repl to display the draft message.  (Note that the environment variable  PAGER\nsupersedes the default built-in pager command.)\n\nmailproc: /usr/bin/mh/mhmail\nThis  is  the program used to automatically mail various messages and notifications.  It\nis used by send to post failure notices.  It is used to retrieve an  external-body  with\naccess-type `mail-server' (such as when storing the body with mhstore).\n\nmhlproc: /usr/lib/mh/mhl\nThis  is  the  program used to filter messages in various ways.  It is used by mhshow to\nfilter and display the message headers of MIME messages.  When the  -format  or  -filter\noption  is  used by forw or repl, the mhlproc is used to filter the message that you are\nforwarding, or to which you are replying.  When the -filter option is given to send, the\nmhlproc is used to filter the copy of the message that is sent to “Bcc:” recipients.\n\nmoreproc: more\nThis is the program used by mhl to page the mhl formatted message when displaying  to  a\nterminal.   It  is also the default program used by mhshow to display message bodies (or\nmessage parts) of type text/plain.  (Note that the environment variable PAGER supersedes\nthe default built-in pager command.)\n\npackproc: /usr/bin/mh/packf\nCurrently not used.\n\npostproc: /usr/lib/mh/post\nThis is the program used by send, mhmail, rcvdist, and viamail (used  by  the  sendfiles\nshell script) to post a message to the mail transport system.  It is also called by whom\n(called with the switches -whom and -library) to do address verification.\n\nIf  the  profile  contains  a  post component and a postproc component is not present, a\nwarning message that the post component will be ignored will be displayed by  every  nmh\nprogram that reads the profile and has its stderr associated with a terminal.\n\nrmmproc: none\nThis is the program used by rmm, refile, and mhfixmsg to delete a message from a folder.\n\nsendproc: /usr/bin/mh/send\nThis is the program used by whatnow to actually send the message\n\nshowmimeproc: /usr/bin/mh/mhshow\nThis is the program used by show to process and display non-text (MIME) messages.\n\nshowproc: /usr/lib/mh/mhl\nThis is the program used by show to filter and display text (non-MIME) messages.\n\nwhatnowproc: /usr/bin/mh/whatnow\nThis is the program invoked by comp, dist, forw, and repl to query about the disposition\nof a composed draft message.\n\nwhomproc: /usr/bin/mh/whom\nThis is the program used by whatnow to determine to whom a message would be sent.\n"
                    },
                    {
                        "name": "Profile Lookup",
                        "content": "After  consulting .mhprofile, some programs read an optional profile specified by a program-\nspecific environment variable, and then the system-wide profile /etc/nmh/mhn.defaults.  These\nprograms are mhbuild, mhshow, mhstore, and mhn.  mhfixmsg is similar,  but  has  no  optional\nprofile.\n\nThe  first  occurrence of a component is used, e.g. .mhprofile's trumps $MHSHOW's.  A compo‐\nnent with no value still stops further occurrences being used, but is considered absent.\n\nThe .mh-profile contains only  static  information,  which  nmh  programs  will  not  update.\nChanges  in  context  are made to the context file kept in the users nmh directory.  This in‐\ncludes, but is not limited to: the “Current-Folder” entry and all private  sequence  informa‐\ntion.   Public  sequence  information  is  kept  in each folder in the file determined by the\n“mh-sequences” profile entry (default is .mh-sequences).\n\nThe .mh-profile may override the path of the context file, by specifying  a  “context”  entry\n(this must be in lower-case).  If the entry is not absolute (does not start with a “/”), then\nit  is  interpreted relative to the user's nmh directory.  As a result, you can actually have\nmore than one set of private sequences by using different context files.\n"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "The operation of nmh and its commands it also controlled by the presence of certain  environ‐\nment variables.\n\nMany  of  these environment variables are used internally by the “What now?” interface.  It's\namazing all the information that has to get passed via  environment  variables  to  make  the\n“What  now?” interface look squeaky clean to the nmh user, isn't it?  The reason for all this\nis that the nmh user can select any program as the whatnowproc, including one of the standard\nshells.  As a result, it's not possible to pass information via an argument list.   The  con‐\nvention is that environment variables whose names are all upper-case are user-settable; those\nwhose names are lower-case only are used internally by nmh and should not generally be set by\nthe user.\n\nHOME   If  set  and  non-null,  it is used as the user's home directory.  If not set or null,\nthen getpwuid(3)'s pwdir is used.\n\nLCALL, LCCTYPE, and LANG\nThese variables are used to set the locale, see locale(1).  The “locale” profile entry\nsupersedes these.\n\nMAILDROP\nThis variable tells inc the default mail drop.  This supersedes the “MailDrop” profile\nentry.\n\nMAILHOST\nThis variable tells inc the POP host to query for mail to incorporate.  See inc(1) for\nmore information.\n\nMH     With this environment variable, you can specify a profile other than .mh-profile to be\nread by the nmh programs that you invoke.  If the value of MH is not absolute,  (i.e.,\ndoes  not begin with a “/”), it will be presumed to start from the current working di‐\nrectory.  This is one of the very few exceptions in nmh where  non-absolute  pathnames\nare not considered relative to the user's nmh directory.\n\nMHBUILD\nWith  this  environment variable, you can specify an additional user profile (file) to\nbe read by mhbuild, in addition to the mhn.defaults profile.\n\nMHCONTEXT\nWith this environment variable, you can specify a context other than the  normal  con‐\ntext  file (as specified in the nmh profile).  As usual, unless the value of MHCONTEXT\nis absolute, it will be presumed to start from your nmh directory.\n\nMHLDEBUG\nIf this variable is set to a non-null value, mhl will emit debugging information.\n\nMHMTSCONF\nIf this variable is set to a non-null value, it specifies the name of the mail  trans‐\nport configuration file to use by inc, post, and other programs that interact with the\nmail transport system, instead of the default.  See mh-tailor(5).\n\nMHMTSUSERCONF\nIf this variable is set to a non-null value, it specifies the name of a mail transport\nconfiguration file to be read in addition to the default.  See mh-tailor(5).\n\nMHN    With  this  environment variable, you can specify an additional user profile (file) to\nbe read by mhn, in addition to the mhn.defaults profile.  mhn is deprecated,  so  sup‐\nport for this variable will be removed from a future nmh release.\n\nMHSHOW With  this  environment variable, you can specify an additional user profile (file) to\nbe read by mhshow, in addition to the mhn.defaults profile.\n\nMHSTORE\nWith this environment variable, you can specify an additional user profile  (file)  to\nbe read by mhstore, in addition to the mhn.defaults profile.\n\nMHTMPDIR, TMPDIR\nThese variables are searched, in order, for the directory in which to create some tem‐\nporary files.  MHTMPDIR is deprecated and will be removed in a future release of nmh.\n\nMHWDEBUG\nIf this variable is set to a non-null value, nmh commands that use the Alternate-Mail‐\nboxes profile entry will display debugging information about the values in that entry.\n\nPAGER  If  set  to  a non-null value, this supersedes the value of the default built-in pager\ncommand.\n\nSIGNATURE\nThis variable tells send and post your mail signature.  This  supersedes  the  “Signa‐\nture”  profile  entry,  and  is not used when the “Local-Mailbox” profile component is\nset.\n\nUSER   This variable tells repl your user name and inc  your  default  mail  drop:   see  the\n“MailDrop” profile entry.\n\nUSERNAMEEXTENSION\nThis variable is for use with usernameextension masquerading.  See mh-tailor(5).\n\neditalt\nThis  is  the alternate message.  This is set by dist and repl during edit sessions so\nyou can peruse the message being distributed or  replied  to.   The  message  is  also\navailable,  when  the -atfile switch is used, through a link called “@” in the current\ndirectory if your current working directory and the folder the message lives in are on\nthe same Unix filesystem, and if your current working directory is writable.\n\nmhaltmsg\ndist and repl set mhaltmsg to tell the whatnowproc about an alternate message  associ‐\nated with the draft (the message being distributed or replied to).\n\nmhannotate\nThis is set by dist, forw, and repl if annotations are to occur.\n\nmhdist dist sets mhdist to tell the whatnowproc that message re-distribution is occurring.\n\nmhdraft\nThis  is  the  path  to the working draft.  It is set by comp, dist, forw, and repl to\ntell the whatnowproc which file to ask “What now?” questions about.\n\nmheditor\nThis is set by comp, repl, forw, and dist to tell the whatnowproc the user's choice of\neditor (unless overridden by -noedit).\n\nmhfolder\nThis is the folder containing the alternate message.  It is set by dist and repl  dur‐\ning  edit  sessions so you can peruse other messages in the current folder besides the\none being distributed or replied to.  The environment variable mhfolder is also set by\nnext, prev, and show for use by mhl.\n\nmhinplace\nThis is set by dist, forw, and repl if annotations are to occur.\n\nmhmessages\nThis is set by dist, forw, and repl if annotations are to occur.\n\nmhuse  This may be set by comp.\n",
                "subsections": []
            },
            "FILES": {
                "content": "$HOME/.mh-profile   The user's profile.\n<mh-dir>/context    The user's context\n<folder>/.mh-sequences\nPublic sequences for <folder>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "mhbuild(1), mhshow(1), mhstore(1), mh-sequence(5), nmh(7), post(8)\n",
                "subsections": []
            },
            "BUGS": {
                "content": "There is some question as to what kind of arguments should be placed in the  profile  as  op‐\ntions.  In order to provide a clear answer, recall the command line semantics of all nmh pro‐\ngrams: conflicting switches (e.g.  -header and -noheader) may occur more than one time on the\ncommand  line,  with  the  last  switch  taking effect.  Other arguments, such as message se‐\nquences, filenames and folders, are always remembered on the invocation line and are not  su‐\nperseded  by  following arguments of the same type.  Hence, it is safe to place only switches\n(and their arguments) in the profile.\n\nIf one finds that an nmh program is being invoked again and again with  the  same  arguments,\nand those arguments aren't switches, then there are a few possible solutions to this problem.\nThe  first  is to create a (soft) link in your $HOME/bin directory to the nmh program of your\nchoice.  By giving this link a different name, you can create a new entry in your profile and\nuse an alternate set of defaults for the nmh command.  Similarly, you could  create  a  small\nshell  script which called the nmh program of your choice with an alternate set of invocation\nline switches (using links and an alternate profile entry is preferable to this solution).\n\nFinally, the csh user could create an alias for the command of the form:\n\nalias cmd 'cmd arg1 arg2 ...'\n\nIn this way, the user can avoid lengthy type-in to the shell, and  still  give  nmh  commands\nsafely.   (Recall that some nmh commands invoke others, and that in all cases, the profile is\nread, meaning that aliases are disregarded beyond an initial command invocation)\n\nnmh-1.8                                      2016-10-19                              MH-PROFILE(5mh)",
                "subsections": []
            }
        }
    }
}