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