1MH-PROFILE(5)                 File Formats Manual                MH-PROFILE(5)
2
3
4

NAME

6       mh-profile - user customization for nmh message handler
7

DESCRIPTION

9       Each  user of nmh is expected to have a file named .mh-profile in their
10       home directory.  This file contains a set of user  parameters  used  by
11       the nmh family of programs.  Each entry in the file is of the format
12
13            profile-component: value
14
15       If  the  text of a profile entry is long, you may extend it across sev‐
16       eral real lines by indenting the continuation lines with leading spaces
17       or tabs.  Comments may be introduced by a line starting with `#:':
18
19            #: This is a comment.
20
21       Blank  lines  are  not permitted in .mh-profile.  Shell quoting conven‐
22       tions are not available; each token is separated by whitespace.
23
24   Standard Profile Entries
25       The possible profile components are exemplified below.  The only manda‐
26       tory entry is `Path:'.  The others are optional; some have default val‐
27       ues if they are not present.  In the  notation  used  below,  (profile,
28       default)  indicates  whether  the information is kept in the user's nmh
29       profile or nmh context, and indicates what the default value is.   Note
30       that  a  profile  component can only appear once.  Multiple appearances
31       will trigger a  warning  that  all  appearances  after  the  first  are
32       ignored.
33
34       Some MH programs, including mhbuild, mhshow, and mhstore, have specific
35       profile components that are described in their  respective  man  pages.
36       Each  component name specific to these programs begins with the name of
37       the program and is followed by a dash.
38
39       Path: Mail
40            Locates nmh transactions in directory “Mail”.  This  is  the  only
41            mandatory profile entry.  (profile, no default)
42
43       locale: locale
44            Set  the  locale for all nmh programs except post, install-mh, and
45            slocal.  See the LC_ALL,  LC_CTYPE,  and  LANG  variables  in  the
46            "ENVIRONMENT"  section  below for a reference on how the locale is
47            set if this profile component is not used.
48
49       context: context
50            Declares the location of the nmh context file.  This can be  over‐
51            ridden  by  the  environment  variable MHCONTEXT.  See the HISTORY
52            section below.  (profile, default: <nmh-dir>/context)
53
54       Current-Folder: inbox
55            Keeps track of the current open folder.  (context, default: folder
56            specified by “Inbox”)
57
58       Inbox: inbox
59            Defines the name of the default inbox.  (profile, default: inbox)
60
61       Previous-Sequence: pseq
62            Names  the  sequence  or  sequences which should be defined as the
63            `msgs' or `msg' argument given to any nmh command.  If not present
64            or empty, no such sequences are defined.  Otherwise, for each name
65            given, the sequence is first zeroed and then each message is added
66            to the sequence.  Read the mh-sequence(5) man page for the details
67            about this sequence.  (profile, no default)
68
69       Sequence-Negation: not
70            Defines the string  which,  when  prefixed  to  a  sequence  name,
71            negates  that sequence.  Hence, “notseen” means all those messages
72            that  are  not  a  member  of  the  sequence  “seen”.   Read   the
73            mh-sequence(5) man page for the details.  (profile, no default)
74
75       Unseen-Sequence: unseen
76            Names  the  sequence or sequences which should be defined as those
77            messages which are unread.  The commands  inc,  rcvstore,  mhshow,
78            and  show  will  add  or remove messages from these sequences when
79            they are incorporated or read.  If not present or empty,  no  such
80            sequences  are  defined.   Otherwise, each message is added to, or
81            removed from, each sequence name given.  Read  the  mh-sequence(5)
82            man  page  for  the  details  about  this  sequence.  (profile, no
83            default)
84
85       mh-sequences: .mh-sequences
86            The  name  of  the  file  in  each  folder  which  defines  public
87            sequences.   To  disable  the  use  of public sequences, leave the
88            value  portion  of   this   entry   blank.    (profile,   default:
89            .mh-sequences)
90
91       atr-seq-folder: 172 178-181 212
92            Keeps  track of the private sequence called “seq” in the specified
93            folder.  Private sequences are generally used for read-only  fold‐
94            ers.   See  the  mh-sequence(5) man page for details about private
95            sequences.  (context, no default)
96
97       Editor: vi
98            Defines the editor to be used by the commands  comp,  dist,  forw,
99            and repl.  If not set, the value will be taken from the VISUAL and
100            EDITOR environment variables.  (profile, default: vi)
101
102       Msg-Protect: 600
103            An octal number which defines the permission bits for new  message
104            files.  See chmod(1) for an explanation of the octal number.  Note
105            that some filesystems, such as FAT32, do not  support  removal  of
106            read file permissions.  (profile, default: 0600)
107
108       Folder-Protect: 700
109            An  octal  number which defines the permission bits for new folder
110            directories.  See chmod(1) for an explanation of the octal number.
111            (profile, default: 700)
112
113       datalocking: fcntl
114            The  locking algorithm used to lock changes to any nmh data files,
115            such as sequences or context.  The locking algorithm is any one of
116            the following entries:
117
118                 fcntl dot flock lockf
119
120            Available  locking  algorithms can vary depending on the operating
121            system.  Note: currently, transactional locking is only  supported
122            on  public  sequences;  see  mh-sequence(5)  for more information.
123            (profile, default: fcntl)
124
125       program: default switches
126            Sets default switches to be used whenever the mh  program  program
127            is invoked.  For example, one could override the “Editor:” profile
128            component when replying to messages by adding a component such as:
129
130                 repl: -editor /bin/ed
131
132            (profile, no defaults)
133
134       lasteditor-next: nexteditor
135            Names “nexteditor” to be the default editor after using  “lastedi‐
136            tor”.   This takes effect at the “What now?” prompt in comp, dist,
137            forw, and repl.  After editing the draft  with  “lasteditor”,  the
138            default  editor  is  set  to  be  “nexteditor”.  If the user types
139            “edit” without any arguments to “What now?”, then “nexteditor”  is
140            used.  (profile, no default)
141
142       Folder-Stack: folders
143            The  contents  of  the folder-stack for the folder command.  (con‐
144            text, no default)
145
146       Local-Mailbox: Your Username <user@some.host>
147            Tells the MH programs what your local mailbox is.  If set, it will
148            be  used  by the default component files by programs like comp and
149            repl to construct your default “From:” header.  The text used here
150            will  be  copied  exactly  to  your  “From:”  header, so it should
151            already be RFC 822 compliant.  If this is set, the Signature  pro‐
152            file  entry is not used, so it should include a signature as well.
153            (profile, default: userid@local.hostname)
154
155       Alternate-Mailboxes: mh@uci-750a, bug-mh*
156            Tells repl and scan which additional addresses are yours.  In this
157            way,  repl  knows which addresses should be included in the reply,
158            and scan knows if a message originated from you.   Addresses  must
159            be  separated  by  a comma, and the hostnames listed should be the
160            “official” hostnames for the  mailboxes  you  indicate,  as  local
161            nicknames  for  hosts  are  not  replaced with their official site
162            names.  For each address, if  a  host  is  not  given,  then  that
163            address  on  any  host  is  considered to be you.  In addition, an
164            asterisk (`*') may appear at either or both ends  of  the  mailbox
165            and  host to indicate wild-card matching.  (profile, default: your
166            user-id)
167
168       Aliasfile: aliases other-aliases
169            Indicates alias files for ali, whom, and send.  This may  be  used
170            instead of the -alias file switch.  (profile, no default)
171
172       Draft-Folder: drafts
173            Indicates a default draft folder for comp, dist, forw, refile, and
174            repl.  Read the mh-draft(5) man page for  details.   (profile,  no
175            default)
176
177       digest-issue-list: 1
178            Tells  forw  the last issue of the last volume sent for the digest
179            list.  (context, no default)
180
181       digest-volume-list: 1
182            Tells forw the last volume sent for the digest list.  (context, no
183            default)
184
185       MailDrop: .mail
186            Tells  inc your mail drop, if different from the default.  This is
187            superseded  by  the  environment  variable  MAILDROP.    (profile,
188            default: /var/mail/$USER)
189
190       Signature: RAND MH System (agent: Marshall Rose)
191            Tells  front-end  programs  such as comp, forw, and repl your mail
192            signature.  (This is not to be confused  with  a  .signature  that
193            might be appended to mails.) This is superseded by the environment
194            variable SIGNATURE.  If SIGNATURE is  not  set  and  this  profile
195            entry  is  not  present,  the “gcos” field of the /etc/passwd file
196            will be used.  Your signature will be added to  the  address  send
197            puts  in the “From:” header; do not include an address in the sig‐
198            nature text.  The “Local-Mailbox” profile component supersedes all
199            of this.  (profile, no default)
200
201       credentials: legacy
202            Indicates  how  the  username  and  password  credentials  will be
203            retrieved for access to external servers, such as those that  pro‐
204            vide  SMTP  or  POP  service.   The  supported  entry  values  are
205            “legacy”,  “file:netrc”,   and   “file-nopermcheck:netrc”.    With
206            “legacy”, or if there is no credentials entry, the username is the
207            first of:
208
209                 1)   -user switch to inc, msgchk, post, send, or whom program
210                 2)   the login name on the local machine
211
212            The password for SMTP services is the first of:
213
214                 1)   password  value  from  matching  entry  in  file   named
215                      “.netrc” in the user's home directory
216                 2)   password obtained by interactively prompting the user
217
218            The  password  for  POP service when the -sasl switch is used with
219            one of these programs is the login name on the local machine.
220
221            With a “file:netrccredentials entry, the username is  the  first
222            of:
223                 1)   -user switch to program
224                 2)   login name from matching entry in netrc file
225                 3)   value provided by user in response to interactive query
226
227            Similarly,  the  password  is provided either in the netrc file or
228            interactively.  netrc can be any valid filename,  either  absolute
229            or relative to Path or $HOME.  The netrc file contains authentica‐
230            tion information, for each server, using a line of  the  following
231            form.   (Replace  myserver,  mylogin, and mypassword with your own
232            account information.)
233
234                 machine myserver login mylogin password mypassword
235
236            This netrc file must be owned and readable only by you.
237
238            The “file-nopermcheck:netrccredentials  entry  is  identical  in
239            behavior  to the “file” entry, with the exception that the permis‐
240            sion checks done by “file” are not performed.  This  entry  should
241            be  used  with  caution and only when absolutely necessary.  (pro‐
242            file, default: legacy)
243
244       Welcome: disable
245            If the Welcome component is not present, or its value is not “dis‐
246            able”,  a welcome message will be displayed the first time that an
247            interactive nmh program is run after updating  the  nmh  installa‐
248            tion.  The user must press the Enter key to continue.
249
250            If  the  MHCONTEXT  environment variable is set and non-empty (and
251            the Welcome component is not “disable”), the  welcome  message  is
252            only  displayed  if the context file contains a version reference,
253            and that reference is older than the installed nmh  version.   The
254            version reference is of the form:
255
256                 Version: nmh-1.7.1
257
258   Process Profile Entries
259       The following profile elements are used whenever an nmh program invokes
260       some other program, such as more.   The  .mh-profile  can  be  used  to
261       select  alternate  programs if the user wishes.  The default values are
262       given in the examples.
263
264       If the profile element contains spaces, the element is split at  spaces
265       into  tokens  and  each  token  is  given as a separate argument to the
266       execvp(2) system call.  If the element  contains  shell  metacharacters
267       then the entire element is executed using /bin/sh.
268
269       buildmimeproc: /usr/bin/mhbuild
270            This  is  the  program used by whatnow to process drafts which are
271            MIME composition files.
272
273       fileproc: /usr/bin/refile
274            This program is used to  refile  or  link  a  message  to  another
275            folder.   It  is  used  by send to file a copy of a message into a
276            folder given by a “Fcc:” field.  It is used by  the  draft  folder
277            facility  in  comp, dist, forw, and repl to refile a draft message
278            into another folder.  It is used to  refile  a  draft  message  in
279            response to the refile directive at the “What now?” prompt.
280
281       formatproc:
282            Program called by mhl to filter a component when it is tagged with
283            the “format” variable in the mhl  filter.   See  mhl(5)  for  more
284            information.
285
286       incproc: /usr/bin/inc
287            Program  called  by  mhmail  to  incorporate  new  mail when it is
288            invoked with no arguments.
289
290       lproc: more
291            This program is used to list the contents of a message in response
292            to  the list directive at the “What now?” prompt.  It is also used
293            by the draft folder facility in comp, dist, forw, and repl to dis‐
294            play the draft message.  (Note that the environment variable PAGER
295            supersedes the default built-in pager command.)
296
297       mailproc: /usr/bin/mhmail
298            This is the program used to automatically  mail  various  messages
299            and  notifications.   It  is used by send to post failure notices.
300            It is used to retrieve an external-body  with  access-type  `mail-
301            server' (such as when storing the body with mhstore).
302
303       mhlproc: /usr/libexec/nmh/mhl
304            This  is  the program used to filter messages in various ways.  It
305            is used by mhshow to filter and display  the  message  headers  of
306            MIME messages.  When the -format or -filter option is used by forw
307            or repl, the mhlproc is used to filter the message  that  you  are
308            forwarding, or to which you are replying.  When the -filter option
309            is given to send, the mhlproc is used to filter the  copy  of  the
310            message that is sent to “Bcc:” recipients.
311
312       moreproc: more
313            This  is the program used by mhl to page the mhl formatted message
314            when displaying to a terminal.  It is  also  the  default  program
315            used  by  mhshow  to  display message bodies (or message parts) of
316            type text/plain.  (Note that the environment variable PAGER super‐
317            sedes the default built-in pager command.)
318
319       packproc: /usr/bin/packf
320            Currently not used.
321
322       postproc: /usr/libexec/nmh/post
323            This  is  the  program  used by send, mhmail, rcvdist, and viamail
324            (used by the sendfiles shell script) to post a message to the mail
325            transport  system.   It  is  also  called by whom (called with the
326            switches -whom and -library) to do address verification.
327
328       rmmproc: none
329            This is the program used by rmm, refile, and mhfixmsg to delete  a
330            message from a folder.
331
332       sendproc: /usr/bin/send
333            This is the program used by whatnow to actually send the message
334
335       showmimeproc: /usr/bin/mhshow
336            This  is  the program used by show to process and display non-text
337            (MIME) messages.
338
339       showproc: /usr/libexec/nmh/mhl
340            This is the program used by show to filter and display text  (non-
341            MIME) messages.
342
343       whatnowproc: /usr/bin/whatnow
344            This is the program invoked by comp, dist, forw, and repl to query
345            about the disposition of a composed draft message.
346
347       whomproc: /usr/bin/whom
348            This is the program used by whatnow to determine to whom a message
349            would be sent.
350
351   Profile Lookup
352       After  consulting  .mh_profile,  some programs read an optional profile
353       specified by a program-specific environment variable, and then the sys‐
354       tem-wide  profile  /etc/nmh/mhn.defaults.   These programs are mhbuild,
355       mhshow, mhstore, and mhn.  mhfixmsg is similar,  but  has  no  optional
356       profile.
357
358       The  first occurrence of a component is used, e.g. .mh_profile's trumps
359       $MHSHOW's.  A component with no value still stops  further  occurrences
360       being used, but is considered absent.
361
362       The  .mh-profile  contains  only static information, which nmh programs
363       will not update.  Changes in context are made to the context file  kept
364       in  the users nmh directory.  This includes, but is not limited to: the
365       “Current-Folder” entry and all private  sequence  information.   Public
366       sequence  information  is kept in each folder in the file determined by
367       the “mh-sequences” profile entry (default is .mh-sequences).
368
369       The .mh-profile may override the path of the context file, by  specify‐
370       ing  a  “context”  entry (this must be in lower-case).  If the entry is
371       not absolute (does not start with a “/”), then it is interpreted  rela‐
372       tive  to  the user's nmh directory.  As a result, you can actually have
373       more than one set of  private  sequences  by  using  different  context
374       files.
375

ENVIRONMENT

377       The  operation  of nmh and its commands it also controlled by the pres‐
378       ence of certain environment variables.
379
380       Many of these environment variables are used internally  by  the  “What
381       now?”  interface.   It's  amazing  all  the information that has to get
382       passed via environment variables to make the “What now?” interface look
383       squeaky  clean  to  the nmh user, isn't it?  The reason for all this is
384       that the nmh user can select any program as the whatnowproc,  including
385       one  of  the  standard  shells.  As a result, it's not possible to pass
386       information via an argument list.  The convention is  that  environment
387       variables whose names are all upper-case are user-settable; those whose
388       names are lower-case only are used internally by  nmh  and  should  not
389       generally be set by the user.
390
391       LC_ALL, LC_CTYPE, and LANG
392              These  variables are used to set the locale, see locale(1).  The
393              “locale” profile entry supersedes these.
394
395       MAILDROP
396              This variable tells inc the default mail drop.  This  supersedes
397              the “MailDrop” profile entry.
398
399       MAILHOST
400              This variable tells inc the POP host to query for mail to incor‐
401              porate.  See the inc(1) man page for more information.
402
403       MH     With this environment variable, you can specify a profile  other
404              than .mh-profile to be read by the nmh programs that you invoke.
405              If the value of MH is not absolute, (i.e., does not begin with a
406              “/”),  it  will  be  presumed  to start from the current working
407              directory.  This is one of the very few exceptions in nmh  where
408              non-absolute pathnames are not considered relative to the user's
409              nmh directory.
410
411       MHBUILD
412              With this environment variable, you can  specify  an  additional
413              user  profile  (file)  to be read by mhbuild, in addition to the
414              mhn.defaults profile.
415
416       MHCONTEXT
417              With this environment variable, you can specify a context  other
418              than  the normal context file (as specified in the nmh profile).
419              As usual, unless the value of MHCONTEXT is absolute, it will  be
420              presumed to start from your nmh directory.
421
422       MHLDEBUG
423              If  this  variable  is  set  to  a non-null value, mhl will emit
424              debugging information.
425
426       MHMTSCONF
427              If this variable is set to a non-null value,  it  specifies  the
428              name  of  the  mail  transport configuration file to use by inc,
429              post, and other programs that interact with the  mail  transport
430              system, instead of the default.  See mh-tailor(5).
431
432       MHMTSUSERCONF
433              If  this  variable  is set to a non-null value, it specifies the
434              name of a mail transport configuration file to be read in  addi‐
435              tion to the default.  See mh-tailor(5).
436
437       MHN    With  this  environment  variable, you can specify an additional
438              user profile (file) to be  read  by  mhn,  in  addition  to  the
439              mhn.defaults  profile.   mhn  is deprecated, so support for this
440              variable will be removed from a future nmh release.
441
442       MHSHOW With this environment variable, you can  specify  an  additional
443              user  profile  (file)  to  be read by mhshow, in addition to the
444              mhn.defaults profile.
445
446       MHSTORE
447              With this environment variable, you can  specify  an  additional
448              user  profile  (file)  to be read by mhstore, in addition to the
449              mhn.defaults profile.
450
451       MHPDEBUG
452              If this variable is set to a non-null value, pick  will  emit  a
453              representation  of  the search pattern.  MHPDEBUG is deprecated,
454              so support for this variable will be removed from a  future  nmh
455              release.  Instead, pick now supports a -debug switch.
456
457       MHTMPDIR, TMPDIR
458              These  variables  are  searched,  in order, for the directory in
459              which to create some temporary files.   MHTMPDIR  is  deprecated
460              and will be removed in a future release of nmh.
461
462       MHWDEBUG
463              If  this  variable is set to a non-null value, nmh commands that
464              use the Alternate-Mailboxes profile entry will display debugging
465              information about the values in that entry.
466
467       PAGER  If  set  to  a  non-null value, this supersedes the value of the
468              default built-in pager command.
469
470       SIGNATURE
471              This variable tells send and post  your  mail  signature.   This
472              supersedes  the  “Signature” profile entry, and is not used when
473              the “Local-Mailbox” profile component is set.
474
475       USER   This variable tells repl your user name  and  inc  your  default
476              mail drop:  see the “MailDrop” profile entry.
477
478       USERNAME_EXTENSION
479              This  variable  is for use with username_extension masquerading.
480              See the mh-tailor(5) man page.
481
482       editalt
483              This is the alternate message.  This is set  by  dist  and  repl
484              during  edit  sessions  so you can peruse the message being dis‐
485              tributed or replied to.  The message is also available, when the
486              -atfile switch is used, through a link called “@” in the current
487              directory if your current working directory and the  folder  the
488              message  lives  in  are on the same Unix filesystem, and if your
489              current working directory is writable.
490
491       mhaltmsg
492              dist and repl set mhaltmsg to  tell  the  whatnowproc  about  an
493              alternate  message  associated with the draft (the message being
494              distributed or replied to).
495
496       mhannotate
497              This is set by dist, forw, and repl if annotations are to occur.
498
499       mhdist dist sets mhdist to tell the whatnowproc that message re-distri‐
500              bution is occurring.
501
502       mhdraft
503              This is the path to the working draft.  It is set by comp, dist,
504              forw, and repl to tell the whatnowproc which file to  ask  “What
505              now?” questions about.
506
507       mheditor
508              This  is  set by comp, repl, forw, and dist to tell the whatnow‐
509              proc the user's choice of editor (unless overridden by -noedit).
510
511       mhfolder
512              This is the folder containing the alternate message.  It is  set
513              by  dist  and  repl during edit sessions so you can peruse other
514              messages in the current folder besides the one being distributed
515              or replied to.  The environment variable mhfolder is also set by
516              next, prev, and show for use by mhl.
517
518       mhinplace
519              This is set by dist, forw, and repl if annotations are to occur.
520
521       mhmessages
522              This is set by dist, forw, and repl if annotations are to occur.
523
524       mhuse  This may be set by comp.
525

FILES

527       $HOME/.mh-profile   The user's profile.
528       <mh-dir>/context    The user's context
529       <folder>/.mh-sequences
530                           Public sequences for <folder>.
531

SEE ALSO

533       mhbuild(1), mhshow(1), mhstore(1), mh-sequence(5), nmh(7)
534

BUGS

536       There is some question as to what kind of arguments should be placed in
537       the profile as options.  In order to provide a clear answer, recall the
538       command line semantics of all nmh programs: conflicting switches  (e.g.
539       -header  and  -noheader)  may  occur  more than one time on the command
540       line, with the last switch taking effect.   Other  arguments,  such  as
541       message  sequences, filenames and folders, are always remembered on the
542       invocation line and are not superseded by following  arguments  of  the
543       same  type.   Hence, it is safe to place only switches (and their argu‐
544       ments) in the profile.
545
546       If one finds that an nmh program is being invoked again and again  with
547       the same arguments, and those arguments aren't switches, then there are
548       a few possible solutions to this problem.  The first  is  to  create  a
549       (soft)  link  in  your  $HOME/bin  directory to the nmh program of your
550       choice.  By giving this link a different name, you  can  create  a  new
551       entry  in your profile and use an alternate set of defaults for the nmh
552       command.  Similarly, you could create a small shell script which called
553       the nmh program of your choice with an alternate set of invocation line
554       switches (using links and an alternate profile entry is  preferable  to
555       this solution).
556
557       Finally,  the  csh  user  could  create an alias for the command of the
558       form:
559
560            alias cmd 'cmd arg1 arg2 ...'
561
562       In this way, the user can avoid lengthy type-in to the shell, and still
563       give  nmh  commands safely.  (Recall that some nmh commands invoke oth‐
564       ers, and that in all cases, the profile is read, meaning  that  aliases
565       are disregarded beyond an initial command invocation)
566
567
568
569nmh-1.7.1                         2016-10-19                     MH-PROFILE(5)
Impressum