083222be145cd6de5f39d298dd6b36c4da199d2d
[mmh] / man / mh-profile.man5
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MH-PROFILE %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mh-profile \- user profile customization for mmh message handler
7 .SH SYNOPSIS
8 .I $HOME/.mmh/profile
9 .br
10 .I $HOME/.mmh/context
11 .SH DESCRIPTION
12 Each user of
13 .B mmh
14 is expected to have a file named
15 .I $HOME/.mmh/profile
16 in his or her home directory.  This file contains
17 a set of user parameters used by some or all of the
18 .B mmh
19 family of programs.  Each entry in the file is of the format
20 .PP
21 .RS 5
22 .IR Profile\-Component ": " value
23 .RE
24 .PP
25 If the text of profile entry is long, you may extend it across several
26 real lines by indenting the continuation lines with leading spaces or tabs.
27
28 .SS "Standard Profile Entries"
29 The possible profile components are exemplified below.  The only mandatory
30 entry is `Path:'.  The others are optional; some have default values if
31 they are not present.  In the notation used below, (profile, default)
32 indicates whether the information is kept in the user's
33 .B mmh
34 profile or
35 .B mmh
36 context, and indicates what the default value is.
37 .PP
38 .BR Path :
39 Mail
40 .RS 5
41 Sets the user's mail storage to \*(lqMail\*(rq.  This is the
42 only mandatory profile entry.  (profile, no default)
43 .RE
44 .PP
45 .BR Context :
46 context
47 .RS 5
48 Declares the location of the
49 .B mmh
50 context file.  This is overridden by the environment variable
51 .BR $MMHC .
52 See the
53 .B HISTORY
54 section below.
55 (profile, default: $HOME/.mmh/context)
56 .RE
57 .PP
58 .BR Current\-Folder :
59 inbox
60 .RS 5
61 Keeps track of the current open folder.
62 (context, default: folder specified by \*(lqInbox\*(rq)
63 .RE
64 .PP
65 .BR Inbox :
66 inbox
67 .RS 5
68 Defines the name of your default inbox.
69 (profile, default: inbox)
70 .RE
71 .PP
72 .BR Previous\-Sequence :
73 .I pseq
74 .RS 5
75 Names the sequence or sequences which should be defined as the `msgs' or
76 `msg' argument given to any
77 .B mmh
78 command.  If not present or empty,
79 no such sequences are defined.  Otherwise, for each name given, the
80 sequence is first zero'd and then each message is added to the sequence.
81 Read the
82 .BR mh\-sequence (7)
83 man page for the details about this sequence. (profile, no default)
84 .RE
85 .PP
86 .BR Sequence\-Negation :
87 \&!
88 .RS 5
89 Defines the string which, when prefixed to a sequence name, negates
90 that sequence.  Hence, \*(lq!foo\*(rq means all those messages that
91 are not a member of the sequence \*(lqfoo\*(rq.
92 To deactivate this mechanism, define Sequence\-Negation to an empty value.
93 Read the
94 .BR mh\-sequence (7)
95 man page for the details.  (profile, default: !)
96 .RE
97 .PP
98 .BR Unseen\-Sequence :
99 u
100 .RS 5
101 Names the sequence or sequences which shall contain any unread messages.
102 The commands
103 .BR inc ,
104 .BR rcvstore ,
105 .BR mhshow ,
106 and
107 .B show
108 will add or remove messages from these
109 sequences when they are incorporated or read.  If defined with an empty
110 value, no such sequences are defined.  Otherwise, each message is
111 added to, or removed from, each sequence name given.  Read the
112 .BR mh\-sequence (7)
113 man page for the details about this sequence.
114 (profile, default: u)
115 .RE
116 .PP
117 .BR Mh\-Sequences :
118 \&.mh_sequences
119 .RS 5
120 The name of the file in each folder which defines public sequences.
121 To disable the use of public sequences, leave the value portion of this
122 entry blank.  (profile, default: \&.mh_sequences)
123 .RE
124 .PP
125 .BI atr\- seq \- folder :
126 172\0178\-181\0212
127 .RS 5
128 Keeps track of the private sequence called \*(lqseq\*(rq in the specified
129 folder.  Private sequences are generally used for read\-only folders.
130 See the
131 .BR mh\-sequence (7)
132 man page for details about private sequences.
133 (context, no default)
134 .RE
135 .PP
136 .BR Editor :
137 vi
138 .RS 5
139 Defines the editor to be used by the commands
140 .BR comp ,
141 .BR dist ,
142 .BR forw ,
143 and
144 .BR repl .
145 This profile entry overrides the $VISUAL and $EDITOR environment variables,
146 but gets overridden by the $MMHEDITOR environment variabel.
147 (profile, default: vi)
148 .RE
149 .PP
150 .BR Pager :
151 more
152 .RS 5
153 This is the program used by
154 .B mhl
155 to page the
156 .B mhl
157 formatted message when displaying to a terminal.  It is also the default
158 program used by
159 .B mhshow
160 to display message bodies (or message parts) of type text/plain.
161 This profile entry overrides the $PAGER environment variable, but gets
162 overridden by the $MMHPAGER environment variable.
163 (profile, default: more)
164 .RE
165 .PP
166 .BR Sendmail :
167 /usr/sbin/sendmail
168 .RS 5
169 The path name to the
170 .B sendmail
171 program, used by
172 .BR spost
173 to send mail.
174 (profile, default: %sendmailpath%)
175 .RE
176 .PP
177 .BR Backup-Prefix :
178 ,
179 .RS 5
180 The prefix that is prepended to the name of message files when they
181 are backup'd for some reason.
182 .BR send ,
183 for instance, does this.
184 Note: rmm does NOT anymore use the backup prefix.
185 It should typically be set to `,' or `#'.
186 (profile, default: `,')
187 .RE
188 .PP
189 .BR AltMsg-Link :
190 @
191 .RS 5
192 Name of the link to the file to which you are replying or which you are
193 redistributing. See `$mhaltmsg' below.
194 (profile, default: `@')
195 .RE
196 .PP
197 .BR Attachment-Header :
198 Attach
199 .RS 5
200 The (pseudo) header in draft messages, that contains files to be attached
201 to the message on sending.
202 If you like to type a lot, name it `X-MH-Attachment'.
203 (profile, default: `Attach')
204 .RE
205 .PP
206 .BR Mime-Type-Query :
207 file \-b \-\-mime
208 .RS 5
209 A command that prints the MIME type of a file.
210 The file name gets appended to the command line.
211 Note: Older GNU versions of file(1) won't generate the desired
212 output. GNU file-4.26, for instance, omits a required semicolon.
213 GNU file-5.04 is known to work. Non-GNU version likely need different
214 options or don't provide this function at all. Alternatively, you can use
215 .BR print\-mimetype ,
216 which is part of mmh, but guesses MIME types by file name extensions only.
217 .RE
218 .PP
219 .BR Msg\-Protect :
220 0644
221 .RS 5
222 An octal number which defines the permission bits for new message files.
223 See
224 .BR chmod (1)
225 for an explanation of the octal number.
226 (profile, default: 0600)
227 .RE
228 .PP
229 .BR Folder\-Protect :
230 0750
231 .RS 5
232 An octal number which defines the permission bits for new folder
233 directories.  See
234 .BR chmod (1)
235 for an explanation of the octal number.
236 (profile, default: 0700)
237 .RE
238 .PP
239 .IR program :
240 .I default switches
241 .RS 5
242 Sets default switches to be used whenever the mmh program
243 .I program
244 is invoked.  For example, one could override the \*(lqEditor:\*(rq profile
245 component when replying to messages by adding a component such as:
246 .PP
247 .RS 5
248 repl: \-editor /bin/ed
249 .RE
250 .PP
251 (profile, no defaults)
252 .RE
253 .PP
254 .IB lasteditor "-next:"
255 .I nexteditor
256 .RS 5
257 Names \*(lqnexteditor\*(rq to be the default editor after using
258 \*(lqlasteditor\*(rq.  This takes effect at \*(lqWhat now?\*(rq prompt
259 in
260 .BR comp ,
261 .BR dist ,
262 .BR forw ,
263 and
264 .BR repl .
265 After editing
266 the draft with \*(lqlasteditor\*(rq, the default editor is set to be
267 \*(lqnexteditor\*(rq.  If the user types \*(lqedit\*(rq without any
268 arguments to \*(lqWhat now?\*(rq, then \*(lqnexteditor\*(rq is used.
269 (profile, no default)
270 .RE
271 .PP
272 .BR Folder\-Stack :
273 .I folders
274 .RS 5
275 The contents of the folder-stack for the
276 .B folder
277 command.
278 (context, no default)
279 .RE
280 .PP
281 .BR mhe :
282 .RS 5
283 If present, tells
284 .B inc
285 to compose an
286 .I MHE
287 auditfile in addition to its other tasks.
288 .I MHE
289 is Brian Reid's
290 .B emacs
291 front-end for
292 .BR mmh .
293 (profile, no default)
294 .RE
295 .PP
296 .BR Alternate\-Mailboxes :
297 mh@uci\-750a, bug-mh*
298 .RS 5
299 Tells
300 .B repl
301 and
302 .B scan
303 which addresses are really yours.
304 In this way,
305 .B repl
306 knows which addresses should be included in the
307 reply, and
308 scan
309 knows if the message really originated from you.
310 Addresses must be separated by a comma, and the hostnames listed should
311 be the \*(lqofficial\*(rq hostnames for the mailboxes you indicate, as
312 local nicknames for hosts are not replaced with their official site names.
313 For each address, if a host is not given, then that address on any host is
314 considered to be you.  In addition, an asterisk (`*') may appear at either
315 or both ends of the mailbox and host to indicate wild-card matching.
316 (profile, default: your user-id)
317 .RE
318 .PP
319 .BR Aliasfile :
320 aliases
321 .I other-alias
322 .RS 5
323 Indicates aliases files for
324 .BR ali
325 and
326 .BR send .
327 This may be used instead of the
328 .B \-alias
329 .I file
330 switch.  (profile, no default)
331 .RE
332 .PP
333 .BR Draft\-Folder :
334 drafts
335 .RS 5
336 Changes the default draft folder.  Read the
337 .BR mh\-draft (7)
338 man page for details. (profile, default: +drafts)
339 .RE
340 .PP
341 .BR Trash\-Folder :
342 trash
343 .RS 5
344 Changes the default folder for removed messages.  Read the
345 .BR rmm (1)
346 man page for details.
347 (profile, default: +trash)
348 .RE
349 .PP
350 .BI digest\-issue\- list :
351 1
352 .RS 5
353 Tells
354 .B forw
355 the last issue of the last volume sent for the digest
356 .IR list .
357 (context, no default)
358 .RE
359 .PP
360 .BI digest\-volume\- list :
361 1
362 .RS 5
363 Tells
364 .B forw
365 the last volume sent for the digest
366 .IR list .
367 (context, no default)
368 .RE
369 .PP
370 .BR MailDrop :
371 \&.mail
372 .RS 5
373 Tells
374 .B inc
375 your maildrop, if different from the default.  This is
376 superseded by the environment variable
377 .BR $MAILDROP .
378 (profile, default: %mailspool%/$USER)
379 .RE
380 .PP
381 .BR Signature :
382 RAND MH System (agent: Marshall Rose)
383 .RS 5
384 Tells
385 .B send
386 your mail signature.  This is superseded by the
387 environment variable
388 .BR $SIGNATURE .
389 If
390 .B $SIGNATURE
391 is not set and this profile entry is not present, the \*(lqgcos\*(rq field of
392 the \fI/etc/passwd\fP file will be used.
393 Your signature will be added to the address
394 .B send
395 puts in the \*(lqFrom:\*(rq header; do not include an address in the
396 signature text.  (profile, no default)
397 .RE
398
399 .SS "Process Profile Entries"
400 The following profile elements are used whenever an
401 .B nmh
402 program invokes some other program such as
403 .BR more .
404 The profile can be used to select alternate programs if the
405 user wishes.  The default values are given in the examples.
406 .RE
407 .PP
408 .BR listproc :
409 show \-file
410 .RS 5
411 This program is used to list the contents of a message in response
412 to the
413 .B list
414 and
415 .B display
416 directive at the \*(lqWhat now?\*(rq prompt.
417 The absolute pathname of the message to list will be appended to
418 the command line given.
419 .RE
420 .PP
421 .BR whatnowproc :
422 %bindir%/whatnow
423 .RS 5
424 This is the program invoked by
425 .BR comp ,
426 .BR forw ,
427 .BR dist ,
428 and
429 .B repl
430 to query about the disposition of a composed draft message.
431 .RE
432
433 .SS "Environment Variables"
434 The operation of
435 .B mmh
436 and its commands it also controlled by the
437 presence of certain environment variables.
438 .PP
439 Many of these environment variables are used internally by the
440 \*(lqWhat now?\*(rq interface.  It's amazing all the information
441 that has to get passed via environment variables to make the
442 \*(lqWhat now?\*(rq interface look squeaky clean to the
443 .B mmh
444 user, isn't it?  The reason for all this is that the
445 .B mmh
446 user
447 can select
448 .B any
449 program as the
450 .IR whatnowproc ,
451 including
452 one of the standard shells.  As a result, it's not possible to pass
453 information via an argument list. The convention is that environment
454 variables whose names are all upper-case are user-settable; those
455 whose names are lower-case only are used internally by mmh and should
456 not generally be set by the user.
457 .PP
458 If the
459 .B WHATNOW
460 option was set during
461 .B mmh
462 configuration, and
463 if this environment variable is set, then if the commands
464 .BR refile\ ,
465 .BR send
466 or
467 .BR show
468 are not given any `msgs'
469 arguments, then they will default to using the file indicated by
470 .BR mh\-draft (7).
471 This is useful for getting the default behavior
472 supplied by the default
473 .IR whatnowproc .
474 .PP
475 .B $MMH
476 .RS 5
477 With this environment variable, you can specify an alternative
478 mmh directory. Personal mmh configuration files are located relative to
479 the mmh directory.
480 Non-absolute values are relative to the home directory.
481 This is one of the very few exceptions in
482 .B mmh
483 where non-absolute pathnames are not considered relative to the user's
484 mmh directory.
485 .RE
486 .PP
487 .B $MMHP
488 .RS 5
489 With this environment variable, you can specify a profile
490 other than
491 .I $HOME/.mmh/profile
492 to be read by the
493 .B mmh
494 programs
495 that you invoke.  If the value of
496 .B $MMHP
497 is not absolute, it will be presumed to start from the mmh directory.
498 .RE
499 .PP
500 .B $MMHC
501 .RS 5
502 With this environment variable, you can specify a
503 context other than the normal context file (as specified in
504 the profile).  As always, unless the value of
505 .B $MMHC
506 is absolute, it will be presumed to start from your mmh directory.
507 .RE
508 .PP
509 .B $MM_CHARSET
510 .RS 5
511 With this environment variable, you can specify
512 the native character set you are using.  You must be able to display
513 this character set on your terminal.
514 .PP
515 This variable is checked to see if a RFC-2047 header field should be
516 decoded (in
517 .BR inc ,
518 .BR scan ,
519 .BR mhl ).
520 This variable is
521 checked by
522 .B show
523 to see if the
524 .I showproc
525 or
526 .I showmimeproc
527 should
528 be called, since showmimeproc will be called if a text message uses
529 a character set that doesn't match
530 .BR $MM_CHARSET .
531 This variable is
532 checked by
533 .B mhshow
534 for matches against the charset parameter
535 of text contents to decide it the text content can be displayed
536 without modifications to your terminal.  This variable is checked by
537 .B mhbuild
538 to decide what character set to specify in the charset
539 parameter of text contents containing 8\-bit characters.
540 .PP
541 When decoding text in such an alternate character set,
542 .B mmh
543 must be able to determine which characters are alphabetic, which
544 are control characters, etc.  For many operating systems, this
545 will require enabling the support for locales (such as setting
546 the environment variable
547 .B $LC_CTYPE
548 to iso_8859_1).
549 .RE
550 .PP
551 .B $MAILDROP
552 .RS 5
553 This variable tells
554 .B inc
555 the default maildrop. This supersedes the \*(lqMailDrop\*(rq profile entry.
556 .RE
557 .PP
558 .B $SIGNATURE
559 .RS 5
560 This variable tells
561 .B send
562 and
563 .B post
564 your mail signature. This supersedes the \*(lqSignature\*(rq profile entry.
565 .RE
566 .PP
567 .B $HOME
568 .RS 5
569 This variable tells all
570 .B mmh
571 programs your home directory
572 .RE
573 .PP
574 .B $SHELL
575 .RS 5
576 This variable tells
577 .B bbl
578 the default shell to run
579 .RE
580 .PP
581 .B $MMHEDITOR
582 .br
583 .B $VISUAL
584 .br
585 .B $EDITOR
586 .RS 5
587 These variables (in descending priority) define the default editor to use.
588 .RE
589 .PP
590 .B $MMHPAGER
591 .br
592 .B $PAGER
593 .RS 5
594 These variables (in descending priority) define the default pager to use.
595 .RE
596 .PP
597 .B $TERM
598 .RS 5
599 This variable tells
600 .B mmh
601 your terminal type.
602 .PP
603 The environment variable
604 .B $TERMCAP
605 is also consulted.  In particular,
606 these tell
607 .B scan
608 and
609 .B mhl
610 how many columns wide your terminal is.  They also tell
611 .B mhl
612 how many
613 lines long your terminal screen is.
614 .RE
615 .PP
616 .B $editalt
617 .RS 5
618 This is the alternate message.
619 .PP
620 This is set by
621 .B dist
622 and
623 .B repl
624 during edit sessions so you can peruse the message being distributed or
625 replied to.  The message is also available through a link called
626 \*(lq@\*(rq (if not changed by
627 .BR altmsg-link )
628 in the current directory if your current working directory
629 and the message's folder are on the same UNIX filesystem.
630 .RE
631 .PP
632 .B $mhdraft
633 .RS 5
634 This is the path to the working draft.
635 .PP
636 This is set by
637 .BR comp ,
638 .BR dist ,
639 .BR forw ,
640 and
641 .B repl
642 to tell the
643 .I whatnowproc
644 which file to ask \*(lqWhat now?\*(rq
645 questions about.
646 .RE
647 .PP
648 .B $mhaltmsg
649 .RS 5
650 .B dist
651 and
652 .B repl
653 set
654 .B $mhaltmsg
655 to tell the
656 .I whatnowproc
657 about an alternate message associated with the
658 draft (the message being distributed or replied to).
659 .RE
660 .PP
661 .B $mhdist
662 .RS 5
663 .B dist
664 sets
665 .B $mhdist
666 to tell the
667 .I whatnowproc
668 that message re-distribution is occurring.
669 .RE
670 .PP
671 .B $mheditor
672 .RS 5
673 This is set by
674 .BR comp ,
675 .BR repl ,
676 .BR forw ,
677 and
678 .B dist
679 to tell the
680 .I whatnowproc
681 the user's choice of
682 editor (unless overridden by
683 .BR \-noedit ).
684 .RE
685 .PP
686 .B $mhuse
687 .RS 5
688 This may be set by
689 .BR comp .
690 .RE
691 .PP
692 .B $mhmessages
693 .RS 5
694 This is set by
695 .BR dist ,
696 .BR forw ,
697 and
698 .B repl
699 if annotations are to occur.
700 .RE
701 .PP
702 .B $mhannotate
703 .RS 5
704 This is set by
705 .BR dist ,
706 .BR forw ,
707 and
708 .B repl
709 if annotations are to occur.
710 .RE
711 .PP
712 .B $mhfolder
713 .RS 5
714 This is the folder containing the alternate message.
715 .PP
716 This is set by
717 .B dist
718 and
719 .B repl
720 during edit sessions so you
721 can peruse other messages in the current folder besides the one being
722 distributed or replied to.
723 .RE
724
725 .SH FILES
726 .fc ^ ~
727 .nf
728 .ta \w'%etcdir%/ExtraBigFileName  'u
729 ^$HOME/.mmh~^The user's mmh directory
730 ^or $MMH~^Rather than the standard mmh directory
731 ^$HOME/.mmh/profile~^The user's profile
732 ^or $MMHP~^Rather than the standard profile
733 ^$HOME/.mmh/context~^The user's context
734 ^or $MMHC~^Rather than the standard context
735 ^<folder>/.mh_sequences~^Public sequences for <folder>
736 .fi
737
738 .SH "SEE ALSO"
739 nmh(1), environ(5), mh-sequence(7)
740
741 .SH HISTORY
742 The
743 .I $HOME/.mmh/profile
744 contains only static information, which
745 .B mmh
746 programs will
747 .B NOT
748 update.  Changes in context are made to the
749 .I $HOME/.mmh/context
750 file.
751 This includes, but is not limited to: the \*(lqCurrent\-Folder\*(rq entry
752 and all private sequence information.  Public sequence information is
753 kept in each folder in the file determined by the \*(lqMh\-Sequences\*(rq
754 profile entry (default is
755 .IR \&.mh_sequences ).
756 .PP
757 The profile may override the path of the
758 .I context
759 file, by specifying a \*(lqContext\*(rq entry.
760 As a result, you can actually have more than one set of
761 private sequences by using different context files.
762
763 .SH BUGS
764 The shell quoting conventions are not available in the profile.
765 Each token is separated by whitespace.
766 .PP
767 There is some question as to what kind of arguments should be placed
768 in the profile as options.  In order to provide a clear answer, recall
769 command line semantics of all
770 .B mmh
771 programs: conflicting switches
772 (e.g.
773 .B \-header
774 and
775 .BR \-noheader )
776 may occur more than one time on the
777 command line, with the last switch taking effect.  Other arguments, such
778 as message sequences, filenames and folders, are always remembered on
779 the invocation line and are not superseded by following arguments of
780 the same type.  Hence, it is safe to place only switches (and their
781 arguments) in the profile.
782 .PP
783 If one finds that an
784 .B mmh
785 program is being invoked again and again
786 with the same arguments, and those arguments aren't switches, then there
787 are a few possible solutions to this problem.  The first is to create a
788 (soft) link in your
789 .I $HOME/bin
790 directory to the
791 .B mmh
792 program
793 of your choice.  By giving this link a different name, you can create
794 a new entry in your profile and use an alternate set of defaults for
795 the
796 .B mmh
797 command.  Similarly, you could create a small shell script
798 which called the
799 .B mmh
800 program of your choice with an alternate set
801 of invocation line switches (using links and an alternate profile entry
802 is preferable to this solution).
803 .PP
804 Finally, the
805 .B csh
806 user could create an alias for the command of the form:
807 .PP
808 .RS 5
809 alias cmd 'cmd arg1 arg2 ...'
810 .RE
811 .PP
812 In this way, the user can avoid lengthy type-in to the shell, and still
813 give
814 .B mmh
815 commands safely.  (Recall that some
816 .B mmh
817 commands
818 invoke others, and that in all cases, the profile is read, meaning that
819 aliases are disregarded beyond an initial command invocation)